Hi,
I’m coding a side scrolling game. The enemies have a patrol animation on them. this is currently the same animation on each. Is it possible to stop the animation (using animation.Stop(“enemyPatrol”) so that it only stops the animation on the one enemy that the player has come within a certain distance of? Or will I need to make a separate animation for each of the enemies?
1 Answer
1If the enemies are separate GameObjects with separate animation components, you should be able to stop the animation on only one. animation.Stop() is enough.
If you call the animation.Stop on a single enemy, it will only stop that enemy. There is no easy way to globally change animations the way you are talking about here!
– syclamoth