SpineSkeleton ClassDelta Engine Documentation
Allows the creation of animated moving 2D sprites with skeletons and bone animations. To use this you will need a Spine license and Spine Creation tool from: http://esotericsoftware.com/ For details of how to use Spine within the Delta Engine see: http://deltaengine.net/spine View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Entities DrawableEntity
      DeltaEngine.Rendering2D Entity2D
        DeltaEngine.Rendering2D.Spine SpineSkeleton

Namespace: DeltaEngine.Rendering2D.Spine
Assembly: DeltaEngine.Rendering2D.Spine (in DeltaEngine.Rendering2D.Spine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class SpineSkeleton : Entity2D, 
	RapidUpdateable

The SpineSkeleton type exposes the following members.

Constructors

  NameDescription
Public methodSpineSkeleton(String, String, Rectangle)
Initializes a new instance of the SpineSkeleton class
Public methodSpineSkeleton(String, String, Vector2D)
Initializes a new instance of the SpineSkeleton class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity2D.)
Public methodAddAnimation(String, Single, Int32)
Public methodAddAnimation(String, Action, Single, Int32)
Public methodAddAnimationLooped
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity2D.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDefineAnimationMix
Public methodDispose (Overrides Entity Dispose .)
Public methodGet T  (Inherited from Entity2D.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Public methodGetComponentsForEditing (Inherited from Entity2D.)
Protected methodGetComponentsForSaving (Inherited from Entity2D.)
Protected methodGetDrawBehaviors (Inherited from DrawableEntity.)
Public methodGetInterpolatedArray T  (Inherited from DrawableEntity.)
Public methodGetInterpolatedList T  (Inherited from DrawableEntity.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Protected methodNextUpdateStarted (Inherited from Entity2D.)
Public methodOnDraw T  (Inherited from DrawableEntity.)
Protected methodOnPositionChanged (Inherited from Entity2D.)
Protected methodOnRotationChanged (Inherited from Entity2D.)
Public methodRapidUpdate
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodRotatedDrawAreaContains (Inherited from Entity2D.)
Public methodSet (Inherited from Entity2D.)
Public methodSetAnimation(String, Int32)
Public methodSetAnimation(String, Action, Int32)
Public methodSetAnimationLooped
Public methodSetComponents (Inherited from Entity.)
Public methodSetWithoutInterpolation T  (Inherited from Entity2D.)
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToggleVisibility (Inherited from DrawableEntity.)
Public methodToString (Inherited from Entity.)
Top
Extension Methods

  NameDescription
Public Extension MethodAffixToPhysics (Defined by Entity2DPhysicsExtensions.)
Public Extension MethodStartBouncingOffScreenEdges (Defined by Entity2DExtensions.)
Public Extension MethodStartFalling (Defined by Entity2DExtensions.)
Public Extension MethodStartMoving (Defined by Entity2DExtensions.)
Public Extension MethodStartRotating (Defined by Entity2DExtensions.)
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Protected fieldlastTickLerpComponents
Each element can either be a Lerp, a Lerp List or an array of Lerp objects. View code on GitHub
(Inherited from DrawableEntity.)
Top
Properties

  NameDescription
Public propertyAlpha (Inherited from Entity2D.)
Public propertyCenter (Inherited from Entity2D.)
Public propertyColor (Inherited from Entity2D.)
Public propertyDidFootprintChange (Inherited from Entity2D.)
Public propertyDrawArea (Inherited from Entity2D.)
Public propertyFlipMode
Public propertyIsActive (Inherited from DrawableEntity.)
Public propertyIsPauseable (Inherited from Entity.)
Public propertyIsVisible (Inherited from DrawableEntity.)
Public propertyLastColor (Inherited from Entity2D.)
Public propertyLastDrawArea (Inherited from Entity2D.)
Public propertyLastOriginAndScale
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyOrigin
Public propertyOriginAndScale
Public propertyRenderLayer (Inherited from DrawableEntity.)
Public propertyRotation (Inherited from Entity2D.)
Public propertyRotationCenter (Inherited from Entity2D.)
Public propertyScale
Public propertySize (Inherited from Entity2D.)
Public propertyTopLeft (Inherited from Entity2D.)
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

Tests: DeltaEngine.Rendering2D.Spine.Tests.SpineSkeletonTests
Examples

23 unit tests call DeltaEngine.Rendering2D.Spine.SpineSkeleton
[Test, ApproveFirstFrameScreenshot]
public void DrawSpineboyWalkingToRightEdge()
{
    spineboy.DefineAnimationMix("walk", "jump", 0.2f);
    spineboy.DefineAnimationMix("jump", "walk", 0.4f);
    new Command(Jump).Add(new MouseButtonTrigger());
    spineboy.Start<Moving>();
    new FontText(Font.Default, "Click mouse to make Spineboy jump",
        Rectangle.FromCenter(0.5f, 0.25f, 1.0f, 0.1f));
}
[Test]
public void DrawSpineboyWalkingLeft()
{
    Assert.AreEqual(FlipMode.None, spineboy.FlipMode);
    spineboy.Origin = new Vector2D(0.5f, 0.7f);
    spineboy.FlipMode = FlipMode.Horizontal;
    Assert.AreEqual(FlipMode.Horizontal, spineboy.FlipMode);
}
[Test]
public void DrawUpsideDownSpineboyWalkingRight()
{
    spineboy.Origin = new Vector2D(0.5f, 0.3f);
    spineboy.FlipMode = FlipMode.Vertical;
    Assert.AreEqual(FlipMode.Vertical, spineboy.FlipMode);
}
See Also