Esempio n. 1
0
    protected override void SetAI()
    {
        Vector3 newDest = new Vector3();

        newDest.x          = myPosition.position.x + CustomHelpers.GetRandomValue(-2, 2);
        newDest.y          = myPosition.position.y + CustomHelpers.GetRandomValue(-2, 2);
        aIPath.destination = newDest;
    }
Esempio n. 2
0
 protected override void Patrol()
 {
     if (aIPath.reachedEndOfPath)
     {
         Vector3 newDest = new Vector3();
         newDest.x          = myPosition.position.x + CustomHelpers.GetRandomValue(-2, 2);
         newDest.y          = myPosition.position.y + CustomHelpers.GetRandomValue(-2, 2);
         aIPath.destination = newDest;
     }
 }