Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/single_player_map/scripts/falldown.lua @ 3936

Last change on this file since 3936 was 3927, checked in by snellen, 18 years ago

falldown.lua implemented

File size: 408 bytes
Line 
1
2randTime = 0
3eventFinished = false
4randinit = false
5
6function RandTime()
7
8if not randinit then
9math.randomseed(os.clock())
10randinit = true
11randTime = 5 * math.random()
12end
13end
14
15
16function fallDown(timestep)
17
18eventFinished = true
19end
20
21
22function tick(timestep)
23io.write("Falldown called \n")
24RandTime()
25
26if randTime > 0 then
27randTime = randTime - timestep
28else
29fallDown(timestep)
30end
31
32return eventFinished
33
34end
Note: See TracBrowser for help on using the repository browser.