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; }
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; } }