A* Pathfinding Project  4.1.18
The A* Pathfinding Project for Unity 3D
RTSUnit Class Reference

Public Member Functions

void ApplyDamage (float damage)
 
void Die ()
 
void OnMakeActiveUnit (bool active)
 
void SetDestination (Vector3 destination, MovementMode mode)
 

Public Attributes

GameObject deathEffect
 
float detectionRange
 
float health
 
float maxHealth
 
System.Action< bool > onMakeActiveUnit
 
GameObject selectionIndicator
 
int team
 

Properties

float radius [get]
 
bool selected [get, set]
 
bool selectionIndicatorEnabled [get, set]
 

Private Member Functions

void Awake ()
 
void OnDisable ()
 
void OnEnable ()
 
void Start ()
 
void Update ()
 

Private Attributes

IAstarAI ai
 
RTSUnit attackTarget
 
Vector3 lastDestination
 
float lastSeenAttackTarget = float.NegativeInfinity
 
MovementMode movementMode
 
bool mSelected
 
bool reachedDestination
 
RVOController rvo
 
SC2Avoidance sc2Avoidance
 
RTSWeapon weapon
 

Member Function Documentation

◆ ApplyDamage()

void ApplyDamage ( float  damage)

◆ Awake()

void Awake ( )
private

◆ Die()

void Die ( )

◆ OnDisable()

void OnDisable ( )
private

◆ OnEnable()

void OnEnable ( )
private

◆ OnMakeActiveUnit()

void OnMakeActiveUnit ( bool  active)

◆ SetDestination()

void SetDestination ( Vector3  destination,
MovementMode  mode 
)

◆ Start()

void Start ( )
private

◆ Update()

void Update ( )
private

Member Data Documentation

◆ ai

IAstarAI ai
private

◆ attackTarget

RTSUnit attackTarget
private

◆ deathEffect

GameObject deathEffect

◆ detectionRange

float detectionRange

◆ health

float health

◆ lastDestination

Vector3 lastDestination
private

◆ lastSeenAttackTarget

float lastSeenAttackTarget = float.NegativeInfinity
private

◆ maxHealth

float maxHealth

◆ movementMode

MovementMode movementMode
private

◆ mSelected

bool mSelected
private

◆ onMakeActiveUnit

System.Action<bool> onMakeActiveUnit

◆ reachedDestination

bool reachedDestination
private

◆ rvo

RVOController rvo
private

◆ sc2Avoidance

SC2Avoidance sc2Avoidance
private

◆ selectionIndicator

GameObject selectionIndicator

◆ team

int team

◆ weapon

RTSWeapon weapon
private

Property Documentation

◆ radius

float radius
get

◆ selected

bool selected
getset

◆ selectionIndicatorEnabled

bool selectionIndicatorEnabled
getset

The documentation for this class was generated from the following file: