Свойство | Тип | Описание | |
---|---|---|---|
CollisionDetectionMode | CollisionDetectionMode | ||
IsBlendingEnabled | bool |
Метод | Описание | |
---|---|---|
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. |
Результат |
public AddAnimation ( string assetName ) : Sprite | ||
assetName | string | Asset name to use. |
Результат | Sprite |
public Draw ( |
||
batch | Sprite batch | |
Результат | void |
public GameObject ( Vector2 position ) : System | ||
position | Vector2 | |
Результат | System |
public GameObject ( float x, float y ) : System | ||
x | float | |
y | float | |
Результат | System |
public GetBoundingBox ( bool absolute = false ) : |
||
absolute | bool | |
Результат |
public GetCurrentAnimation ( ) : |
||
Результат |
public IsOverlappedWith ( |
||
obj | Object to test against | |
Результат | bool |
public SetAnimation ( |
||
sprite | Animation. | |
Результат | void |
public SetAnimation ( int id, bool restart = false ) : void | ||
id | int | Animation id. |
restart | bool | |
Результат | void |
public CollisionDetectionMode CollisionDetectionMode | ||
Результат | CollisionDetectionMode |