DrawableEntity Set Method Delta Engine Documentation

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

public override void Set(
	Object component
)
Remarks

Tests: DeltaEngine.Tests.Entities.DrawableEntityTests
Examples

3 unit tests call DeltaEngine.Entities.DrawableEntity.Set(System.Object)
[Test]
public void SettingLerpableComponentAddsToLastTickComponents()
{
    var draw = new MockDrawableEntity();
    draw.Set(1.0f);
    Assert.AreEqual(1.0f, draw.GetLastTickLerpComponents()[0]);
}
[Test]
public void SettingWithoutInterpolationANonLerpableComponentDoesNotAffectLastTickLerpComponents()
{
    var draw = new MockDrawableEntity();
    draw.SetWithoutInterpolation(1);
    Assert.AreEqual(0, draw.GetLastTickLerpComponents().Count);
}
[Test]
public void SettingWithoutInterpolationALerpableComponentChangesLastTickValue()
{
    var draw = new MockDrawableEntity();
    draw.Set(1.0f);
    draw.IsActive = true;
    EntitiesRunner.Current.UpdateAndDrawAllEntities(() => { });
See Also