home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Aim&Fire.dxr / 00001_TimeTube.ls next >
Encoding:
Text File  |  2002-01-25  |  2.6 KB  |  92 lines

  1. property pTheTime, pSecs, pMins, pAnimateTube, pTubeTimer
  2. global gLevel, gPaused, gScore, gPointsNeeded
  3.  
  4. on beginSprite
  5.   pTheTime = the timer
  6.   pMins = 0
  7.   pSecs = 25
  8.   member("TimeText").text = pMins & ":" & pSecs
  9.   pAnimateTube = 1
  10.   sprite(41).member = "Time" & pAnimateTube
  11.   pTubeTimer = 0.0
  12. end
  13.  
  14. on exitFrame
  15.   if gPaused = 0 then
  16.     if the timer > (pTheTime + 60) then
  17.       pTheTime = the timer
  18.       pSecs = pSecs - 1
  19.       if pSecs >= 60 then
  20.         pMins = pMins + 1
  21.         pSecs = 0
  22.       else
  23.         if pSecs < 0 then
  24.           pMins = pMins - 1
  25.           pSecs = 59
  26.         end if
  27.       end if
  28.       if pSecs <= 9 then
  29.         member("TimeText").text = pMins & ":" & "0" & pSecs
  30.       else
  31.         member("TimeText").text = pMins & ":" & pSecs
  32.       end if
  33.       if (pMins = 0) and (pSecs = 0) then
  34.         puppetSound(4, "gameOverSound")
  35.         sprite(43).visible = 0
  36.         gPaused = 1
  37.         if gLevel = 1 then
  38.           gScore = gScore + (500 - (gPointsNeeded * 100)) + (pSecs * 100)
  39.         else
  40.           if gLevel = 2 then
  41.             gScore = gScore + (1000 - (gPointsNeeded * 100)) + (pSecs * 100)
  42.           else
  43.             if gLevel = 3 then
  44.               gScore = gScore + (1500 - (gPointsNeeded * 100)) + (pSecs * 100)
  45.             else
  46.               if gLevel = 4 then
  47.                 gScore = gScore + (2000 - (gPointsNeeded * 100)) + (pSecs * 100)
  48.               else
  49.                 if gLevel = 5 then
  50.                   gScore = gScore + (2500 - (gPointsNeeded * 100)) + (pSecs * 100)
  51.                 end if
  52.               end if
  53.             end if
  54.           end if
  55.         end if
  56.         member("TotalScore").text = "Total Score: " & gScore
  57.         pSecs = 25
  58.         pTheTime = 0
  59.         sprite(46).locZ = 100
  60.         go(21)
  61.       end if
  62.       if pTubeTimer > pAnimateTube then
  63.         pAnimateTube = pAnimateTube + 1
  64.         if pAnimateTube > 16 then
  65.           pAnimateTube = pAnimateTube - 1
  66.         end if
  67.         puppetSound(4, "countdown")
  68.         sprite(41).member = "Time" & pAnimateTube
  69.       end if
  70.       if gLevel = 1 then
  71.         pTubeTimer = pTubeTimer + 0.64000000000000001
  72.       else
  73.         if gLevel = 2 then
  74.           pTubeTimer = pTubeTimer + 0.46000000000000002
  75.         else
  76.           if gLevel = 3 then
  77.             pTubeTimer = pTubeTimer + 0.35999999999999999
  78.           else
  79.             if gLevel = 4 then
  80.               pTubeTimer = pTubeTimer + 0.28999999999999998
  81.             else
  82.               if gLevel = 5 then
  83.                 pTubeTimer = pTubeTimer + 0.27000000000000002
  84.               end if
  85.             end if
  86.           end if
  87.         end if
  88.       end if
  89.     end if
  90.   end if
  91. end
  92.