Hi everyone, i’m a newbie so please help me, i’m using Legacy Animation, i added Animation Component to my Character and here is my code:
public void damage(int dame)
{
playerhp = playerhp - dame;
rb2d.AddForce (Vector2.up *400);
gameObject.GetComponent<Animation> ().Play ("Stunt");
}
when my Character being damaged it’s will play that Stunt animation but it won’t