IEnumerator SpriteAnimatorController() { while (true) { TamaguchiState currentState = PopNextState(); switch (currentState) { case TamaguchiState.NORMAL: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(normalStateSprites, 25, true, onNormalClip, 2); break; case TamaguchiState.SAD: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(sadStateSprites, 25, true, onSadClip, 2); break; case TamaguchiState.HAPPY: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(happyStateSprites, 25, true, onHappyClip, 2); break; case TamaguchiState.THANK: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(thankStateSprites, 25, true, onThankClip, 2); break; case TamaguchiState.FULL: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(fullClearStateSprites, 25, true, onFullClearClip, 2); break; case TamaguchiState.CLEAR: tamaguchiAnimation.EnqueueSpritesAndWaitLoopAnimation(fullClearStateSprites, 25, true, onFullClearClip, 2); break; case TamaguchiState.REPEAT: break; } yield return(null); } }