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
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
The DrawableEntity type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DrawableEntity | Initializes a new instance of the DrawableEntity class |
Methods
Name | Description | |
---|---|---|
Add T | (Overrides Entity Add T (T).) | |
AddTag | (Inherited from Entity.) | |
ClearTags | (Inherited from Entity.) | |
Contains T | (Inherited from Entity.) | |
ContainsBehavior T | (Inherited from Entity.) | |
ContainsTag | (Inherited from Entity.) | |
Deactivate | (Inherited from Entity.) | |
Dispose | (Inherited from Entity.) | |
Get T | (Overrides Entity Get T .) | |
GetActiveBehaviors | (Inherited from Entity.) | |
GetComponentsForSaving | (Inherited from Entity.) | |
GetDrawBehaviors | ||
GetInterpolatedArray T | ||
GetInterpolatedList T | ||
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
NextUpdateStarted | ||
OnDraw T | ||
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
Set | (Overrides Entity Set(Object).) | |
SetComponents | (Inherited from Entity.) | |
SetWithoutInterpolation T | ||
Start T | (Inherited from Entity.) | |
Stop T | (Inherited from Entity.) | |
ToggleVisibility | ||
ToString | (Inherited from Entity.) |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
DefaultRenderLayer | ||
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub |
Properties
Name | Description | |
---|---|---|
IsActive | (Overrides Entity IsActive.) | |
IsPauseable | (Inherited from Entity.) | |
IsVisible | ||
NumberOfComponents | (Inherited from Entity.) | |
RenderLayer | ||
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[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