home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / PadHop.dxr / the graffic_31_firsh.ls < prev    next >
Encoding:
Text File  |  2002-01-31  |  1.2 KB  |  45 lines

  1. property pSprite, spriteNum, pLoc, pAng, pInc, pDepth, pScale, pFullScale
  2. global gMotion
  3.  
  4. on beginSprite me
  5.   pSprite = sprite(spriteNum)
  6.   pLoc = [float(pSprite.loc[1]), float(pSprite.loc[2])]
  7.   pAng = 90
  8.   pInc = 2
  9.   pFullScale = [float(pSprite.width), float(pSprite.height)]
  10.   pDepth = random(5, 10)
  11.   pScale = 0.10000000000000001 * pDepth
  12.   pSprite.width = pFullScale[1] * pScale
  13.   pSprite.height = pFullScale[2] * pScale
  14.   pSprite.blend = pDepth * 10
  15. end
  16.  
  17. on exitFrame me
  18.   pAng = pAng + pInc
  19.   if (pAng >= 150) or (pAng <= 30) then
  20.     pInc = -pInc
  21.   end if
  22.   if pAng < 90 then
  23.     pSprite.flipH = 1
  24.   else
  25.     pSprite.flipH = 0
  26.   end if
  27.   xPos = cos(pAng * PI / 180) * 2
  28.   yPos = 2
  29.   pLoc = pLoc + [xPos, yPos]
  30.   pSprite.loc = point(pLoc[1], pLoc[2])
  31.   if pLoc[2] > ((the stage).rect.height + pSprite.height) then
  32.     pSprite.locH = random((the stage).rect.width)
  33.     pSprite.locV = 0 + random(-500, -100)
  34.     pLoc = [float(pSprite.loc[1]), float(pSprite.loc[2])]
  35.     pDepth = random(5, 10)
  36.     pScale = 0.10000000000000001 * pDepth
  37.     pSprite.width = pFullScale[1] * pScale
  38.     pSprite.height = pFullScale[2] * pScale
  39.     pSprite.blend = pDepth * 5
  40.   end if
  41.   if gMotion then
  42.     pSprite.locV = pSprite.locV + 5
  43.   end if
  44. end
  45.