|
ClassicCityBuilderKit 1.9.4
|
manages attack system
attackers attack attackableComponents and get fended off by defenderComponents
all entities with health get healthbars
Public Member Functions | |
| void | AddAttacker (IAttacker attacker) |
| adds an attacker to the manager that can now be found by defenders typically called by the attacker in Start | |
| void | RemoveAttacker (IAttacker attacker) |
| removes a previously added attacker from the manager, it can no longer be found by defenders typically called by the attacker in OnDestroy when it has been killed | |
| IAttacker | GetAttacker (Vector3 position, float maxDistance) |
| retrieves the closest attacker to a given position | |
| IEnumerable< IAttacker > | GetAttackers (Vector3 position, float radius) |
| retrieves the all attackers within a radius | |
| BuildingComponentPath< IAttackable > | GetAttackerPath (Vector2Int point, PathType pathType, object tag=null) |
| attempts to find a path to an IAttackable | |
| void CityBuilderCore.IAttackManager.AddAttacker | ( | IAttacker | attacker | ) |
adds an attacker to the manager that can now be found by defenders
typically called by the attacker in Start
| attacker | the attacker to add |
Implemented in CityBuilderCore.DefaultAttackManager.
| IAttacker CityBuilderCore.IAttackManager.GetAttacker | ( | Vector3 | position, |
| float | maxDistance ) |
retrieves the closest attacker to a given position
| position | position of the defender that is looking for attackers |
| maxDistance | maximum distance to look for |
Implemented in CityBuilderCore.DefaultAttackManager.
| BuildingComponentPath< IAttackable > CityBuilderCore.IAttackManager.GetAttackerPath | ( | Vector2Int | point, |
| PathType | pathType, | ||
| object | tag = null ) |
attempts to find a path to an IAttackable
| point | current point to start from |
| pathType | preferred path type |
| tag | additional pathing option |
Implemented in CityBuilderCore.DefaultAttackManager.
| IEnumerable< IAttacker > CityBuilderCore.IAttackManager.GetAttackers | ( | Vector3 | position, |
| float | radius ) |
retrieves the all attackers within a radius
| position | position of the defender that is looking for attackers |
| radius | maximum distance to look for |
Implemented in CityBuilderCore.DefaultAttackManager.
| void CityBuilderCore.IAttackManager.RemoveAttacker | ( | IAttacker | attacker | ) |
removes a previously added attacker from the manager, it can no longer be found by defenders
typically called by the attacker in OnDestroy when it has been killed
| attacker |
Implemented in CityBuilderCore.DefaultAttackManager.