Ejemplo n.º 1
0
    private void StartAnimation(Obstacles obs)
    {
        if (obs.get_to_lock_orientation())
        {
            transform.forward = obs.get_orientation_facing(transform.position);
        }

        Obstacles.Fatigue obs_fatigue = obs.get_fatigue();
        fatigue_pool.arms -= obs_fatigue.arms;
        fatigue_pool.core -= obs_fatigue.core;
        fatigue_pool.legs -= obs_fatigue.legs;
        ColorBody();

        string trigger = obs.get_animation_trigger();
        characterRigidbody.isKinematic = true;
        characterCollider.enabled = false;
        targetAnimator.SetTrigger(trigger);
    }