home *** CD-ROM | disk | FTP | other *** search
/ Encyklopedia Omnia / Planeta.iso / data / a_gen.dir / 00057_catenaDragger.ls < prev    next >
Encoding:
Text File  |  2000-11-14  |  1.6 KB  |  60 lines

  1. property nsIntersector, origLoc, draggedSprite, corretto, maxErrori
  2. global gNumErrori
  3.  
  4. on beginSprite
  5.   set draggedSprite to the currentSpriteNum
  6.   set gNumErrori to 0
  7.   set the cursor of sprite draggedSprite to [member "palmo", member "palmo_m"]
  8. end
  9.  
  10. on tastoGiu
  11.   set draggedSprite to the currentSpriteNum
  12.   if the moveableSprite of sprite draggedSprite = 1 then
  13.     set the cursor of sprite draggedSprite to [member "pugno", member "pugno_m"]
  14.     set origLoc to the loc of sprite draggedSprite
  15.   end if
  16. end
  17.  
  18. on tastoSu
  19.   if the moveableSprite of sprite draggedSprite = 1 then
  20.     if sprite draggedSprite intersects sprite(nsIntersector) and (corretto = #si) then
  21.       set the cursor of sprite draggedSprite to 0
  22.       set the loc of sprite draggedSprite to nsIntersector
  23.       set the moveableSprite of sprite draggedSprite to 0
  24.       updateStage()
  25.       puppetSound(2, "Subping")
  26.       go(marker(2))
  27.     else
  28.       puppetSound(1, "H_si")
  29.       set gNumErrori to gNumErrori + 1
  30.       set the cursor of sprite draggedSprite to [member "palmo", member "palmo_m"]
  31.       set the loc of sprite draggedSprite to origLoc
  32.       updateStage()
  33.       if gNumErrori > maxErrori then
  34.         go(#next)
  35.       end if
  36.     end if
  37.   end if
  38. end
  39.  
  40. on mouseUp
  41.   tastoSu()
  42. end
  43.  
  44. on mouseDown
  45.   tastoGiu()
  46. end
  47.  
  48. on rightMouseUp
  49.   tastoSu()
  50. end
  51.  
  52. on rightMouseDown
  53.   tastoGiu()
  54. end
  55.  
  56. on getPropertyDescriptionList
  57.   set p_list to [#nsIntersector: [#comment: "Sprite Intersector:", #format: #integer, #default: 16], #corretto: [#comment: "Esatto?", #format: #symbol, #range: [#si, #no], #default: #no], #maxErrori: [#comment: "Max errori:", #format: #integer, #default: 2]]
  58.   return p_list
  59. end
  60.