C# 클래스 PantheonPrototype.HamburgerHelper

파일 보기 프로젝트 열기: Bacon41/PantheonPrototype

공개 메소드들

메소드 설명
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.

메소드 상세

AnglesAreNotAngels() 공개 정적인 메소드

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.
리턴 double

DrawLine() 공개 정적인 메소드

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.
리턴 void

GetDirection() 공개 정적인 메소드

public static GetDirection ( Direction direction ) : String
direction Direction
리턴 String

reduceAngle() 공개 정적인 메소드

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

reduceAngle() 공개 정적인 메소드

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
리턴 Direction