C# 클래스 GameGraphics.GraphicsObject

파일 보기 프로젝트 열기: pmyoung/Advanced-Game-Project 1 사용 예제들

공개 메소드들

메소드 설명
GetAngle ( ) : float

Returns the given angle of the object

GetColor ( ) : Color

Returns the actual color that this sprite will be using

GetColorID ( ) : int

Returns the given color ID of the object

GetID ( ) : int

Returns the objects unique ID.

GetRadius ( ) : float

Returns the given radius of the object

GetSpriteID ( ) : int

Returns the given sprite ID of the object

GetX ( ) : float

Returns the given X location

GetY ( ) : float

Returns the given Y location

GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID ) : System

Constructor that accepts all but the colorID as parameters. This is usefull for object that do not need their color pallet changed (all objects other than the players)

GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID, Color color ) : System

Constructor that creates an object with all parameters defined. This version allows the color to be defined through a color object rather than using a default list of colors based on ID.

GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID, int colorID ) : System

This constructor creates a GraphicsObject with all its parameters defined with values

SetAngle ( float a ) : void

Sets the angle of the GraphicsObject

SetColor ( Color color ) : void

Sets the color that the GraphicsObject will use.

SetColor ( int colorID ) : void

Sets the color of the GraphicsObject based on a predefined list of ID's. If the ID is not in the range of the colorID's then it will use the default (White)

SetColorID ( int colorID ) : void
SetID ( int id ) : void

Sets the ID of the GraphicsObject

SetRadius ( float r ) : void

Sets the radius of the GraphicsObject

SetSpriteID ( int spriteID ) : void

Sets the spriteID which will determine what sprite will be used for this object

SetX ( float x ) : void

Sets the X location of the GraphicsObject

SetY ( float y ) : void

Sets the Y location of the GraphicsObject

메소드 상세

GetAngle() 공개 메소드

Returns the given angle of the object
public GetAngle ( ) : float
리턴 float

GetColor() 공개 메소드

Returns the actual color that this sprite will be using
public GetColor ( ) : Color
리턴 Color

GetColorID() 공개 메소드

Returns the given color ID of the object
public GetColorID ( ) : int
리턴 int

GetID() 공개 메소드

Returns the objects unique ID.
public GetID ( ) : int
리턴 int

GetRadius() 공개 메소드

Returns the given radius of the object
public GetRadius ( ) : float
리턴 float

GetSpriteID() 공개 메소드

Returns the given sprite ID of the object
public GetSpriteID ( ) : int
리턴 int

GetX() 공개 메소드

Returns the given X location
public GetX ( ) : float
리턴 float

GetY() 공개 메소드

Returns the given Y location
public GetY ( ) : float
리턴 float

GraphicsObject() 공개 메소드

Constructor that accepts all but the colorID as parameters. This is usefull for object that do not need their color pallet changed (all objects other than the players)
public GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID ) : System
id int the ID of the object this should be unique
x float the x location of the object
y float the y location of the object
radius float the radius of the object
angle float the angle of the object
spriteID int the ID of the sprite the object uses
리턴 System

GraphicsObject() 공개 메소드

Constructor that creates an object with all parameters defined. This version allows the color to be defined through a color object rather than using a default list of colors based on ID.
public GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID, Color color ) : System
id int the ID of the object this should be unique
x float the x location of the object
y float the y location of the object
radius float the radius of the object
angle float the angle of the object
spriteID int the ID of the sprite the object uses
color Color The color object that will be used to change the sprites color
리턴 System

GraphicsObject() 공개 메소드

This constructor creates a GraphicsObject with all its parameters defined with values
public GraphicsObject ( int id, float x, float y, float radius, float angle, int spriteID, int colorID ) : System
id int the ID of the object this should be unique
x float the x location of the object
y float the y location of the object
radius float the radius of the object
angle float the angle of the object
spriteID int the ID of the sprite the object uses
colorID int the ID of the color it wil have (used for the player sprites)
리턴 System

SetAngle() 공개 메소드

Sets the angle of the GraphicsObject
public SetAngle ( float a ) : void
a float the angle to be given to the object
리턴 void

SetColor() 공개 메소드

Sets the color that the GraphicsObject will use.
public SetColor ( Color color ) : void
color Color The color that will be used
리턴 void

SetColor() 공개 메소드

Sets the color of the GraphicsObject based on a predefined list of ID's. If the ID is not in the range of the colorID's then it will use the default (White)
public SetColor ( int colorID ) : void
colorID int the ID value of the color to be used
리턴 void

SetColorID() 공개 메소드

public SetColorID ( int colorID ) : void
colorID int
리턴 void

SetID() 공개 메소드

Sets the ID of the GraphicsObject
public SetID ( int id ) : void
id int the id to be given to the object
리턴 void

SetRadius() 공개 메소드

Sets the radius of the GraphicsObject
public SetRadius ( float r ) : void
r float the radius to be given to the object
리턴 void

SetSpriteID() 공개 메소드

Sets the spriteID which will determine what sprite will be used for this object
public SetSpriteID ( int spriteID ) : void
spriteID int the ID of the sprite to be used
리턴 void

SetX() 공개 메소드

Sets the X location of the GraphicsObject
public SetX ( float x ) : void
x float the X location to be given to the object
리턴 void

SetY() 공개 메소드

Sets the Y location of the GraphicsObject
public SetY ( float y ) : void
y float the Y location to be given to the object
리턴 void