Пример #1
0
    public void GetInput(ref Vector3 velocity, ref Vector2 input, ref bool jumpRequest)
    {
        switch (state)
        {
        case ai_state.none: break;

        case ai_state.groundpatrol: GroundPatrol(ref input); break;

        case ai_state.chase: Chase(); break;         //add this line in to the GetInput method

        case ai_state.attack: AttackOnRange(); break;

        default: break;
        }

        if (state == ai_state.chase || state == ai_state.groundpatrol)
        {
            _pathAgent.AiMovement(ref velocity, ref input, ref jumpRequest);
        }
    }
Пример #2
0
 public void GetInput(ref Vector3 velocity, ref Vector2 input, ref bool jumpRequest)
 {
     _pathAgent.AiMovement(ref velocity, ref input, ref jumpRequest);
 }