SubtractLife ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Commands Trigger
      DeltaEngine.GameLogic GameTrigger
        CreepyTowers.Triggers SubtractLife

Namespace: CreepyTowers.Triggers
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public class SubtractLife : GameTrigger

The SubtractLife type exposes the following members.

Constructors

  NameDescription
Public methodSubtractLife
Initializes a new instance of the SubtractLife class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
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.)
Protected methodEnemyReachGoalPoint (Overrides GameTrigger EnemyReachGoalPoint .)
Protected methodGameOver (Inherited from GameTrigger.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodInvoke (Inherited from Trigger.)
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodStart T  (Inherited from Entity.)
Protected methodStartingLevel (Inherited from GameTrigger.)
Public methodStop T  (Inherited from Entity.)
Public methodToString (Inherited from Entity.)
Public methodUpdate (Inherited from Trigger.)
Protected methodUpdateAfterOneSecond (Inherited from GameTrigger.)
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Public fieldInvoked (Inherited from Trigger.)
Top
Properties

  NameDescription
Public propertyIsActive (Inherited from Entity.)
Public propertyIsPauseable (Inherited from Trigger.)
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyWasInvokedThisTick (Inherited from Trigger.)
Top
Remarks

Tests: CreepyTowers.Tests.Triggers.SubtractLifeTests
Examples

1 unit tests call CreepyTowers.Triggers.SubtractLife
[Test, CloseAfterFirstFrame]
public void TestSubtractLife()
{
    new SubtractLife();
    var player = new Player();
    GameTrigger.OnEnemyReachGoal();
    AdvanceTimeAndUpdateEntities();
    Assert.AreEqual(0, player.LivesLeft);
}
See Also