Class AttackFormationSelector
Inheritance
AttackFormationSelector
Assembly: cs.temp.dll.dll
[Serializable]
public class AttackFormationSelector : IAttackDistanceHandler
Fields
Declaration
public float unitEnableDistance
Field Value
Type |
Description |
System.Single |
|
Declaration
public FloatRange unitStoppingDistance
Field Value
Properties
Declaration
protected IGridSearchHandler gridSearch { get; }
Property Value
Type |
Description |
IGridSearchHandler |
|
Declaration
public MovementFormationSelector MovementFormation { get; }
Property Value
Type |
Description |
MovementFormationSelector |
|
Declaration
public bool StopMovementOnTargetInRange { get; }
Property Value
Methods
Get the appropriate stopping distance for an attack depending on the target type.
Declaration
public float GetStoppingDistance(IEntity target, bool min = true, bool onProgressEnableTest = false)
Parameters
Type |
Name |
Description |
IEntity |
target |
FactionEntity instance that represents the potential target for the unit.
|
Boolean |
min |
True to get the minimum value of the stopping range and false to get the maximum value of the stopping range.
|
Boolean |
onProgressEnableTest |
|
Returns
Type |
Description |
System.Single |
Stopping distance for the unit's movement to launch an attack.
|
Declaration
public void Init(IGameManager gameMgr, IAttackComponent source)
Parameters
Type |
Name |
Description |
IGameManager |
gameMgr |
|
IAttackComponent |
source |
|
Declaration
public bool IsTargetInRange(Vector3 attackPosition, TargetData<IFactionEntity> target, bool onProgressEnableTest = false)
Parameters
Type |
Name |
Description |
Vector3 |
attackPosition |
|
TargetData<IFactionEntity> |
target |
|
Boolean |
onProgressEnableTest |
|
Returns
Declaration
public bool MustUpdateAttackPosition(Vector3 lastTargetPosition, Vector3 currTargetPosition, Vector3 currAttackPosition, IFactionEntity target)
Parameters
Type |
Name |
Description |
Vector3 |
lastTargetPosition |
|
Vector3 |
currTargetPosition |
|
Vector3 |
currAttackPosition |
|
IFactionEntity |
target |
|
Returns
Implements