C# Class PantheonPrototype.HamburgerHelper

Afficher le fichier Open project: Bacon41/PantheonPrototype

Méthodes publiques

Méthode 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 méthode

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.
Résultat double

DrawLine() public static méthode

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.
Résultat void

GetDirection() public static méthode

public static GetDirection ( Direction direction ) : String
direction Direction
Résultat String

reduceAngle() public static méthode

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

reduceAngle() public static méthode

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
Résultat Direction