Ejemplo n.º 1
0
 void RandomMovement()
 {
     if (Random.value < chanceToChangeDirection)
     {
         int m = Random.Range(0, 4);
         movementDirection = (Globals.Direction)m;
     }
     entity.Move(movementDirection);
 }