
function InitGlobalVariables()
	done = 0
	stage = 0
	cur_timer = 0
	wait_timer = 10
	stage_init = "true"
end

function OnEnter()

	InitGlobalVariables()
	LG_GameController("LoadLevel","data\\levels\\level01.txt")

--[[	LG_Camera("EnableCutSceneCam","true")
	LG_Camera("SetPosition",0,0,180, "true")
	LG_Camera("SetTarget",100,0,40, "true")
]]
--	LG_GameUI("ScreenFadeIn",1,1,1, 5)
	--LG_GameController("EnableUI","false")
	
	
end

function DoStop()
	
	done = 0

end

function OnExit()
	

end


OnEnter()

---------------------- Cutscene Initial -----------------------------


while (done < 1) do

	local time = LG_GameController("GetTime")

--[[
	if (stage == 0) then

	
		camx,camy,camz = LG_Math("RandomVec3");
		camx = camx*100
		camy = camy*100
		camz = 280

		tarx,tary,tarz = LG_Math("RandomVec3");
		tarx = tarx*4000
		tary = tary*4000
		tarz = 40
		stage_init = false;
		LG_Misc("SetWait", 5.0)

		
		LG_Camera("SetPosition",camx,camy,camz, "false")
		LG_Camera("SetTarget",tarx,tary,tarz, "false")
		LG_Camera("SetSpeed",5)
	

		stage = 1

	else
		ret = LG_Misc("CheckWait", time)
		if(ret > 0) then

			stage = 0

		end

	end
]]


		
	--LG_Debug("SetWindowText",10,camx,camy,camz,time,ret,LG_Misc("GetWait"),stage,tarx,tary,tarz)

	LG_Script("Yield")

end

LG_Script("Stop")

OnExit()

