home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / devglry / studiosw / origgame / catscon.dxr / 00003_aPICTtile.ls < prev    next >
Encoding:
Text File  |  1996-04-17  |  1.0 KB  |  58 lines

  1. property pSprite, pShowCast, pHideCast, pRevCast, pHomeV, pHomeH, pHideTile, pHideState
  2.  
  3. on birth me, theSprite, theCast, theHideCast, theRevCast
  4.   set pShowCast to theCast
  5.   set pHideCast to theHideCast
  6.   set pRevCast to theRevCast
  7.   set pSprite to theSprite
  8.   puppetSprite(pSprite, 1)
  9.   set the castNum of sprite pSprite to pHideCast
  10.   return me
  11. end
  12.  
  13. on getTile me
  14.   return pShowCast
  15. end
  16.  
  17. on setHomePos me, theHPos, theVPos
  18.   set pHomeV to theVPos
  19.   set pHomeH to theHPos
  20. end
  21.  
  22. on getHomeHPos me
  23.   return pHomeH
  24. end
  25.  
  26. on getHomeVPos me
  27.   return pHomeV
  28. end
  29.  
  30. on tstHome me
  31.   set vCurrent to the locV of sprite pSprite
  32.   set hCurrent to the locH of sprite pSprite
  33.   set hHome to pHomeH
  34.   set vHome to pHomeV
  35.   if (vCurrent = vHome) and (hCurrent = hHome) then
  36.     return 1
  37.   else
  38.     return 0
  39.   end if
  40. end
  41.  
  42. on getSprite me
  43.   return pSprite
  44. end
  45.  
  46. on show me
  47.   set the castNum of sprite pSprite to pShowCast
  48. end
  49.  
  50. on hide me
  51.   set the castNum of sprite pSprite to pHideCast
  52. end
  53.  
  54. on reveal me
  55.   set the locH of sprite pSprite to -200
  56.   set the locV of sprite pSprite to -200
  57. end
  58.