Third Person Cover Shooter  1.6
CoverShooter.BaseBrain Class Reference

Base implementation of all the AI brains. More...

Inheritance diagram for CoverShooter.BaseBrain:
CoverShooter.AIBase CoverShooter.CivilianBrain CoverShooter.FighterBrain

Public Member Functions

void OnEnterDanger ()
 Registers an entrance to a dangerous area. More...
 
void OnLeaveDanger ()
 Registers that the AI is leaving a dangerous area. More...
 
virtual void ToForget ()
 Is told to forget about the current threat. More...
 
- Public Member Functions inherited from CoverShooter.AIBase
void Message (string name)
 Sends a message to other components. More...
 
void Message (string name, object value)
 Sends a message to other components. More...
 

Protected Member Functions

virtual void Awake ()
 
void RemoveThreat ()
 Unset the current threat. More...
 
void UnseeThreat ()
 Sets the threat state to unseen. More...
 
void SetUnseenThreat (bool isHeard, bool isDirect, Actor threat, Vector3 position, Cover threatCover)
 Updates threat state. More...
 
void SetThreat (Actor threat, Vector3 position, Cover threatCover)
 Updates threat state. More...
 
void SetThreat (bool isVisible, bool isHeard, bool isActual, Actor threat, Vector3 position, Cover threatCover, float time)
 Updates threat state. More...
 

Properties

Actor Actor [get]
 Actor component found in the same object. More...
 
Actor Threat [get]
 Actor component of the threating character. More...
 
Actor ForgottenThreat [get]
 Threat actor that was told to be forgotten. More...
 
float ThreatAge [get]
 Time in seconds since the threat was last seen. More...
 
Vector3 LastKnownThreatPosition [get]
 Last known position of the assigned threat. More...
 
float LastSeenThreatTime [get]
 Time since level load that the threat was seen. More...
 
bool CanSeeTheThreat [get]
 Is the threat currently seen. More...
 
Cover ThreatCover [get]
 Cover that is currently known to be used by the threat. More...
 
bool IsActualThreatPosition [get]
 Was the last known threat position a position the threat occupied or was it just an indirect explosion. More...
 
bool HasSeenTheEnemy [get]
 Was any threat seen at least once. More...
 
bool HasHeardTheEnemy [get]
 Was any threat heard at least once. More...
 
Vector3 StartingLocation [get]
 Location at which the character started. More...
 
bool IsInDanger [get]
 Is the AI currently in a dangerous area. More...
 

Detailed Description

Base implementation of all the AI brains.

Manages threats.

Member Function Documentation

◆ Awake()

virtual void CoverShooter.BaseBrain.Awake ( )
protectedvirtual

◆ OnEnterDanger()

void CoverShooter.BaseBrain.OnEnterDanger ( )

Registers an entrance to a dangerous area.

◆ OnLeaveDanger()

void CoverShooter.BaseBrain.OnLeaveDanger ( )

Registers that the AI is leaving a dangerous area.

◆ RemoveThreat()

void CoverShooter.BaseBrain.RemoveThreat ( )
protected

Unset the current threat.

◆ SetThreat() [1/2]

void CoverShooter.BaseBrain.SetThreat ( Actor  threat,
Vector3  position,
Cover  threatCover 
)
protected

Updates threat state.

Implicitly marks it as a visible threat.

◆ SetThreat() [2/2]

void CoverShooter.BaseBrain.SetThreat ( bool  isVisible,
bool  isHeard,
bool  isActual,
Actor  threat,
Vector3  position,
Cover  threatCover,
float  time 
)
protected

Updates threat state.

Time is given since level load.

◆ SetUnseenThreat()

void CoverShooter.BaseBrain.SetUnseenThreat ( bool  isHeard,
bool  isDirect,
Actor  threat,
Vector3  position,
Cover  threatCover 
)
protected

Updates threat state.

Implicitly marks it as an unseen threat.

◆ ToForget()

virtual void CoverShooter.BaseBrain.ToForget ( )
virtual

Is told to forget about the current threat.

Reimplemented in CoverShooter.FighterBrain, and CoverShooter.CivilianBrain.

◆ UnseeThreat()

void CoverShooter.BaseBrain.UnseeThreat ( )
protected

Sets the threat state to unseen.

Property Documentation

◆ Actor

Actor CoverShooter.BaseBrain.Actor
get

Actor component found in the same object.

◆ CanSeeTheThreat

bool CoverShooter.BaseBrain.CanSeeTheThreat
get

Is the threat currently seen.

◆ ForgottenThreat

Actor CoverShooter.BaseBrain.ForgottenThreat
get

Threat actor that was told to be forgotten.

◆ HasHeardTheEnemy

bool CoverShooter.BaseBrain.HasHeardTheEnemy
get

Was any threat heard at least once.

◆ HasSeenTheEnemy

bool CoverShooter.BaseBrain.HasSeenTheEnemy
get

Was any threat seen at least once.

◆ IsActualThreatPosition

bool CoverShooter.BaseBrain.IsActualThreatPosition
get

Was the last known threat position a position the threat occupied or was it just an indirect explosion.

◆ IsInDanger

bool CoverShooter.BaseBrain.IsInDanger
get

Is the AI currently in a dangerous area.

◆ LastKnownThreatPosition

Vector3 CoverShooter.BaseBrain.LastKnownThreatPosition
get

Last known position of the assigned threat.

◆ LastSeenThreatTime

float CoverShooter.BaseBrain.LastSeenThreatTime
get

Time since level load that the threat was seen.

◆ StartingLocation

Vector3 CoverShooter.BaseBrain.StartingLocation
get

Location at which the character started.

◆ Threat

Actor CoverShooter.BaseBrain.Threat
get

Actor component of the threating character.

◆ ThreatAge

float CoverShooter.BaseBrain.ThreatAge
get

Time in seconds since the threat was last seen.

◆ ThreatCover

Cover CoverShooter.BaseBrain.ThreatCover
get

Cover that is currently known to be used by the threat.


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