Exemplo n.º 1
0
 public void ChangeToRandomPerpendicularDirection()
 {
     if (Random.Range(0, 2) == 0)
     {
         ChangeToOppositeDirection();
     }
     direction = direction + ((int)direction % 2 == 0 ? 1 : -1);
 }
Exemplo n.º 2
0
 public void ChangeToOppositeDirection()
 {
     direction = (AvalibleDirection)(((int)direction + 2) % 4);
 }
Exemplo n.º 3
0
 public Direction(AvalibleDirection direction)
 {
     this.direction = direction;
 }