Command Add Method (Trigger)Delta Engine Documentation

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

public Command Add(
	Trigger trigger
)

Return Value

Type: Command
Remarks

Tests: DeltaEngine.Tests.Commands.CommandTests
Examples

1 unit tests call DeltaEngine.Commands.Command.Add(DeltaEngine.Commands.Trigger)
[Test]
public void CreateCommandWithManualTrigger()
{
    customTrigger = new MockTrigger();
    new Command(() => pos += Time.Delta).Add(customTrigger);
    InvokingTriggerWithoutRunningEntitiesDoesNotCauseAction();
    InvokingTriggerOnceWithMultipleRunsOnlyCausesOneAction();
}
See Also