home *** CD-ROM | disk | FTP | other *** search
- property firstSlotNS, voidCrop, nsIntersector, origLoc, draggedSprite, maxErrori
- global gNumErrori, gListaEsatti, gCurrentStartCrop, gCropList, gCanClick
-
- on beginSprite
- set draggedSprite to the currentSpriteNum
- set the cursor of sprite draggedSprite to [member "palmo", member "palmo_m"]
- end
-
- on tastoGiu
- set draggedSprite to the currentSpriteNum
- if the moveableSprite of sprite draggedSprite and gCanClick then
- set the cursor of sprite draggedSprite to [member "pugno", member "pugno_m"]
- set origLoc to the loc of sprite draggedSprite
- end if
- end
-
- on tastoSu
- if the moveableSprite of sprite draggedSprite and gCanClick then
- if sprite draggedSprite intersects sprite(nsIntersector) then
- set nm to the name of member the member of sprite draggedSprite
- if getPos(gListaEsatti, nm) <> 0 then
- puppetSound(1, "Subping")
- deleteOne(gListaEsatti, nm)
- set newLoc to the loc of sprite draggedSprite
- set newSprite to 34 - count(gListaEsatti) + 1
- set the member of sprite newSprite to the member of sprite draggedSprite
- set the loc of sprite newSprite to newLoc
- set the member of sprite draggedSprite to member voidCrop
- set the loc of sprite draggedSprite to origLoc
- set the moveableSprite of sprite draggedSprite to 0
- set p to getPos(gCropList, nm)
- setAt(gCropList, p, EMPTY)
- updateStage()
- if count(gListaEsatti) = 0 then
- go(marker(2))
- end if
- else
- puppetSound(1, "H_si")
- set gNumErrori to gNumErrori + 1
- set the cursor of sprite draggedSprite to [member "palmo", member "palmo_m"]
- set the loc of sprite draggedSprite to origLoc
- updateStage()
- if gNumErrori > maxErrori then
- go(#next)
- end if
- end if
- else
- puppetSound(1, "pswitch")
- set the cursor of sprite draggedSprite to [member "palmo", member "palmo_m"]
- set the loc of sprite draggedSprite to origLoc
- updateStage()
- end if
- end if
- end
-
- on mouseDown
- tastoGiu()
- end
-
- on rightMouseDown
- tastoGiu()
- end
-
- on mouseUp
- tastoSu()
- end
-
- on rightMouseUp
- tastoSu()
- end
-
- on getPropertyDescriptionList
- set d to [:]
- addProp(d, #firstSlotNS, [#default: 15, #format: #integer, #comment: "Numero canale primo slot:"])
- addProp(d, #voidCrop, [#default: "voidCrop", #format: #string, #comment: "Nome del crop fittizio:"])
- addProp(d, #nsIntersector, [#comment: "Sprite Intersector:", #format: #integer, #default: 13])
- addProp(d, #maxErrori, [#comment: "Max errori:", #format: #integer, #default: 5])
- return d
- end
-