Commit 68d234bf authored by Eby Komenan's avatar Eby Komenan

Birb.cs works

parent cb2279c5
......@@ -25,6 +25,7 @@ public class Birb : AbstractBehavior {
Hurt
//Add the necessary animation states.
}
AnimState state;
bool enemyHit;
......@@ -36,18 +37,11 @@ public class Birb : AbstractBehavior {
{
ContinueState ();
}
IEnumerator ExecuteAfterTime(float time)
{
yield return new WaitForSeconds(time);
animator.Play (hurtAnim);
Die ();
}
public void Die()
{
GameManager.Instance.fail ();
//SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
animator.Play (hurtAnim);
GameManager.instance.Fail ();
}
//Determines if the animation state must change.
......@@ -87,13 +81,6 @@ public class Birb : AbstractBehavior {
case AnimState.Dashing:
animator.Play (dashAnim);
break;
/*
case AnimState.Hurt:
animator.Play (hurtAnim);
StartCoroutine (ExecuteAfterTime (3.0f));
break;
*/
}
this.state = state;
}
......@@ -148,7 +135,4 @@ public class Birb : AbstractBehavior {
return false;
return true;
}
public
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment