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

  1. on exitFrame me
  2.   global playerViewPoint, playerData, blasterData, enemyData
  3.   harvestInput()
  4.   if playerData[2][2] <= 1000 then
  5.     repeat with wSection = 1 to 10
  6.       appendmap()
  7.     end repeat
  8.   end if
  9.   playerViewPoint = point(0, playerData[2][2] - 275)
  10.   moveterrain()
  11.   moveplayer()
  12.   moveEnemy()
  13.   moveParticles()
  14.   if blasterData[1] = 1 then
  15.     blasterData[4] = blasterData[4] - 1
  16.     if blasterData[4] <= 0 then
  17.       blasterData[1] = 0
  18.     else
  19.       blasterData[2] = blasterData[2] + blasterData[3]
  20.       aimTHIS = findAngle(point(0, 0), blasterData[3])
  21.       addparticle(blasterData[2], aimTHIS, 4)
  22.     end if
  23.   end if
  24.   if blasterData[1] = 1 then
  25.     repeat with wEnemy = 1 to count(enemyData)
  26.       if enemyData[wEnemy][1] = 1 then
  27.         if [0, 0, 1, 1, 1, 1][enemyData[wEnemy][2]] = 1 then
  28.           if findDistance(enemyData[wEnemy][3], blasterData[2]) <= 25 then
  29.             enemyData[wEnemy][6] = enemyData[wEnemy][6] + 150
  30.             blasterData[1] = 0
  31.             rMove = random(72)
  32.             repeat with wTurn = 1 to 3
  33.               locY = cos((rMove + (wTurn * 120)) * PI / 180) * 20
  34.               locX = sin((rMove + (wTurn * 120)) * PI / 180) * -20
  35.               addparticle(blasterData[2] + point(locX, locY), 0, 1)
  36.             end repeat
  37.             addparticle(blasterData[2], 0, 1)
  38.           end if
  39.         end if
  40.       end if
  41.     end repeat
  42.   end if
  43.   set the height of sprite 510 to integer(playerData[5] / 1000.0 * 40)
  44.   go(the frame)
  45. end
  46.