Third Person Cover Shooter  1.6
CoverShooter.AIAssault Class Reference

Makes the AI run towards the enemy as an assault. More...

Inheritance diagram for CoverShooter.AIAssault:
CoverShooter.AIBase CoverShooter.ICharacterSuccessfulHitListener

Public Member Functions

void AssaultCheck (Vector3 position)
 Responds with an answer to a brain enquiry. More...
 
void OnThreatPosition (Vector3 position)
 Notified by the brains of a new threat position. More...
 
void OnPositionUnreachable (Vector3 position)
 Notified that the target position is unreachable. More...
 
void OnSuccessfulHit (Hit hit)
 Notified of a successful melee hit. More...
 
void ToKeepCloseTo (KeepCloseTo value)
 
void ToStartAssault (Vector3 position)
 Commanded to start an assault towards a threat position. More...
 
void ToStopAssault ()
 Commanded to stop an assault. 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

float NonMeleeDistance = 8
 Distance at which the AI stops it's assault if attacking to fire. More...
 
float MaxMeleeDistance = 1.5f
 Distance at which the AI will start to try and hit the enemy. More...
 
float MinMeleeDistance = 1.0f
 Distance which the AI tries to maintain against the enemy. More...
 
int MeleeHits = 3
 Successful melee hits required before the assault is stopped. More...
 
float MaxDuration = 20
 Maximum time in seconds the AI will perform the assault before moving on to other tactics. More...
 
float TakeCoverChance = 0.5f
 Chance the AI takes cover after assaulting an enemy. More...
 
bool UseMeleeIfPossible = true
 Should the AI attack the enemy with melee. More...
 
float MinBlockDuration = 2
 Minimum time the AI wait blocking before an attack. More...
 
float MaxBlockDuration = 6
 Maximum time the AI will block before attacking, even if the enemy is attacking as well. More...
 
float PreHitFreezeDuration = 0.5f
 Amount of time before a melee attack to not block incoming melee attacks. More...
 
float PostHitFreezeDuration = 0.5f
 Amount of time after a melee attack to not block incoming melee attacks. More...
 

Detailed Description

Makes the AI run towards the enemy as an assault.

Member Function Documentation

◆ AssaultCheck()

void CoverShooter.AIAssault.AssaultCheck ( Vector3  position)

Responds with an answer to a brain enquiry.

◆ OnPositionUnreachable()

void CoverShooter.AIAssault.OnPositionUnreachable ( Vector3  position)

Notified that the target position is unreachable.

◆ OnSuccessfulHit()

void CoverShooter.AIAssault.OnSuccessfulHit ( Hit  hit)

Notified of a successful melee hit.

Implements CoverShooter.ICharacterSuccessfulHitListener.

◆ OnThreatPosition()

void CoverShooter.AIAssault.OnThreatPosition ( Vector3  position)

Notified by the brains of a new threat position.

◆ ToKeepCloseTo()

void CoverShooter.AIAssault.ToKeepCloseTo ( KeepCloseTo  value)

◆ ToStartAssault()

void CoverShooter.AIAssault.ToStartAssault ( Vector3  position)

Commanded to start an assault towards a threat position.

◆ ToStopAssault()

void CoverShooter.AIAssault.ToStopAssault ( )

Commanded to stop an assault.

Member Data Documentation

◆ MaxBlockDuration

float CoverShooter.AIAssault.MaxBlockDuration = 6

Maximum time the AI will block before attacking, even if the enemy is attacking as well.

◆ MaxDuration

float CoverShooter.AIAssault.MaxDuration = 20

Maximum time in seconds the AI will perform the assault before moving on to other tactics.

◆ MaxMeleeDistance

float CoverShooter.AIAssault.MaxMeleeDistance = 1.5f

Distance at which the AI will start to try and hit the enemy.

◆ MeleeHits

int CoverShooter.AIAssault.MeleeHits = 3

Successful melee hits required before the assault is stopped.

◆ MinBlockDuration

float CoverShooter.AIAssault.MinBlockDuration = 2

Minimum time the AI wait blocking before an attack.

◆ MinMeleeDistance

float CoverShooter.AIAssault.MinMeleeDistance = 1.0f

Distance which the AI tries to maintain against the enemy.

◆ NonMeleeDistance

float CoverShooter.AIAssault.NonMeleeDistance = 8

Distance at which the AI stops it's assault if attacking to fire.

◆ PostHitFreezeDuration

float CoverShooter.AIAssault.PostHitFreezeDuration = 0.5f

Amount of time after a melee attack to not block incoming melee attacks.

◆ PreHitFreezeDuration

float CoverShooter.AIAssault.PreHitFreezeDuration = 0.5f

Amount of time before a melee attack to not block incoming melee attacks.

◆ TakeCoverChance

float CoverShooter.AIAssault.TakeCoverChance = 0.5f

Chance the AI takes cover after assaulting an enemy.

◆ UseMeleeIfPossible

bool CoverShooter.AIAssault.UseMeleeIfPossible = true

Should the AI attack the enemy with melee.

If there are no it will approach and fire from close range.


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