Exemple #1
0
    public void SetProfile(AIProfile profile)
    {
        if (!gameObject.activeInHierarchy && m_Profile == null)
        {
            // Defer it
            m_DefaultProfile = profile;
        }
        else
        {
            m_Profile       = profile;
            m_DecisionTimer = 0.0f;

            CharacterMovement movement = GetComponent <CharacterMovement>();
            Debug.Assert(movement != null, "Unable to fetch CharacterMovement");
            movement.ApplySettings(profile);
        }
    }