Reputation: 357
just after some quick advice on the error below. I have two sprites on the screen running the same action. When one of the sprites is touched that sprite is sent to a method and the action is stopped.
If I touch the other sprite straight after the first, this should be sent to the same method and the action stopped, but when doing this my game crashes and I get the following error.
CCTextureAtlas originalTarget]: unrecognized selector sent to instance 0x15e743c0
I am using
[sprite stopAction:myAction];
to stop the actions. If I only have 1 sprite on the screen at a time, then this works fine, but just not together. Any ideas?
Thanks
Upvotes: 0
Views: 55
Reputation: 18149
You say that the two sprites are running the same action.
CCAction *action = //... Some action
[sprite1 runAction:action];
[sprite2 runAction:action];
Like that? You should never do that. You need two different actions. You're technically stopping the same action twice, which doesn't make much sense.
Upvotes: 1