TimeTrigger ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Entities UpdateBehavior
    DeltaEngine.GameLogic TimeTrigger

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

public class TimeTrigger : UpdateBehavior

The TimeTrigger type exposes the following members.

Constructors

  NameDescription
Public methodTimeTrigger
Initializes a new instance of the TimeTrigger class
Top
Methods

  NameDescription
Public methodUpdate (Overrides UpdateBehavior Update(IEnumerable Entity ).)
Top
Remarks

Tests: DeltaEngine.GameLogic.Tests.TimeTriggerTests
Examples

1 unit tests call DeltaEngine.GameLogic.TimeTrigger
[Test, CloseAfterFirstFrame]
public void TestTimeTrigger()
{
    var actor = new MockActor(Vector3D.Zero, 0.0f);
    var data = new TimeTrigger.Data(Color.Red, Color.Green, 1.0f);
    actor.Add(data);
    actor.Start<TimeTrigger>();
    actor.Add(Color.Black);
    Assert.AreEqual(Color.Black, actor.Get<Color>());
    Assert.AreEqual(Color.Red, data.FirstColor);
    Assert.AreEqual(Color.Green, data.SecondColor);
    Assert.AreEqual(1.0f, data.Interval);
    AdvanceTimeAndUpdateEntities(1.1f);
    Assert.AreEqual(Color.Red, actor.Get<Color>());
}
See Also