home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 December / PCWorld_2002-12_cd.bin / Software / Komercni / Krtek / MOVIE / ROZDILY.DXR / Internal_2_treseni.ls < prev    next >
Encoding:
Text File  |  2002-10-07  |  578 b   |  36 lines

  1. property pSp, pLoc0, pStart
  2.  
  3. on exitFrame me
  4.   if pStart = 0 then
  5.     exit
  6.   end if
  7.   xx = random(2)
  8.   if xx = 2 then
  9.     pPosuv = 1
  10.   end if
  11.   if xx = 1 then
  12.     pPosuv = -1
  13.   end if
  14.   sprite(pSp).locV = sprite(pSp).locV + pPosuv
  15.   if (sprite(pSp).locV - pLoc0) > 2 then
  16.     sprite(pSp).locV = sprite(pSp).locV - 1
  17.   end if
  18.   if (pLoc0 - sprite(pSp).locV) > 2 then
  19.     sprite(pSp).locV = sprite(pSp).locV + 1
  20.   end if
  21. end
  22.  
  23. on beginSprite me
  24.   pSp = me.spriteNum
  25.   pStart = 0
  26. end
  27.  
  28. on vychoziPoloha me
  29.   pLoc0 = sprite(pSp).locV
  30.   pStart = 1
  31. end
  32.  
  33. on stopTreseni
  34.   pStart = 0
  35. end
  36.