示例#1
0
 public void Execute()
 {
     Idle();
     if (enemy.Target != null)
     {
         enemy.ChangeState(new PatrolState());
     }
 }
示例#2
0
 public void Execute()
 {
     Patrol();
     enemy.Move();
     if (enemy.Target != null)
     {
         enemy.ChangeState(new RangeState());
     }
 }
示例#3
0
    //private Collision2D Ho;

    public void Execute()
    {
        if (enemy.Target != null)
        {
            enemy.TouchEdge = false;
            enemy.Move();
        }
        else
        {
            enemy.ChangeState(new IdleState());
        }
        enemyAttack();
    }