예제 #1
0
 public void fixedUpdate_RandomMovement()
 {
     if (AIMovement.distanceFormStartPoint > 0)
     {
         if (Vector3.Distance(owner.gameObject.transform.position, moveToPosition) <= 2f)
         {
             moveToPosition = startPosition + GMS.randomVector() * AIMovement.distanceFormStartPoint;
             owner.increaseEngineIntensity(-1f);
             owner.increaseEngineIntensity(0.2f);
             turnOnEngines();
         }
         owner.alignTowardsFixedUpdate(moveToPosition);
     }
 }