Okay, every time this animation gets me in trouble, maybe I am not able to understand how to handle it properly.
It's only the dummy code:
The problem is that I am able to see my first Image of bird as well as second (that are part of animation) on the screen when I jump, one below and other one above at the point of jump.This is really funny, but what's wrong? Any idea?
self: addEventListener(Event.TOUCHES_BEGIN, self.whenTouched, self)
self: addEventListener(Event.TOUCHES_END, self.whenuntouched, self)
function Play: whenEntersFrame()
self.subframe = self.subframe + 1
//some code to change value of self.frame
self.myAnim = self.anim[self.frame]
function Play: whenTouched()
x,y = self.myAnim:getPosition()
if self.touchStarted then
speed = -60
self.touchStarted = false
y = y + speed;