Piggy Bank is all about the gold. Special abilities are:
Greed: Amount of gold earned for killing a creep is increased
Payday: Creeps drop extra gold
Coins Rain: Collectable coins fall on the grid over a short period, doing damage
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
CreepyTowers.Avatars Avatar
CreepyTowers.Avatars PiggyBank
Namespace: CreepyTowers.Avatars
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The PiggyBank type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | PiggyBank | Initializes a new instance of the PiggyBank class |
Methods
Name | Description | |
---|---|---|
![]() | Add T | (Inherited from Entity.) |
![]() | AddTag | (Inherited from Entity.) |
![]() | ClearTags | (Inherited from Entity.) |
![]() | Contains T | (Inherited from Entity.) |
![]() | ContainsBehavior T | (Inherited from Entity.) |
![]() | ContainsTag | (Inherited from Entity.) |
![]() | Deactivate | (Inherited from Entity.) |
![]() | Dispose | (Inherited from Entity.) |
![]() | Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) |
![]() | GetActiveBehaviors | (Inherited from Entity.) |
![]() | GetComponentsForSaving | (Inherited from Entity.) |
![]() | GetOrDefault T | (Inherited from Entity.) |
![]() | GetTags | (Inherited from Entity.) |
![]() | PerformAttack | (Overrides Avatar PerformAttack(AvatarAttack, Vector2D).) |
![]() | Remove T | (Inherited from Entity.) |
![]() | RemoveTag | (Inherited from Entity.) |
![]() | Reset | (Inherited from Avatar.) |
![]() | Set | (Inherited from Entity.) |
![]() | SetComponents | (Inherited from Entity.) |
![]() | Start T | (Inherited from Entity.) |
![]() | Stop T | (Inherited from Entity.) |
![]() | ToString | (Inherited from Entity.) |
Fields
Name | Description | |
---|---|---|
![]() | components | (Inherited from Entity.) |
Properties
Name | Description | |
---|---|---|
![]() | ActivatedSpecialAttack | (Inherited from Avatar.) |
![]() | AttackFrequencyMultiplier | (Inherited from Avatar.) |
![]() | IsActive | (Inherited from Entity.) |
![]() | IsLocked | (Inherited from Avatar.) |
![]() | IsPauseable | (Inherited from Entity.) |
![]() | IsSelected | (Inherited from Avatar.) |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | PowerMultiplier | (Inherited from Avatar.) |
![]() | ProgressLevel | (Inherited from Avatar.) |
![]() | RangeMultiplier | (Inherited from Avatar.) |
![]() | SpecialAttackAIsActivated | (Inherited from Avatar.) |
![]() | SpecialAttackBIsActivated | (Inherited from Avatar.) |
![]() | UpdatePriority | (Inherited from Entity.) |
![]() | Xp | (Inherited from Avatar.) |
Remarks
Examples
[Test] public void SpawnCoinMinefield() { Assert.AreEqual(5, coins.Count); Assert.AreEqual(new Vector3D(0.5f, 1.5f, 0.0f), coins[0].Position); Assert.IsTrue(coins[0].IsActive); }
[Test] public void TriggeringPiggyBankPayDayMakesCreepsDropMoreGold() { var creep = new Creep(CreepType.Cloth, new Vector2D(0.5f, 1.5f)); var gold = creep.GetStatValue("Gold"); pig.PerformAttack(AvatarAttack.PiggyBankPayDay, Vector2D.Unused); AdvanceTimeAndUpdateEntities(4.9f); Assert.AreEqual(1.5f, creep.GetStatValue("Gold") / gold); }
[Test] public void PiggyBankPayDayBuffLasts5Seconds() { var creep = new Creep(CreepType.Cloth, new Vector2D(0.5f, 1.5f)); var gold = creep.GetStatValue("Gold"); pig.PerformAttack(AvatarAttack.PiggyBankPayDay, Vector2D.Unused); AdvanceTimeAndUpdateEntities(5.1f); Assert.GreaterOrEqual(creep.GetStatValue("Gold"), gold); }
See Also