Exemplo n.º 1
0
 //向后巡逻
 public void TurnBackward(PatrolWalkAction source)
 {
     source.SetPatrolState(PatrolState.backward);
     source.target += Vector3.back * Random.Range(15, 25);
 }
Exemplo n.º 2
0
 //向右巡逻
 public void TurnRight(PatrolWalkAction source)
 {
     source.SetPatrolState(PatrolState.right);
     source.target += Vector3.right * Random.Range(15, 25);
 }
Exemplo n.º 3
0
 //向前巡逻
 public void TurnForward(PatrolWalkAction source)
 {
     source.SetPatrolState(PatrolState.forward);
     source.target = source.initPos;
 }
Exemplo n.º 4
0
 //向左巡逻
 public void TurnLeft(PatrolWalkAction source)
 {
     source.SetPatrolState(PatrolState.left);
     source.target += Vector3.left * Random.Range(15, 25);
 }