Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 6:45:50 PM (18 years ago)
Author:
snellen
Message:

falldown.lua implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/single_player_map/scripts/falldown.lua

    r3921 r3927  
    1  
     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 TracChangeset for help on using the changeset viewer.