After the zombie enters the Death state within the animator graph, it remains there and cannot revert to any other state. The animator graph simply suspends, without linking to any new state:
Death state
The code is, therefore, pretty simple:
//------------------------------------
public IEnumerator StateDead()
{
//Run dead animation
ThisAnimator.SetInteger("AnimState", (int) ActiveState);
//While in idle state
while(ActiveState == AISTATE.DEAD)
{
yield return null;
}
}
//------------------------------------