Exemplo n.º 1
0
    public void Animate(ActionMaster.Action action)
    {
        int pinFall = lastSettledCount - CountStanding();

        lastSettledCount = CountStanding();

        // do stuff with swiper
        if (action == ActionMaster.Action.Tidy)
        {
            animator.SetTrigger("tidyTrigger");
        }
        else if (action == ActionMaster.Action.Reset)
        {
            animator.SetTrigger("resetTrigger");
            pinCounter.ResetLastSettledCount();
        }
        else if (action == ActionMaster.Action.EndTurn)
        {
            animator.SetTrigger("resetTrigger");
            pinCounter.ResetLastSettledCount();
        }
        else if (action == ActionMaster.Action.EndGame)
        {
            throw new UnityException("Don't know how to handle end game yet.");
        }
    }
Exemplo n.º 2
0
 public void triggerAnimation(ActionMaster.Action action)
 {
     if (action == ActionMaster.Action.Tidy)
     {
         animator.SetTrigger("tidyTrigger");
     }
     else if (action == ActionMaster.Action.Reset)
     {
         animator.SetTrigger("resetTrigger");
         pinCounter.ResetLastSettledCount();
     }
     else if (action == ActionMaster.Action.EndTurn)
     {
         animator.SetTrigger("resetTrigger");
         pinCounter.ResetLastSettledCount();
     }
     else if (action == ActionMaster.Action.EndGame)
     {
         throw new UnityException("Don't know how to handle end game yet");
     }
 }