C# 클래스 Platformer.PrimitiveLine

A class to make primitive 2D objects out of lines.
파일 보기 프로젝트 열기: zmthy/play-dead

공개 프로퍼티들

프로퍼티 타입 설명
Colour Color
Depth float
Position Vector2

공개 메소드들

메소드 설명
AddVector ( Vector2 vector ) : void

Adds a vector to the primive live object.

ClearVectors ( ) : void

Clears all vectors from the primitive line object.

CreateCircle ( float radius, int sides ) : void

Creates a circle starting from 0, 0.

InsertVector ( int index, Vector2 vector ) : void

Insers a vector into the primitive line object.

PrimitiveLine ( GraphicsDevice graphicsDevice ) : System

Creates a new primitive line object.

RemoveVector ( Vector2 vector ) : void

Removes a vector from the primitive line object.

RemoveVector ( int index ) : void

Removes a vector from the primitive line object.

Render ( SpriteBatch spriteBatch ) : void

Renders the primtive line object.

메소드 상세

AddVector() 공개 메소드

Adds a vector to the primive live object.
public AddVector ( Vector2 vector ) : void
vector Vector2 The vector to add.
리턴 void

ClearVectors() 공개 메소드

Clears all vectors from the primitive line object.
public ClearVectors ( ) : void
리턴 void

CreateCircle() 공개 메소드

Creates a circle starting from 0, 0.
public CreateCircle ( float radius, int sides ) : void
radius float The radius (half the width) of the circle.
sides int The number of sides on the circle (the more the detailed).
리턴 void

InsertVector() 공개 메소드

Insers a vector into the primitive line object.
public InsertVector ( int index, Vector2 vector ) : void
index int The index to insert it at.
vector Vector2 The vector to insert.
리턴 void

PrimitiveLine() 공개 메소드

Creates a new primitive line object.
public PrimitiveLine ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice The Graphics Device object to use.
리턴 System

RemoveVector() 공개 메소드

Removes a vector from the primitive line object.
public RemoveVector ( Vector2 vector ) : void
vector Vector2 The vector to remove.
리턴 void

RemoveVector() 공개 메소드

Removes a vector from the primitive line object.
public RemoveVector ( int index ) : void
index int The index of the vector to remove.
리턴 void

Render() 공개 메소드

Renders the primtive line object.
public Render ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The sprite batch to use to render the primitive line object.
리턴 void

프로퍼티 상세

Colour 공개적으로 프로퍼티

Gets/sets the colour of the primitive line object.
public Color Colour
리턴 Color

Depth 공개적으로 프로퍼티

Gets/sets the render depth of the primitive line object (0 = front, 1 = back)
public float Depth
리턴 float

Position 공개적으로 프로퍼티

Gets/sets the position of the primitive line object.
public Vector2 Position
리턴 Vector2