2015-03-05 17:30:50 +00:00
|
|
|
local global = require( "global" )
|
|
|
|
if(global.triggeredSunStart == nil) then
|
|
|
|
global.triggeredSunStart = false
|
|
|
|
end
|
|
|
|
|
2015-03-15 17:46:44 +00:00
|
|
|
function trigger(objectToChange, printDebug)
|
2015-03-05 17:30:50 +00:00
|
|
|
if(global.triggeredSunStart == false) then
|
|
|
|
if(not level) then
|
|
|
|
print("No level found in Lua!")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local time = os.clock()
|
|
|
|
global.sunStartTime = time
|
|
|
|
global.triggeredSunStart = true
|
2015-03-06 15:19:57 +00:00
|
|
|
level:activateEndgame()
|
2015-03-15 17:46:44 +00:00
|
|
|
if(printDebug) then
|
|
|
|
print("sunStart")
|
|
|
|
end
|
2015-03-05 17:30:50 +00:00
|
|
|
end
|
|
|
|
end
|