I am workinj on ninja endless runner game.
I already got my ninja running and jumping and I get the blocks and enemies created randomly on random distance and stuff. So the fact that the enemie jumps from one block to another and tries to attack my ninja n stuff.
Now what I want to do is:
1. When ninja punches the enemy - enemy destroy animation plays - enemy dies.
2. When enemy punches ninja - ninja destroy animation plays - ninja dies - layer restarts.
Everything is working but sometimes the destroy animation plays and ninja keeps running, or enemy keeps running.
I tried to destroy the character on animation playing or on 'punch button' pressed or down, nothing works perfectly.
Maybe the problem is that my enemy appears randomly and there might be two or three same enemies on screen at the same time, I dont know.
Let me know what might be the problem I can post screenshots too