Esempio n. 1
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        animator.SetBool("Ordering", false);
        npc = animator.GetComponent <NpcAi>();

        if (!npc.orderSprites)
        {
            npc.initiateOrderSprites();
        }

        npc.state = "Ordering";
    }