This is created when one thing interacts with another and carries information on how much to
adjust its stats and/or buffs (eg. a tower's bullet hitting a creep)
View code on GitHub
Inheritance Hierarchy
CreepyTowers.Stats Interaction
Namespace: CreepyTowers.Stats
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Interaction type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Interaction | Initializes a new instance of the Interaction class |
Methods
Name | Description | |
---|---|---|
Apply |
Properties
Name | Description | |
---|---|---|
Source | ||
Target |
Remarks
Examples
[Test] public void Constructor() { var effect = new BuffEffect("TestHpBuff"); var interaction = new Interaction(tower, creep, adjustment, effect); Assert.AreEqual(tower, interaction.Source); Assert.AreEqual(creep, interaction.Target); }
[Test] public void PerformAdjustment() { var interaction = new Interaction(tower, creep, adjustment); interaction.Apply(); Assert.AreEqual(0.0f, creep.GetStatValue("Hp")); }
[Test] public void PerformBuff() { var effect = new BuffEffect("TestHpBuff"); var interaction = new Interaction(tower, creep, adjustment, effect); interaction.Apply(); Assert.AreEqual(204.0f, creep.GetStatValue("Hp")); }
See Also