Conversion constructor: takes a direction of the game and turns it into a vector.
- Parameters:
-
| d | The game direction class(namely south,east,west...) |
Definition at line 37 of file HeadingVector.cs.
{
switch (d)
{
case Direction.NORTH:
X = 0;
Y = -1;
break;
case Direction.EAST:
X = 1;
Y = 0;
break;
case Direction.SOUTH:
X = 0;
Y = 1;
break;
case Direction.WEST:
X = -1;
Y = 0;
break;
default:
X = 0;
Y = 0;
break;
}
}