home *** CD-ROM | disk | FTP | other *** search
- property pObjectSpeed, pObjectPosition, pVelocity, pGoodObject, pChannel, pSpriteName, pFrame, pFrameTimer
-
- on new me, thePosition, theVelocity, goodObject, theName, theChannel
- pFrame = 1
- pFrameTimer = the ticks
- pSpriteName = theName
- pGoodObject = goodObject
- pVelocity = theVelocity
- pObjectPosition = thePosition
- pChannel = theChannel
- sprite(pChannel).puppet = 1
- sprite(pChannel).member = string(pSpriteName) & "1"
- sprite(pChannel).loc = pObjectPosition
- sprite(pChannel).ink = 36
- return me
- end
-
- on updateObject me
- if (pFrameTimer + 8) < the ticks then
- pFrameTimer = the ticks
- pFrame = pFrame + 1
- if pFrame > 2 then
- pFrame = 1
- end if
- sprite(pChannel).member = string(pSpriteName) & string(pFrame)
- end if
- if sprite(pChannel).puppet = 0 then
- exit
- end if
- pObjectPosition[2] = pObjectPosition[2] + pVelocity
- sprite(pChannel).loc = pObjectPosition
- end
-
- on killObject me
- sprite(pChannel).puppet = 0
- end
-