home *** CD-ROM | disk | FTP | other *** search
- property pTheTime, pSecs, pMins, pAnimateTube, pTubeTimer
- global gLevel, gPaused, gScore, gPointsNeeded
-
- on beginSprite
- pTheTime = the timer
- pMins = 0
- pSecs = 25
- member("TimeText").text = pMins & ":" & pSecs
- pAnimateTube = 1
- sprite(41).member = "Time" & pAnimateTube
- pTubeTimer = 0.0
- end
-
- on exitFrame
- if gPaused = 0 then
- if the timer > (pTheTime + 60) then
- pTheTime = the timer
- pSecs = pSecs - 1
- if pSecs >= 60 then
- pMins = pMins + 1
- pSecs = 0
- else
- if pSecs < 0 then
- pMins = pMins - 1
- pSecs = 59
- end if
- end if
- if pSecs <= 9 then
- member("TimeText").text = pMins & ":" & "0" & pSecs
- else
- member("TimeText").text = pMins & ":" & pSecs
- end if
- if (pMins = 0) and (pSecs = 0) then
- puppetSound(4, "gameOverSound")
- sprite(43).visible = 0
- gPaused = 1
- if gLevel = 1 then
- gScore = gScore + (500 - (gPointsNeeded * 100)) + (pSecs * 100)
- else
- if gLevel = 2 then
- gScore = gScore + (1000 - (gPointsNeeded * 100)) + (pSecs * 100)
- else
- if gLevel = 3 then
- gScore = gScore + (1500 - (gPointsNeeded * 100)) + (pSecs * 100)
- else
- if gLevel = 4 then
- gScore = gScore + (2000 - (gPointsNeeded * 100)) + (pSecs * 100)
- else
- if gLevel = 5 then
- gScore = gScore + (2500 - (gPointsNeeded * 100)) + (pSecs * 100)
- end if
- end if
- end if
- end if
- end if
- member("TotalScore").text = "Total Score: " & gScore
- pSecs = 25
- pTheTime = 0
- sprite(46).locZ = 100
- go(21)
- end if
- if pTubeTimer > pAnimateTube then
- pAnimateTube = pAnimateTube + 1
- if pAnimateTube > 16 then
- pAnimateTube = pAnimateTube - 1
- end if
- puppetSound(4, "countdown")
- sprite(41).member = "Time" & pAnimateTube
- end if
- if gLevel = 1 then
- pTubeTimer = pTubeTimer + 0.64000000000000001
- else
- if gLevel = 2 then
- pTubeTimer = pTubeTimer + 0.46000000000000002
- else
- if gLevel = 3 then
- pTubeTimer = pTubeTimer + 0.35999999999999999
- else
- if gLevel = 4 then
- pTubeTimer = pTubeTimer + 0.28999999999999998
- else
- if gLevel = 5 then
- pTubeTimer = pTubeTimer + 0.27000000000000002
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end
-