Towers shoot at creeps. Their stats and behavior vary depending on their type
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Entities DrawableEntity
DeltaEngine.Rendering3D Entity3D
DeltaEngine.Rendering3D HierarchyEntity3D
DeltaEngine.GameLogic Actor3D
CreepyTowers Agent
CreepyTowers.Towers Tower
Namespace: CreepyTowers.Towers
Assembly: CreepyTowers (in CreepyTowers.exe) Version: 1.1.1.0 (1.1.1)
Syntax
The Tower type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Tower | Initializes a new instance of the Tower class |
Methods
Fields
Name | Description | |
---|---|---|
attackEffect | ||
components | (Inherited from Entity.) | |
DebugRange | ||
lastOrientation | (Inherited from Entity3D.) | |
lastPosition | (Inherited from Entity3D.) | |
lastTickLerpComponents |
Each element can either be a Lerp, a Lerp List or an array of Lerp objects.
View code on GitHub (Inherited from DrawableEntity.) |
Properties
Name | Description | |
---|---|---|
AttackType | ||
Children | (Inherited from HierarchyEntity3D.) | |
IsActive | (Inherited from HierarchyEntity3D.) | |
IsOnCooldown | ||
IsPauseable | (Inherited from Entity.) | |
IsVisible | (Inherited from DrawableEntity.) | |
Model | (Inherited from Agent.) | |
Name | (Inherited from Agent.) | |
NumberOfComponents | (Inherited from Entity.) | |
Orientation | (Inherited from Entity3D.) | |
Parent | (Inherited from HierarchyEntity3D.) | |
Position | (Inherited from Entity3D.) | |
RelativeOrientation | (Inherited from HierarchyEntity3D.) | |
RelativePosition | (Inherited from HierarchyEntity3D.) | |
RenderLayer | (Inherited from DrawableEntity.) | |
RotationZ | (Inherited from Actor3D.) | |
Scale | (Inherited from Entity3D.) | |
ScaleFactor | (Inherited from Actor3D.) | |
Stats | (Inherited from Agent.) | |
TimeOfLastAttack | ||
Type | ||
UpdatePriority | (Inherited from Entity.) |
Events
Name | Description | |
---|---|---|
OrientationChanged | (Inherited from Actor3D.) | |
PositionChanged | (Inherited from Actor3D.) | |
ScaleChanged | (Inherited from Actor3D.) | |
WasBuilt |
Remarks
Examples
[Test, CloseAfterFirstFrame] public void TestTowerPropertiesXml() { var towerProperties = ContentLoader.Load<TowerPropertiesXml>(Xml.TowerProperties.ToString()); var towerData = towerProperties.Get(TowerType.Acid); Assert.AreEqual(1.0f, towerData.AttackFrequency); Assert.AreEqual(4.0f, towerData.Range); Assert.AreEqual(35.0f, towerData.BasePower); Assert.AreEqual(230, towerData.Cost); Assert.AreEqual(AttackType.DirectShot, towerData.AttackType); }
[Test, CloseAfterFirstFrame] public void NotInitializingTowerDoesntCreateTowerModel() { new Tower(TowerType.Water, Vector3D.Zero); Assert.AreEqual(0, EntitiesRunner.Current.GetEntitiesOfType<Model>().Count); Assert.AreEqual(1, EntitiesRunner.Current.GetEntitiesOfType<Tower>().Count); }
[Test, CloseAfterFirstFrame] public void InitializingTowerCreatesTowerModel() { var tower = new Tower(TowerType.Water, Vector3D.Zero); tower.RenderModel(); Assert.AreEqual(1, EntitiesRunner.Current.GetEntitiesOfType<Model>().Count); Assert.AreEqual(1, EntitiesRunner.Current.GetEntitiesOfType<Tower>().Count); }
See Also