xalien95
Developer of Pokémon Omicron
- 72
- Posts
- 14
- Years
- Age 29
- Italy, Monopoly
- Seen Jan 1, 2016
Hello scripters, I'm copying the class AnimatedSprite (in SpriteWindow) to get an animation with a list of frames to be showed (like frame 0,1,2,1,0,3,4,3,etc...).
I edited only the def update at the end of the class in this way:
What I'm missing? It doesn't show me the animation.
Thanks in advance!
I edited only the def update at the end of the class in this way:
Code:
def update
super
if @playing
@realframes+=1
if @realframes==@frameskip*1
self.frame=0
end
if @realframes==@frameskip*2
self.frame=1
end
if @realframes==@frameskip*3
self.frame=2
end
if @realframes==@frameskip*4
self.frame=1
end
if @realframes==@frameskip*5
self.frame=0
end
if @realframes==@frameskip*6
self.frame=3
end
if @realframes==@frameskip*7
self.frame=4
end
if @realframes==@frameskip*8
self.frame=3
end
if @realframes==@frameskip*9
self.frame=0
end
if @realframes==@frameskip*41
@realframes=0
end
end
end
What I'm missing? It doesn't show me the animation.
Thanks in advance!