--[[
Author: Will Graham (wgraham@digipen.edu)

Copyright 2008-2009 DigiPen (USA) Corp.
]]--

--print("PlatformTestLevel_Init.lua")

StartPos = LvlLoader:GetInfo("playerStart01").Pos_
--print(StartPos.x, StartPos.y, StartPos.z)
cameraStartPos = StartPos;

--EventManager:AddEvent(false, 0.0, "PlayerData:SetCameraPosition(Vector3D(-200.0, 0.0, 100.0), 0.04, true, true)");
--EventManager:AddEvent(false, 7.0, "PlayerData:SetCameraPosition(DefaultCameraVec, DefaultCameraSpeed, DefaultCameraRelative, DefaultCameraFixed)")
EventManager:AddEvent(false, 0.0, "PlayerData:SetCameraPosition(Vector3D(0.0, -500.0, 35.0), 1.0, true, true)");

EventManager:AddEvent(false, 0.0, "PlayerData:LockPlayer(Vector3D(0.0, 0.0, 0.0))")
EventManager:AddEvent(false, 0.0, "PlayerData:SetEmissiveColor(Vector3D(1.0, 0.0, 0.0), true)")
EventManager:AddEvent(false, 0.0, "PlayerData:ToggleLight(true)")
EventManager:AddEvent(false, 0.0, "PlayerData:SetRimColor(Vector3D(0.0, 0.3, 1.0), 1.0)")
EventManager:AddEvent(false, 1.0, "PlayerData:UnlockPlayer()")
EventManager:AddEvent(false, 0.0, "PlayerData.JumpDuration_ = 0");

TikiPos = StartPos;
TikiPos.z = StartPos.z + 50.0;
--GlobalSpawnController:SpawnTikiGod(TikiPos, Vector3D(0.0, 0.0, 0.0), Vector3D(50.0, 50.0, 100.0), 0);

-- Get player start position

for i = 1, 0 do

	local PlatformName = "platform"
	
	if i < 10 then
		PlatformName = PlatformName .. 0 .. i
	else
		PlatformName = PlatformName .. i
	end
	
	SpawnPlatformInfo(LvlLoader:GetInfo(PlatformName))

end
Platform = SpawnPlatformInfo(LvlLoader:GetInfo("platform01"))

Info = LvlLoader:GetInfo("lua01")
--GlobalSpawnController:SpawnLavaPool(Info.Pos_, Info.Scale_, Info.Rot_, 300.0, 100.0)

Info = LvlLoader:GetInfo("doomLava01")
--GlobalSpawnController:SpawnDoomLava(Info.Pos_, Info.Scale_, Info.Rot_, 0.010)


--GlobalSpawnController:AddJetSpawner(30)
for i = 1, 0 do
	local Name = "jetSpawnPoint"
	if i < 10 then
		Name = Name .. 0 .. i
	else
		Name = Name .. i
	end
	local Info = LvlLoader:GetInfo(Name)
	GlobalSpawnController.JetSpawner_:AddSpawn(JetSpawnPoint(Info.Pos_, Info.Scale_, Info.Rot_, 300))
end

for i = 1, 0 do
	local Name = "stalagmite"
	if i < 10 then
		Name = Name .. 0 .. i
	else
		Name = Name .. i
	end
	local Info = LvlLoader:GetInfo(Name)
	GlobalSpawnController:SpawnShard(Info.Pos_, Info.Scale_, Info.Rot_, 0.0);
end

laserDummy01 = GlobalSpawnController:SpawnSimple(LvlLoader:GetInfo("laserDummy01").Pos_, LvlLoader:GetInfo("laserDummy01").Scale_.x);
laserDummy02 = GlobalSpawnController:SpawnSimple(LvlLoader:GetInfo("laserDummy02").Pos_, LvlLoader:GetInfo("laserDummy02").Scale_.x);
laserDummy03 = GlobalSpawnController:SpawnSimple(LvlLoader:GetInfo("laserDummy03").Pos_, LvlLoader:GetInfo("laserDummy03").Scale_.x);

EventManager:AddEvent(false, 2.0, "GameEngine:PlayParticleEvent(\"levelLoader/compositeObjects/laser.igobj\", laserDummy01, laserDummy03)")
EventManager:AddEvent(false, 2.0, "GameEngine:PlayParticleEvent(\"levelLoader/compositeObjects/laser.igobj\", laserDummy02, laserDummy03)")
EventManager:AddEvent(false, 2.0, "GameEngine:PlayParticleEvent(\"levelLoader/compositeObjects/laserContinuousFire.igobj\", laserDummy03, 10)")

--SpawnTowerPatternInfo(LvlLoader:GetInfo("testTower01"), true, true, false)

MinZ = -10.0
KillsNeeded = 0