C# Class PantheonPrototype.HamburgerHelper

Mostrar archivo Open project: Bacon41/PantheonPrototype

Public Methods

Method Description
AnglesAreNotAngels ( Direction direction ) : double

Converts a direction constant into an angle in pi/4 increments. (Note: no pamphlets or door-to-door missionaries are used in the conversion of the direction.)

DrawLine ( SpriteBatch batch, Microsoft.Xna.Framework.Graphics.Texture2D blank, float width, Color color, Vector2 point1, Vector2 point2 ) : void

The method to draw the lines for the level edging.

GetDirection ( Direction direction ) : String
reduceAngle ( Vector2 direction ) : Direction

Reduces the passed vector into one of 8 directions.

reduceAngle ( double angle ) : Direction

Reduces the passed 0 to 2pi degree angle to one of 8 directions.

Method Details

AnglesAreNotAngels() public static method

Converts a direction constant into an angle in pi/4 increments. (Note: no pamphlets or door-to-door missionaries are used in the conversion of the direction.)
public static AnglesAreNotAngels ( Direction direction ) : double
direction Direction The directional constant in need of conversion.
return double

DrawLine() public static method

The method to draw the lines for the level edging.
public static DrawLine ( SpriteBatch batch, Microsoft.Xna.Framework.Graphics.Texture2D blank, float width, Color color, Vector2 point1, Vector2 point2 ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch The object that allows the drawing.
blank Microsoft.Xna.Framework.Graphics.Texture2D A Texture2D for iteration over the line.
width float The thickness of the line.
color Color The color of the line.
point1 Vector2 The start point for the line.
point2 Vector2 The end point for the line.
return void

GetDirection() public static method

public static GetDirection ( Direction direction ) : String
direction Direction
return String

reduceAngle() public static method

Reduces the passed vector into one of 8 directions.
public static reduceAngle ( Vector2 direction ) : Direction
direction Vector2 A vector indicating the direction to reduce.
return Direction

reduceAngle() public static method

Reduces the passed 0 to 2pi degree angle to one of 8 directions.
public static reduceAngle ( double angle ) : Direction
angle double An angle between 0 and 2pi
return Direction