示例#1
0
    protected override void UpdateState()
    {
        if (Vector2.Distance(Player.transform.position, transform.position) < ViewRange)
        {
            State = AIState.FIRING;
        }
        else
        {
            State = AIState.WAITING;
        }

        switch (State)
        {
        case AIState.WAITING:



            break;

        case AIState.FIRING:

            RotateTowards(Player.transform.position);

            CharacterRef.Fire();

            break;
        }
    }
示例#2
0
 public void Fire()
 {
     CharacterRef.Fire();
 }