I am using SceneManager and I have the same background on start scene as well as second level scene.
Here is piece of code:
Now, the problem is that in my second screen "plays", I have many objects on this level, but I want only one of them to move up and down on touch, the object is taken from texture pack and is basically an animation:
If i do self:getPosition and self:setPosition, all the objects in this level change their position, how do I change position of only self.anim[frame] when the user touches the screen?
and then something like this :
self: addEventListener(Event.TOUCHES_BEGIN, self.whenTouched, self)
self: addEventListener(Event.TOUCHES_END, self.whenuntouched, self)
function Play: whenTouched()
function Play: whenuntouched()
x, y= self:getPosition()