Свойство | Type | Description | |
---|---|---|---|
CollisionDetectionMode | CollisionDetectionMode | ||
IsBlendingEnabled | bool |
Méthode | Description | |
---|---|---|
AddAnimation ( string assetName, int frameCount, float frameRate, bool looped = true ) : |
Create a new animation for the object.
|
|
AddAnimation ( string assetName ) : Sprite |
Creates a new static animation frame for the object.
|
|
Draw ( |
Draws the current animation frame to screen.
|
|
GameObject ( ) : System | ||
GameObject ( Vector2 position ) : System | ||
GameObject ( float x, float y ) : System | ||
GetBoundingBox ( bool absolute = false ) : |
Returns the bounding box for the object. The current sprite is used. The bounding box does not take transparency into account.
|
|
GetCurrentAnimation ( ) : |
Returns the current animation that is played.
|
|
IsOverlappedWith ( |
Smart collision detection allowing for pixel-perfect collisions.
|
|
SetAnimation ( |
Set the current animation and play it.
|
|
SetAnimation ( int id, bool restart = false ) : void |
Set the current animation and play it.
|
|
Update ( ) : void |
Update the current animation.
|
public AddAnimation ( string assetName, int frameCount, float frameRate, bool looped = true ) : |
||
assetName | string | Asset name to use as texture. |
frameCount | int | Number of frames in the animation. |
frameRate | float | Frame rate. |
looped | bool | Loop animation flag. |
Résultat |
public AddAnimation ( string assetName ) : Sprite | ||
assetName | string | Asset name to use. |
Résultat | Sprite |
public Draw ( |
||
batch | Sprite batch | |
Résultat | void |
public GameObject ( Vector2 position ) : System | ||
position | Vector2 | |
Résultat | System |
public GameObject ( float x, float y ) : System | ||
x | float | |
y | float | |
Résultat | System |
public GetBoundingBox ( bool absolute = false ) : |
||
absolute | bool | |
Résultat |
public GetCurrentAnimation ( ) : |
||
Résultat |
public IsOverlappedWith ( |
||
obj | Object to test against | |
Résultat | bool |
public SetAnimation ( |
||
sprite | Animation. | |
Résultat | void |
public SetAnimation ( int id, bool restart = false ) : void | ||
id | int | Animation id. |
restart | bool | |
Résultat | void |
public CollisionDetectionMode CollisionDetectionMode | ||
Résultat | CollisionDetectionMode |