C# 클래스 geek.GameEngine.Visuals.GameObject

The class that describes all active objects in the game that move, animate and interact with the user.
상속: InteractableObject
파일 보기 프로젝트 열기: impworks/xna.geek.engine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CollisionDetectionMode CollisionDetectionMode
IsBlendingEnabled bool

공개 메소드들

메소드 설명
AddAnimation ( string assetName, int frameCount, float frameRate, bool looped = true ) : AnimatedSprite

Create a new animation for the object.

AddAnimation ( string assetName ) : Sprite

Creates a new static animation frame for the object.

Draw ( SpriteBatch batch ) : void

Draws the current animation frame to screen.

GameObject ( ) : System
GameObject ( Vector2 position ) : System
GameObject ( float x, float y ) : System
GetBoundingBox ( bool absolute = false ) : Rectangle

Returns the bounding box for the object. The current sprite is used. The bounding box does not take transparency into account.

GetCurrentAnimation ( ) : SpriteBase

Returns the current animation that is played.

IsOverlappedWith ( InteractableObject obj ) : bool

Smart collision detection allowing for pixel-perfect collisions.

SetAnimation ( SpriteBase sprite ) : void

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.

메소드 상세

AddAnimation() 공개 메소드

Create a new animation for the object.
public AddAnimation ( string assetName, int frameCount, float frameRate, bool looped = true ) : AnimatedSprite
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.
리턴 geek.GameEngine.Sprites.AnimatedSprite

AddAnimation() 공개 메소드

Creates a new static animation frame for the object.
public AddAnimation ( string assetName ) : Sprite
assetName string Asset name to use.
리턴 Sprite

Draw() 공개 메소드

Draws the current animation frame to screen.
public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Sprite batch
리턴 void

GameObject() 공개 메소드

public GameObject ( ) : System
리턴 System

GameObject() 공개 메소드

public GameObject ( Vector2 position ) : System
position Vector2
리턴 System

GameObject() 공개 메소드

public GameObject ( float x, float y ) : System
x float
y float
리턴 System

GetBoundingBox() 공개 메소드

Returns the bounding box for the object. The current sprite is used. The bounding box does not take transparency into account.
public GetBoundingBox ( bool absolute = false ) : Rectangle
absolute bool
리턴 Microsoft.Xna.Framework.Rectangle

GetCurrentAnimation() 공개 메소드

Returns the current animation that is played.
public GetCurrentAnimation ( ) : SpriteBase
리턴 geek.GameEngine.Sprites.SpriteBase

IsOverlappedWith() 공개 메소드

Smart collision detection allowing for pixel-perfect collisions.
public IsOverlappedWith ( InteractableObject obj ) : bool
obj InteractableObject Object to test against
리턴 bool

SetAnimation() 공개 메소드

Set the current animation and play it.
public SetAnimation ( SpriteBase sprite ) : void
sprite geek.GameEngine.Sprites.SpriteBase Animation.
리턴 void

SetAnimation() 공개 메소드

Set the current animation and play it.
public SetAnimation ( int id, bool restart = false ) : void
id int Animation id.
restart bool
리턴 void

Update() 공개 메소드

Update the current animation.
public Update ( ) : void
리턴 void

프로퍼티 상세

CollisionDetectionMode 공개적으로 프로퍼티

The collision detection mode.
public CollisionDetectionMode CollisionDetectionMode
리턴 CollisionDetectionMode

IsBlendingEnabled 공개적으로 프로퍼티

Activate blendable animations' blending mode?
public bool IsBlendingEnabled
리턴 bool