Пример #1
0
    public override void AI()
    {
        if (target != null)
        {
            dis = Vector3.Distance(target.transform.position, characterObj.transform
                                   .position);
        }

        switch (_state)
        {
        case State.Stay:
            character.EndAction();


            break;

        case State.Move:
            character.Move();
            break;

        case State.MoveB:
            character.MoveBack();
            break;

        case State.Chase:
            Chase();
            break;

        case State.Fight:
            Fight();

            break;
        }
    }
Пример #2
0
 public void EndAction()
 {
     character.EndAction();
 }