Animator anim;
int inputNum;
public IEnumerator PlayAnims()
{
switch (inputNum)
{
case 1:
anim.Play("1");
Debug.Log("1");
yield return new WaitForSeconds(1);
break;
case 2:
anim.Play("2");
Debug.Log("2");
yield return new WaitForSeconds(1);
break;
case 3:
anim.Play("3");
Debug.Log("3");
yield return new WaitForSeconds(1);
break;
}
}
So the idea is that it should only play one animation at a time for 1 second then play the next one for 1 second etc. If it gets multiple inputs at once it picks the one which was first, like a queue, so if the input is 2,1,2,3 then they play those animations in that order 1 second at a time before the next animation starts.