home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / AstroBubble.dxr / 00002.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.3 KB  |  55 lines

  1. global mouseinput, playerLocData, playerPower, playerScore, gameOverDelay, spawnDelay, tickRecord, updatepowerDisplay
  2.  
  3. on exitFrame me
  4.   global messageData
  5.   if the ticks > (tickRecord + 0.5) then
  6.     tickRecord = the ticks
  7.     harvestInput()
  8.     moveplayer()
  9.     moveRescueThings()
  10.     drawChain()
  11.     moveFallingThings()
  12.     moveParticles()
  13.     if spawnDelay > 0 then
  14.       spawnDelay = spawnDelay - 1
  15.     else
  16.       spawnDelay = 130
  17.       addFallingThing(point(random(500) + 40, -25))
  18.     end if
  19.     if updatepowerDisplay = 1 then
  20.       member("Score Display").text = string(playerScore)
  21.       member("Power Display").text = string(playerPower)
  22.       updatepowerDisplay = 0
  23.     end if
  24.     if messageData[1] <> 0 then
  25.       messageData[3] = messageData[3] + 1
  26.       if messageData[3] > 60 then
  27.         set the loc of sprite 790 to point(-100, -100)
  28.         messageData[1] = 0
  29.       else
  30.         set the member of sprite 790 to ["Speed Text Message", "Power Text Message"][messageData[1]]
  31.         set the loc of sprite 790 to messageData[2] - point(0, messageData[3])
  32.       end if
  33.     end if
  34.   end if
  35.   if playerPower > 0 then
  36.     go(the frame)
  37.   else
  38.     if gameOverDelay > 0 then
  39.       gameOverDelay = gameOverDelay - 1
  40.       go(the frame)
  41.     else
  42.       go(15)
  43.     end if
  44.   end if
  45.   sprite(4).locZ = 50
  46. end
  47.  
  48. on mouseDown
  49.   mouseinput = 1
  50. end
  51.  
  52. on mouseUp
  53.   mouseinput = 0
  54. end
  55.