home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Reversi.dxr / Internal_6_fish.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  388 b   |  20 lines

  1. property fish, spriteNum, ogLoc, mot, pAng, dir
  2.  
  3. on beginSprite me
  4.   fish = sprite(spriteNum)
  5.   ogLoc = fish.locH
  6.   mot = timeout(string(spriteNum)).new(50, #moving, me)
  7.   pAng = 0
  8.   dir = 10
  9. end
  10.  
  11. on moving me
  12.   if fish.locH < 800 then
  13.     fish.locH = fish.locH + 1
  14.   else
  15.     fish.locH = ogLoc
  16.   end if
  17.   pAng = pAng + dir
  18.   fish.locV = float(fish.locV) + (sin(pAng * PI / 180) * 5)
  19. end
  20.