home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / WaterFight.dxr / 00006.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  2.0 KB  |  73 lines

  1. on initializeDrops
  2.   global dropEffectSO, dropData, dropFrames
  3.   dropData = []
  4.   repeat with wDrop = 1 to 30
  5.     wSprite = wDrop + dropEffectSO
  6.     set the loc of sprite wSprite to point(-50, -50)
  7.     add(dropData, [0, point(0, 0), 0, 0, 0, 0, 0])
  8.   end repeat
  9. end
  10.  
  11. on moveDrops
  12.   global dropEffectSO, dropData, dropFrames
  13.   repeat with wDrop = 1 to 30
  14.     wSprite = wDrop + dropEffectSO
  15.     if dropData[wDrop][1] = 1 then
  16.     end if
  17.   end repeat
  18. end
  19.  
  20. on initializeBeams
  21.   global beamEffectSO, beamData, beamFrames
  22.   beamData = []
  23.   repeat with wBeam = 1 to 30
  24.     wSprite = wBeam + beamEffectSO
  25.     add(beamData, [0, 0])
  26.   end repeat
  27. end
  28.  
  29. on initializeClouds
  30.   global cloudEffectSO, cloudData, cloudFrames
  31.   cloudData = []
  32.   repeat with wCloud = 1 to 30
  33.     wSprite = wCloud + cloudEffectSO
  34.     add(cloudData, [0, 0, 0, point(0, 0)])
  35.   end repeat
  36. end
  37.  
  38. on addCloud addLoc, addScale
  39.   global cloudEffectSO, cloudData, cloudFrames
  40.   validSlot = 0
  41.   repeat with wScan = 1 to count(cloudData)
  42.     if (validSlot = 0) and (cloudData[wScan][1] = 0) then
  43.       validSlot = wScan
  44.     end if
  45.   end repeat
  46.   if validSlot <> 0 then
  47.     wSprite = cloudEffectSO + validSlot
  48.     cloudData[validSlot] = [1, 0, addScale, addLoc]
  49.     set the blend of sprite wSprite to 100
  50.     set the loc of sprite wSprite to addLoc
  51.   end if
  52. end
  53.  
  54. on moveClouds
  55.   global cloudEffectSO, cloudData, cloudFrames
  56.   repeat with wCloud = 1 to count(cloudData)
  57.     wSprite = cloudEffectSO + wCloud
  58.     if cloudData[wCloud][1] = 1 then
  59.       cloudData[wCloud][2] = cloudData[wCloud][2] + 1
  60.       if cloudData[wCloud][2] > 20 then
  61.         cloudData[wCloud] = [0, 0, 0, point(0, 0)]
  62.         set the loc of sprite wSprite to point(-50, -50)
  63.       end if
  64.     end if
  65.     if cloudData[wCloud][1] = 1 then
  66.       baseSize = (15 + (1 * cloudData[wCloud][2])) * cloudData[wCloud][3]
  67.       set the width of sprite wSprite to baseSize
  68.       set the height of sprite wSprite to baseSize / 3
  69.       set the blend of sprite wSprite to 100 - (cloudData[wCloud][2] * 5)
  70.     end if
  71.   end repeat
  72. end
  73.