home *** CD-ROM | disk | FTP | other *** search
- property ancestor, myName, myNumFrames, myCounter, myDistance, myAngle, myVelocity, endOfGameFlag
-
- on new me, type, numFrames, newDistance, newAngle, newVelocity, endFlag
- set ancestor to new(script "spriteGenerator")
- set myCounter to 0
- set myName to the memberNum of member type
- set myNumFrames to numFrames - 1
- set myDistance to newDistance
- set myAngle to newAngle
- set myVelocity to newVelocity
- set endOfGameFlag to endFlag
- append(the actorList, me)
- return me
- end
-
- on stepFrame me
- animate(me)
- move(me)
- end
-
- on animate me
- set myCounter to myCounter + 1
- if myCounter > myNumFrames then
- if endOfGameFlag then
- go("win")
- end if
- destroy(me)
- else
- set the memberNum of sprite the spriteNum of me to myName + myCounter
- end if
- end
-
- on move me
- set myVelocity to myVelocity / 1.10000000000000009
- set myDistance to myDistance - myVelocity
- set the loc of sprite the spriteNum of me to getLoc(myAngle, myDistance)
- end
-
- on smallExplode me, member, myDeficit
- set startposition to the loc of sprite the spriteNum of me
- set explosion to new(script "explosionScript", member, 20, myDistance, myAngle + myDeficit, myVelocity, 0)
- appear(explosion, startposition, member, 255, 0, 30)
- end
-