Click or drag to resize
SpriteEntity Class
A sprite entity (3d quad that always faces camera and plays animation from spritesheet texture file).
Inheritance Hierarchy

Namespace:  GeonBit.Core.Graphics
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class SpriteEntity : BaseRenderableEntity

The SpriteEntity type exposes the following members.

Constructors
  NameDescription
Public methodSpriteEntity(SpriteSheet, MaterialAPI)
Create the sprite entity.
Public methodSpriteEntity(SpriteSheet, Texture2D, Boolean)
Create the sprite entity from texture and default material.
Top
Properties
  NameDescription
Public propertyCameraDistanceBias
Add bias to distance from camera when sorting by distance from camera. This is useful for particles, sprites etc.
(Inherited from BaseRenderableEntity.)
Public propertyIsDebugEntity
If true, this entity will only show in debug / editor mode.
(Inherited from BaseRenderableEntity.)
Public propertyMaterial
Get / set sprite material.
Public propertySpritesheet
Get the spritesheet this sprite entity currently uses.
Public propertyVisible
Get / Set if this entity is visible.
(Inherited from BaseRenderableEntity.)
Public propertyWireFrame
If true, will draw just the wireframe of the entity. Note: settings this property will change the rendering queue property.
(Inherited from BaseRenderableEntity.)
Top
Methods
  NameDescription
Public methodChangeSpritesheet
Change the spritesheet and current step of this sprite.
Public methodCopyStep
Copy spritesheet step from other sprite.
Public methodDoEntityDraw
Draw this model.
(Overrides BaseRenderableEntityDoEntityDraw(Matrix).)
Public methodDraw
Draw the entity.
(Inherited from BaseRenderableEntity.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetBoundingBox
Get the bounding box of this entity, either from cache or calculate it.
(Inherited from BaseRenderableEntity.)
Public methodGetBoundingSphere
Get the bounding sphere of this entity, either from cache or calculate it.
(Inherited from BaseRenderableEntity.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLastBoundingBox
Return the last calculated bounding box. Note: this value may be out-of-date if transformations changed since last calculation.
(Inherited from BaseRenderableEntity.)
Public methodGetLastBoundingSphere
Return the last calculated bounding sphere. Note: this value may be out-of-date if transformations changed since last calculation.
(Inherited from BaseRenderableEntity.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodPlayAnimation
Play animation clip.
Public methodSetStep(Int32)
Set spritesheet step from index.
Public methodSetStep(String)
Set spritesheet step from string identifier.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update animations if currently playing.
Top
Fields
  NameDescription
Public fieldBlendingState
Blending state for this entity.
(Inherited from BaseRenderableEntity.)
Public fieldFaceCamera
If true, will always face camera. If false will just use node's rotation.
Public fieldLockedAxis
Optional axis to constrain rotation to.
Public fieldMaterialOverride
Optional custom render settings for this specific sprite instance. These settings will override some of the material's properties before rendering. Note: this method is much less efficient than using different materials.
Public fieldOnAnimationEnd
Callback to call whenever sprite animation cycle ends (when using animation clips).
Public fieldRenderingQueue
Which rendering queue to use for this entity. Rendering queues determine different rendering settings (like opacity support, blending, sorting etc) + the order in which the entities are drawn.
(Inherited from BaseRenderableEntity.)
Top
See Also