Windward
Action-adventure RPG available on Steam Early Access
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Capturable Class Referenceabstract
Inheritance diagram for Capturable:
TNBehaviour CapturableBuilding CapturableTown

Public Member Functions

bool CanBeCapturedBy (int attackerFaction)
 Whether this object can be captured by the specified faction. More...
 
bool CanBeCapturedBy (int unitFaction, int attackerFaction, float control=1f)
 Whether something belonging to one faction can be captured by another. More...
 
void GetContestedLeader (out int faction, out float amount)
 Determine the faction that's trying to capture the objective and how far along it is. More...
 
virtual void MarkAsCaptured (int fid, bool notifyOthers)
 Mark the capturable objective as captured by the specified faction. Should only be called on the host. More...
 
abstract bool IsClose (GameUnit unit)
 Whether the specified unit is close enough to be eligible. More...
 
- Public Member Functions inherited from TNBehaviour
virtual void DestroySelf ()
 Destroy this game object. More...
 

Public Attributes

int expOnCapture = 20
 How much experience to award when captured. More...
 

Protected Member Functions

virtual void Start ()
 
void UpdateTarget ()
 Update the visible target's progress indicator (capture percentage). More...
 
void CaptureMsg (int before)
 
void OnCaptureTick (float[] control, bool audio)
 
virtual void OnTick (bool isPlayerClose)
 Single tick of the capture process. More...
 
virtual void OnCapture (int previousFaction, bool isPlayerClose)
 Function called when the unit gets captured. More...
 
- Protected Member Functions inherited from TNBehaviour
virtual void OnEnable ()
 

Protected Attributes

GameUnit mUnit
 
UIClickableTarget mTarget
 
int[] mUnitCount = null
 
float[] mControl = null
 

Properties

virtual int secondsToCapture [get]
 Rate at which the unit will gain cap More...
 
virtual int secondsToRecover [get]
 How long it takes the unit to recover control without any assistance. More...
 
UIClickableTarget target [get]
 Target indicator, if one is currently visible. More...
 
float control [get]
 How well the capturable object is being held by its faction. More...
 
virtual bool canBeCaptured [get]
 Whether the unit can actuall be captured right now by anyone. More...
 
- Properties inherited from TNBehaviour
TNObject tno [get]
 

Member Function Documentation

bool Capturable.CanBeCapturedBy ( int  attackerFaction)

Whether this object can be captured by the specified faction.

bool Capturable.CanBeCapturedBy ( int  unitFaction,
int  attackerFaction,
float  control = 1f 
)

Whether something belonging to one faction can be captured by another.

void Capturable.CaptureMsg ( int  before)
protected
void Capturable.GetContestedLeader ( out int  faction,
out float  amount 
)

Determine the faction that's trying to capture the objective and how far along it is.

abstract bool Capturable.IsClose ( GameUnit  unit)
pure virtual

Whether the specified unit is close enough to be eligible.

Implemented in CapturableTown, and CapturableBuilding.

virtual void Capturable.MarkAsCaptured ( int  fid,
bool  notifyOthers 
)
virtual

Mark the capturable objective as captured by the specified faction. Should only be called on the host.

virtual void Capturable.OnCapture ( int  previousFaction,
bool  isPlayerClose 
)
protectedvirtual

Function called when the unit gets captured.

Reimplemented in CapturableTown.

void Capturable.OnCaptureTick ( float[]  control,
bool  audio 
)
protected
virtual void Capturable.OnTick ( bool  isPlayerClose)
protectedvirtual

Single tick of the capture process.

virtual void Capturable.Start ( )
protectedvirtual

Reimplemented in CapturableTown, and CapturableBuilding.

void Capturable.UpdateTarget ( )
protected

Update the visible target's progress indicator (capture percentage).

Member Data Documentation

int Capturable.expOnCapture = 20

How much experience to award when captured.

float [] Capturable.mControl = null
protected
UIClickableTarget Capturable.mTarget
protected
GameUnit Capturable.mUnit
protected
int [] Capturable.mUnitCount = null
protected

Property Documentation

virtual bool Capturable.canBeCaptured
get

Whether the unit can actuall be captured right now by anyone.

float Capturable.control
get

How well the capturable object is being held by its faction.

virtual int Capturable.secondsToCapture
get

Rate at which the unit will gain cap

virtual int Capturable.secondsToRecover
get

How long it takes the unit to recover control without any assistance.

UIClickableTarget Capturable.target
getprotected

Target indicator, if one is currently visible.


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