Third Person Cover Shooter  1.6
CoverShooter.AIFormation Class Reference

Moves the AI to a certain position. More...

Inheritance diagram for CoverShooter.AIFormation:
CoverShooter.AIBase CoverShooter.ICharacterWalkListener

Public Member Functions

void OnThreat (Actor value)
 Notified of a threat. More...
 
void OnNoThreat ()
 Notified that there is no thret. More...
 
void OnStop ()
 Character stops. More...
 
void OnRun ()
 Notified that the AI is running. More...
 
void OnSprint ()
 Notified that the AI is sprinting. More...
 
void OnWalk ()
 Notified that the AI is walking. More...
 
void OnFoundCover ()
 Notified that the AI has found a cover and started moving to it. More...
 
void ToRegroupFormation ()
 Notified that the AI is regrouping. More...
 
void ToEnterProcess ()
 Notified that the AI has entered some process. More...
 
void ToExitProcess ()
 Notified that the AI has exited it's process. More...
 
void ToExitProcessAndMaintainPosition ()
 Notified that the AI has exited it's process. More...
 
void OnHoldPosition (Vector3 position)
 Notified that the AI has started to hold a position. More...
 
void OnStopHoldingPosition ()
 Notified that the AI has stopped maintaining a position. 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

AIFormation Leader
 Formation leader. More...
 
FormationType Formation = FormationType.Free
 Formation to take. More...
 
bool Aggressive = true
 Are the members of the formation aggressive (overrides FighterBrain.ImmediateThreatReaction). More...
 
float FollowerSpacing = 1
 Minimum space the followers keep between each other. More...
 
float RunStaminaFraction = 0.5f
 The AI will run only if the stamina is this or higher. More...
 
float MinRunDistance = 4
 AI will run towards the position if the distance to it is greater. More...
 
float CombatDistance = 8
 AI will avoid staying further from the leader than this given distance. More...
 
FreeRoamInDangerSettings FreeRoamInDanger = FreeRoamInDangerSettings.Default()
 Settings for the free roam (in danger) formation. More...
 
FreeRoamOutOfDangerSettings FreeRoamOutOfDanger = FreeRoamOutOfDangerSettings.Default()
 Settings for the roam (out of danger) formation. More...
 
LineFormationSettings Line = LineFormationSettings.Default()
 Settings for the line formation. More...
 
SquareFormationSettings Square = SquareFormationSettings.Default()
 Settings for the square formation. More...
 

Protected Member Functions

AIFormation GetFollower (int index)
 
int Register (AIFormation follower)
 
void MoveTo (Vector3 position, float duration)
 

Properties

float MaxDistance [get]
 Max distance at which the AI can walk around the leader when free roaming in danger. More...
 
Vector3 Direction [get]
 Direction at which the AI is facing. More...
 
Actor Actor [get]
 Actor component. More...
 
FighterBrain Brain [get]
 FighterBrain component. More...
 
Vector3 Position [get]
 

Detailed Description

Moves the AI to a certain position.

One AIFormation is set to be a leader and others adjust their position based on the leader's state.

Member Function Documentation

◆ GetFollower()

AIFormation CoverShooter.AIFormation.GetFollower ( int  index)
protected

◆ MoveTo()

void CoverShooter.AIFormation.MoveTo ( Vector3  position,
float  duration 
)
protected

◆ OnFoundCover()

void CoverShooter.AIFormation.OnFoundCover ( )

Notified that the AI has found a cover and started moving to it.

◆ OnHoldPosition()

void CoverShooter.AIFormation.OnHoldPosition ( Vector3  position)

Notified that the AI has started to hold a position.

◆ OnNoThreat()

void CoverShooter.AIFormation.OnNoThreat ( )

Notified that there is no thret.

◆ OnRun()

void CoverShooter.AIFormation.OnRun ( )

Notified that the AI is running.

Implements CoverShooter.ICharacterWalkListener.

◆ OnSprint()

void CoverShooter.AIFormation.OnSprint ( )

Notified that the AI is sprinting.

Implements CoverShooter.ICharacterWalkListener.

◆ OnStop()

void CoverShooter.AIFormation.OnStop ( )

◆ OnStopHoldingPosition()

void CoverShooter.AIFormation.OnStopHoldingPosition ( )

Notified that the AI has stopped maintaining a position.

◆ OnThreat()

void CoverShooter.AIFormation.OnThreat ( Actor  value)

Notified of a threat.

◆ OnWalk()

void CoverShooter.AIFormation.OnWalk ( )

Notified that the AI is walking.

Implements CoverShooter.ICharacterWalkListener.

◆ Register()

int CoverShooter.AIFormation.Register ( AIFormation  follower)
protected

◆ ToEnterProcess()

void CoverShooter.AIFormation.ToEnterProcess ( )

Notified that the AI has entered some process.

◆ ToExitProcess()

void CoverShooter.AIFormation.ToExitProcess ( )

Notified that the AI has exited it's process.

◆ ToExitProcessAndMaintainPosition()

void CoverShooter.AIFormation.ToExitProcessAndMaintainPosition ( )

Notified that the AI has exited it's process.

◆ ToRegroupFormation()

void CoverShooter.AIFormation.ToRegroupFormation ( )

Notified that the AI is regrouping.

Member Data Documentation

◆ Aggressive

bool CoverShooter.AIFormation.Aggressive = true

Are the members of the formation aggressive (overrides FighterBrain.ImmediateThreatReaction).

◆ CombatDistance

float CoverShooter.AIFormation.CombatDistance = 8

AI will avoid staying further from the leader than this given distance.

◆ FollowerSpacing

float CoverShooter.AIFormation.FollowerSpacing = 1

Minimum space the followers keep between each other.

◆ Formation

FormationType CoverShooter.AIFormation.Formation = FormationType.Free

Formation to take.

Followers use the value presented by the leader ignoring their own.

◆ FreeRoamInDanger

FreeRoamInDangerSettings CoverShooter.AIFormation.FreeRoamInDanger = FreeRoamInDangerSettings.Default()

Settings for the free roam (in danger) formation.

◆ FreeRoamOutOfDanger

FreeRoamOutOfDangerSettings CoverShooter.AIFormation.FreeRoamOutOfDanger = FreeRoamOutOfDangerSettings.Default()

Settings for the roam (out of danger) formation.

◆ Leader

AIFormation CoverShooter.AIFormation.Leader

Formation leader.

◆ Line

LineFormationSettings CoverShooter.AIFormation.Line = LineFormationSettings.Default()

Settings for the line formation.

◆ MinRunDistance

float CoverShooter.AIFormation.MinRunDistance = 4

AI will run towards the position if the distance to it is greater.

◆ RunStaminaFraction

float CoverShooter.AIFormation.RunStaminaFraction = 0.5f

The AI will run only if the stamina is this or higher.

◆ Square

SquareFormationSettings CoverShooter.AIFormation.Square = SquareFormationSettings.Default()

Settings for the square formation.

Property Documentation

◆ Actor

Actor CoverShooter.AIFormation.Actor
get

Actor component.

◆ Brain

FighterBrain CoverShooter.AIFormation.Brain
get

FighterBrain component.

◆ Direction

Vector3 CoverShooter.AIFormation.Direction
get

Direction at which the AI is facing.

◆ MaxDistance

float CoverShooter.AIFormation.MaxDistance
get

Max distance at which the AI can walk around the leader when free roaming in danger.

◆ Position

Vector3 CoverShooter.AIFormation.Position
getprotected

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