Advanced Strategic Command
Public Member Functions | Public Attributes | List of all members
AiThreat Class Reference

the threat that a unit poses against other units. More...

#include <baseaiinterface.h>

Public Member Functions

void reset (void)
 
 AiThreat (void)
 
AiThreatoperator+= (const AiThreat &t)
 
void read (tnstream &stream)
 
void write (tnstream &stream)
 

Public Attributes

int threatTypes
 
int threat [aiValueTypeNum]
 

Detailed Description

the threat that a unit poses against other units.

Since a given unit may usually not attack all kinds of units ( satellites, submarines, etc ), there are several different groups of unitTypes, with a different threat rating each

See Also
aiValueTypeNum

Definition at line 39 of file baseaiinterface.h.

Constructor & Destructor Documentation

AiThreat::AiThreat ( void  )
inline

Definition at line 44 of file baseaiinterface.h.

References reset().

Member Function Documentation

AiThreat& AiThreat::operator+= ( const AiThreat t)
inline

Definition at line 45 of file baseaiinterface.h.

References threat, and threatTypes.

void AiThreat::read ( tnstream stream)

Definition at line 2000 of file gamemap.cpp.

References tnstream::readInt().

void AiThreat::reset ( void  )

Definition at line 2085 of file gamemap.cpp.

References aiValueTypeNum.

Referenced by AiThreat(), and AiValue::reset().

void AiThreat::write ( tnstream stream)

Definition at line 1991 of file gamemap.cpp.

References tnstream::writeInt().

Member Data Documentation

int AiThreat::threat[aiValueTypeNum]
int AiThreat::threatTypes

Definition at line 41 of file baseaiinterface.h.

Referenced by operator+=().


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