home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 127 / dpcs0998.iso / Internet / netobs / Install.exe / t2.z / BREAKOUT.DCR / 00014_idle.ls < prev    next >
Encoding:
Text File  |  1998-01-20  |  1.1 KB  |  34 lines

  1. on idle
  2.   global glBallsInPlay, glBulletsInPlay, giHitsOnDelay, giBallMinTicks, gbPaused
  3.   if gbPaused = 1 then
  4.     exit
  5.   end if
  6.   set liStartingTicks to the ticks
  7.   repeat with counter = 1 to count(glBulletsInPlay)
  8.     mPongBulletMove(getAt(glBulletsInPlay, counter))
  9.     set liTempV to mPongBulletLocV(getAt(glBulletsInPlay, counter))
  10.     if liTempV < 0 then
  11.       mPongBulletReset(getAt(glBulletsInPlay, counter))
  12.       deleteAt(glBulletsInPlay, counter)
  13.     end if
  14.   end repeat
  15.   pongPaddleMove()
  16.   repeat with counter = 1 to count(glBallsInPlay)
  17.     mPongBallMove(getAt(glBallsInPlay, counter))
  18.   end repeat
  19.   pongPaddleMove()
  20.   repeat with counter = 1 to count(glBulletsInPlay)
  21.     mPongBulletMove(getAt(glBulletsInPlay, counter))
  22.     set liTempV to mPongBulletLocV(getAt(glBulletsInPlay, counter))
  23.     if liTempV < 0 then
  24.       mPongBulletReset(getAt(glBulletsInPlay, counter))
  25.       deleteAt(glBulletsInPlay, counter)
  26.     end if
  27.   end repeat
  28.   pongPaddleMove()
  29.   repeat while the ticks < (liStartingTicks + giBallMinTicks)
  30.     set giHitsOnDelay to giHitsOnDelay + 1
  31.     pongPaddleMove()
  32.   end repeat
  33. end
  34.