home *** CD-ROM | disk | FTP | other *** search
- property MySprite, MyX, MyY, MydX, MydY, MyStatus
-
- on new me, spr
- MySprite = spr + 10
- MyStatus = #Dead
- return me
- end
-
- on Init me
- global MyChar, Tekst, CastLetter, Gstatus
- if (MyChar <= the number of chars in Tekst) and (Gstatus = #Free) then
- MyX = 680
- MyY = 500
- MydX = 5
- MydY = 15
- MyStatus = #last
- Gstatus = #Full
- sprite(MySprite).member = member(getProp(CastLetter, symbol(Tekst.char[MyChar])), 1)
- sprite(MySprite).loc = point(MyX, MyY)
- MyChar = MyChar + 1
- else
- if MyChar >= the number of chars in Tekst then
- MyChar = 1
- end if
- end if
- end
-
- on Update me
- global Gstatus
- if (MyStatus = #Up) or (MyStatus = #last) then
- if (MyY < 370) and (MyStatus = #last) then
- Gstatus = #Free
- MyStatus = #Up
- end if
- if MyY < 200 then
- MyStatus = #Walking
- end if
- MyY = MyY - 15
- MyX = MyX - MydX
- sprite(MySprite).loc = point(MyX, MyY)
- sprite(MySprite).rotation = (270 - (sin(MyX * 15 * PI / 180) * 50) + MyY) * 4
- end if
- if MyStatus = #Walking then
- if MyX < 55 then
- MyStatus = #Falling
- end if
- MyX = MyX - MydX
- if (MyY - MydY) > 240 then
- if abs(MydY) < 1.5 then
- MydY = 0
- end if
- MydY = MydY * -1
- MyY = 241
- else
- if MydY <> 0 then
- MydY = MydY - (0.29999999999999999 * 9)
- MyY = MyY - MydY
- end if
- end if
- sprite(MySprite).loc = point(MyX, MyY)
- sprite(MySprite).rotation = the mouseH
- end if
- if MyStatus = #Falling then
- if MyY > 500 then
- Init(me)
- end if
- MyX = MyX - MydX
- MyY = MyY + 15
- sprite(MySprite).loc = point(MyX, MyY)
- sprite(MySprite).rotation = (270 - (sin(MyX * 15 * PI / 180) * 50) + MyY) * 4
- end if
- if MyStatus = #Dead then
- Init(me)
- end if
- end
-
- on stepFrame me
- Update(me)
- end
-