Third Person Cover Shooter  1.6
CoverShooter.CivilianBrain Class Reference

Simulates a peaceful civilian. More...

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

Public Member Functions

override void ToForget ()
 Forget about the enemy and return to walking around or standing idle at the starting location. More...
 
void ToBecomeScared ()
 Told by a component to become scared. More...
 
void ToMakeCall ()
 Told by a component to enter a phone call state. More...
 
void OnCallMade ()
 Registers a successfull call. More...
 
void OnHit (Hit hit)
 Registers damage done by a weapon. More...
 
void OnAlert (ref GeneratedAlert alert)
 Notified by an alert system of an alert. More...
 
void OnSeeActor (Actor actor)
 Notified by the sight AI that an actor has entered the view. More...
 
void OnUnseeActor (Actor actor)
 Notified by the sight AI that an actor has dissappeared from the view. More...
 
void OnWaypointsFound ()
 Notified of an existance of waypoints. More...
 
- Public Member Functions inherited from CoverShooter.BaseBrain
void OnEnterDanger ()
 Registers an entrance to a dangerous area. More...
 
void OnLeaveDanger ()
 Registers that the AI is leaving a dangerous area. 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...
 

Public Attributes

bool OnlyAlarmedByWeapons = true
 The civilian is only alarmed by enemies with weapons in hands. More...
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from CoverShooter.BaseBrain
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

bool IsAlerted [get]
 Is the AI currently alarmed. More...
 
bool IsScared [get]
 Is the AI currently scared. More...
 
CivilianState State [get]
 AI state the brain is at. More...
 
- Properties inherited from CoverShooter.BaseBrain
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

Simulates a peaceful civilian.

Notices enemies and follows them. Calls police.

Member Function Documentation

◆ Awake()

override void CoverShooter.CivilianBrain.Awake ( )
protectedvirtual

Reimplemented from CoverShooter.BaseBrain.

◆ OnAlert()

void CoverShooter.CivilianBrain.OnAlert ( ref GeneratedAlert  alert)

Notified by an alert system of an alert.

Implements CoverShooter.IAlertListener.

◆ OnCallMade()

void CoverShooter.CivilianBrain.OnCallMade ( )

Registers a successfull call.

◆ OnHit()

void CoverShooter.CivilianBrain.OnHit ( Hit  hit)

Registers damage done by a weapon.

◆ OnSeeActor()

void CoverShooter.CivilianBrain.OnSeeActor ( Actor  actor)

Notified by the sight AI that an actor has entered the view.

◆ OnUnseeActor()

void CoverShooter.CivilianBrain.OnUnseeActor ( Actor  actor)

Notified by the sight AI that an actor has dissappeared from the view.

◆ OnWaypointsFound()

void CoverShooter.CivilianBrain.OnWaypointsFound ( )

Notified of an existance of waypoints.

◆ ToBecomeScared()

void CoverShooter.CivilianBrain.ToBecomeScared ( )

Told by a component to become scared.

◆ ToForget()

override void CoverShooter.CivilianBrain.ToForget ( )
virtual

Forget about the enemy and return to walking around or standing idle at the starting location.

Reimplemented from CoverShooter.BaseBrain.

◆ ToMakeCall()

void CoverShooter.CivilianBrain.ToMakeCall ( )

Told by a component to enter a phone call state.

Member Data Documentation

◆ OnlyAlarmedByWeapons

bool CoverShooter.CivilianBrain.OnlyAlarmedByWeapons = true

The civilian is only alarmed by enemies with weapons in hands.

Property Documentation

◆ IsAlerted

bool CoverShooter.CivilianBrain.IsAlerted
get

Is the AI currently alarmed.

◆ IsScared

bool CoverShooter.CivilianBrain.IsScared
get

Is the AI currently scared.

◆ State

CivilianState CoverShooter.CivilianBrain.State
get

AI state the brain is at.


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