DrawableEntity ClassDelta Engine Documentation
Drawable components like Entity2D or Entity3D will interpolate between update ticks. NextUpdateStarted marks the beginning of an update tick to copy interpolatable data, it can also be used to check if any data has changed since last time and if something needs updating. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Entities DrawableEntity
      DeltaEngine.Editor.LevelEditor MaterialLevelObject
      DeltaEngine.Editor.LevelEditor ModelLevelObject
      DeltaEngine.Editor.LevelEditor ParticleLevelObject
      DeltaEngine.Editor.LevelEditor SpriteLevelObject
      DeltaEngine.Graphics.Tests DrawingTests Line
      DeltaEngine.Graphics.Tests DrawingTests LineAdder
      DeltaEngine.Graphics.Tests DrawingTests RandomLines
      DeltaEngine.Graphics.Tests GeometryTests MaterialVertexDrawer
      DeltaEngine.Mocks MockDrawableEntity
      DeltaEngine.Rendering2D Entity2D
      DeltaEngine.Rendering3D Entity3D
      DeltaEngine.Rendering3D.Particles ParticleEmitter
      DeltaEngine.Tests.Entities UpdateAndDrawThreadsTests PositionEntity

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

public class DrawableEntity : Entity

The DrawableEntity type exposes the following members.

Constructors

  NameDescription
Public methodDrawableEntity
Initializes a new instance of the DrawableEntity class
Top
Methods

  NameDescription
Public methodAdd T  (Overrides Entity Add T (T).)
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T  (Overrides Entity Get T  .)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Protected methodGetDrawBehaviors
Public methodGetInterpolatedArray T 
Public methodGetInterpolatedList T 
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Protected methodNextUpdateStarted
Public methodOnDraw T 
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodSet (Overrides Entity Set(Object).)
Public methodSetComponents (Inherited from Entity.)
Public methodSetWithoutInterpolation T 
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToggleVisibility
Public methodToString (Inherited from Entity.)
Top
Fields

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

  NameDescription
Public propertyIsActive (Overrides Entity IsActive.)
Public propertyIsPauseable (Inherited from Entity.)
Public propertyIsVisible
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyRenderLayer
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

Tests: DeltaEngine.Tests.Entities.DrawableEntityTests
Examples

8 unit tests call DeltaEngine.Entities.DrawableEntity
[Test]
public void TryToGetListWillThrowExceptionIfNoListsAvailable()
{
    var draw = new MockDrawableEntity();
    draw.OnDraw<Draw>();
    EntitiesRunner.Current.UpdateAndDrawAllEntities(() => { });
[Test]
public void ChangeLengthToCopyLimit()
{
    var draw = new MockDrawableEntity();
    draw.OnDraw<DrawToCopyArrayListLength>();
    var mockLerp = new MockLerp().Lerp(new MockLerp(), 1);
    var lerp = new MockLerp[3];
    lerp[0] = mockLerp;
    lerp[1] = mockLerp;
    lerp[2] = mockLerp;
    draw.Add(lerp);
    EntitiesRunner.Current.UpdateAndDrawAllEntities(() => { });
[Test]
public void SettingLerpableComponentAddsToLastTickComponents()
{
    var draw = new MockDrawableEntity();
    draw.Set(1.0f);
    Assert.AreEqual(1.0f, draw.GetLastTickLerpComponents()[0]);
}
See Also