Changeset 3927 for data/branches/single_player_map/scripts/falldown.lua
- Timestamp:
- Jun 28, 2006, 6:45:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/single_player_map/scripts/falldown.lua
r3921 r3927 1 1 2 randTime = 0 3 eventFinished = false 4 randinit = false 5 6 function RandTime() 7 8 if not randinit then 9 math.randomseed(os.clock()) 10 randinit = true 11 randTime = 5 * math.random() 12 end 13 end 14 15 16 function fallDown(timestep) 17 18 eventFinished = true 19 end 20 21 22 function tick(timestep) 23 io.write("Falldown called \n") 24 RandTime() 25 26 if randTime > 0 then 27 randTime = randTime - timestep 28 else 29 fallDown(timestep) 30 end 31 32 return eventFinished 33 34 end
Note: See TracChangeset
for help on using the changeset viewer.