Beispiel #1
0
 protected override void Start()
 {
     base.Start();
     agent              = GetComponent <UnityEngine.AI.NavMeshAgent>();
     m_state            = m_prevState = MOVE_State.IDLE_STATE;
     info               = GetComponent <HeroInfo>();
     prevMousePos       = currMousePos = Input.mousePosition.x;
     currentRot         = transform.rotation.eulerAngles.y;
     SprintingAbility   = false;
     agent.angularSpeed = 0.0f;
 }
Beispiel #2
0
    private void SetState(MOVE_State _state)
    {
        switch (_state)
        {
        case MOVE_State.COMBAT_STATE:
        case MOVE_State.ENGAGE_STATE:
        case MOVE_State.DISENGAGE_STATE:
            m_state = _state;
            break;

        default:
            m_prevState = m_state;
            m_state     = _state;
            break;
        }
    }