home *** CD-ROM | disk | FTP | other *** search
- on idle
- global glBallsInPlay, glBulletsInPlay, giHitsOnDelay, giBallMinTicks, gbPaused
- if gbPaused = 1 then
- exit
- end if
- set liStartingTicks to the ticks
- repeat with counter = 1 to count(glBulletsInPlay)
- mPongBulletMove(getAt(glBulletsInPlay, counter))
- set liTempV to mPongBulletLocV(getAt(glBulletsInPlay, counter))
- if liTempV < 0 then
- mPongBulletReset(getAt(glBulletsInPlay, counter))
- deleteAt(glBulletsInPlay, counter)
- end if
- end repeat
- pongPaddleMove()
- repeat with counter = 1 to count(glBallsInPlay)
- mPongBallMove(getAt(glBallsInPlay, counter))
- end repeat
- pongPaddleMove()
- repeat with counter = 1 to count(glBulletsInPlay)
- mPongBulletMove(getAt(glBulletsInPlay, counter))
- set liTempV to mPongBulletLocV(getAt(glBulletsInPlay, counter))
- if liTempV < 0 then
- mPongBulletReset(getAt(glBulletsInPlay, counter))
- deleteAt(glBulletsInPlay, counter)
- end if
- end repeat
- pongPaddleMove()
- repeat while the ticks < (liStartingTicks + giBallMinTicks)
- set giHitsOnDelay to giHitsOnDelay + 1
- pongPaddleMove()
- end repeat
- end
-