메소드 | 설명 | |
---|---|---|
GetFrameHeight ( ) : int |
Gets the height of the animation frame
|
|
GetFrameWidth ( ) : int |
Gets the width of the animation frame
|
|
GetSprite ( ) : Microsoft.Xna.Framework.Graphics.Texture2D |
Gets the image the sprite uses
|
|
GetSpriteType ( ) : string |
Gets the type of object this sprite should be used for
|
|
Render ( |
Renders the given GraphicsObject
|
|
Render ( |
Render method that all overloads call.
|
|
Render ( |
Render this overload allows basic rendering of a sprite that has circular properties.
|
|
SetFrameHeight ( int height ) : void |
Sets the height of each frame of animation
|
|
SetFrameWidth ( int width ) : void |
Sets how wide each frame of animation is
|
|
SetSprite ( Microsoft.Xna.Framework.Graphics.Texture2D sprite ) : void |
Sets the image that this sprite will use
|
|
SetSpriteType ( string type ) : void |
Sets the type of sprite that this image will be used with
|
|
Sprite ( Microsoft.Xna.Framework.Graphics.Texture2D sprite, int frameWidth, int frameHeight, string type ) : System |
The Sprite Constructor that requires a Texture2D object (image file), and the type of object (like ship, planet).
|
|
setFrameRectangle ( int width, int height ) : void |
Sets the width and height of each frame of animation
|
public GetSprite ( ) : Microsoft.Xna.Framework.Graphics.Texture2D | ||
리턴 | Microsoft.Xna.Framework.Graphics.Texture2D |
public Render ( |
||
spriteBatch | Contains graphics contexts for rendering on the game screen | |
obj | The GraphicsObject that is to be rendered | |
리턴 | void |
public Render ( |
||
spriteBatch | Contains graphics contexts for rendering on the game screen | |
bounds | The region of the screen the sprite will be drawn at | |
color | Color | Changes the color of the sprite |
rotation | float | The amount to rotate the sprite in radians |
origin | Vector2 | The point on the sprite that is used as the center of rotation |
effect | SpriteEffects | Chosen sprite mirroring option (like None, FlipHorizontally) |
layer | float | Represents the depth 0 front of layer 1 back of layer |
action | int | Integer representing what "action" of the sprite to display |
frame | int | Integer representing what "frame" of the action animation to display |
리턴 | void |
public Render ( |
||
spriteBatch | Contains graphics contexts for rendering on the game screen | |
x | int | The left-right/west-east location of the sprite |
y | int | The up-down/north-south location of the sprite |
radius | int | The radius of the "circle" |
color | Color | Changes the color of the sprite |
angle | int | The angle of the sprite in degrees |
layer | float | Represents the depth 0 front of layer 1 back of layer |
action | int | Integer representing what "action" of the sprite to display |
frame | int | Integer representing what "frame" of the action animation to display |
리턴 | void |
public SetFrameHeight ( int height ) : void | ||
height | int | The height of the animation frame |
리턴 | void |
public SetFrameWidth ( int width ) : void | ||
width | int | The width of the animation frame |
리턴 | void |
public SetSprite ( Microsoft.Xna.Framework.Graphics.Texture2D sprite ) : void | ||
sprite | Microsoft.Xna.Framework.Graphics.Texture2D | The image that will be used for the sprite |
리턴 | void |
public SetSpriteType ( string type ) : void | ||
type | string | The type of object this sprite is used for |
리턴 | void |
public Sprite ( Microsoft.Xna.Framework.Graphics.Texture2D sprite, int frameWidth, int frameHeight, string type ) : System | ||
sprite | Microsoft.Xna.Framework.Graphics.Texture2D | sprite The image that the sprite will use |
frameWidth | int | The width of each frame of animation on the sprite |
frameHeight | int | The height of each frame of animation on the sprite |
type | string | type The type of sprite (like Ship, Planet) |
리턴 | System |
public setFrameRectangle ( int width, int height ) : void | ||
width | int | The width of the animation frame |
height | int | The height of the animation frame |
리턴 | void |