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

  1. property iiH, iiV, iiVV, iiChannel, isCastName, iiPosition, iiAnimCycle
  2.  
  3. on birth me, piH, piV, piVV, piChannel, psCastName, piPosition
  4.   set the iiH of me to piH
  5.   set the iiV of me to piV
  6.   set the iiVV of me to piVV
  7.   set the iiChannel of me to piChannel
  8.   set the isCastName of me to psCastName
  9.   set the iiPosition of me to piPosition
  10.   set the iiAnimCycle of me to 2
  11.   puppetSprite(the iiChannel of me, 1)
  12.   set lsTempCastName to psCastName & iiAnimCycle
  13.   set the castNum of sprite the iiChannel of me to the number of member lsTempCastName
  14.   set the locH of sprite the iiChannel of me to the iiH of me
  15.   set the locV of sprite the iiChannel of me to the iiV of me
  16.   return me
  17. end
  18.  
  19. on mPongBulletReset me
  20.   set the locH of sprite the iiChannel of me to 10 + (the iiPosition of me * 10)
  21.   set the locV of sprite the iiChannel of me to 360
  22.   set the castNum of sprite the iiChannel of me to the number of member the isCastName of me
  23.   set the iiV of me to 0
  24. end
  25.  
  26. on mPongBulletLocV me
  27.   if the iiV of me = 0 then
  28.     return -1
  29.   end if
  30.   return the locV of sprite the iiChannel of me
  31. end
  32.  
  33. on mPongBulletMove me
  34.   global giPongPaddleChannel, giPongBrickChannel, giPaddleBounceAngle, giPongEasyMode, giPongScore, giPlayFieldTopBoundary, giPlayFieldLeftBoundary, giBrickVOffset, giBrickHOffset, glWallChannels, glBrickList, giHideOffset, giBallMinTicks, giHitsOnDelay
  35.   set newLocV to the locV of sprite the iiChannel of me - the iiVV of me
  36.   if the iiAnimCycle of me < 3 then
  37.     set the iiAnimCycle of me to the iiAnimCycle of me + 1
  38.   else
  39.     set the iiAnimCycle of me to 1
  40.   end if
  41.   set lsTempCastName to the isCastName of me & iiAnimCycle
  42.   set the castNum of sprite the iiChannel of me to the number of member lsTempCastName
  43.   set the locV of sprite the iiChannel of me to newLocV
  44.   set lTemp to pongCheckForHit(the iiChannel of me)
  45.   if listp(lTemp) then
  46.     pongProcessHit(lTemp)
  47.   end if
  48. end
  49.