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)
    {
        speedDronMB.agent.Stop();
        speedDronMB.GetComponent <CapsuleCollider>().enabled = false;
        Char player = GameObject.Find("ThirdPersonController").GetComponent <Char>();

        player.AddExperience(speedDronMB.expValue);
        Destroy(speedDronMB.gameObject, 3);
    }