Third Person Cover Shooter  1.6
CoverShooter.Actor Class Reference

Each character inside the level must have this component as the AI only regards objects with Actor as characters. More...

Inheritance diagram for CoverShooter.Actor:
CoverShooter.ICharacterHeightListener CoverShooter.ICharacterCoverListener CoverShooter.ICharacterHealthListener

Public Member Functions

void OnEnterGrass (GrassZone zone)
 The actor enters a flashlight or any similar object. More...
 
void OnLeaveGrass (GrassZone zone)
 The actor leaves a lighted area. More...
 
void OnEnterLight (LightZone zone)
 The actor enters a flashlight or any similar object. More...
 
void OnLeaveLight (LightZone zone)
 The actor leaves a lighted area. More...
 
void OnEnterDarkness (DarkZone zone)
 The actor enters a dark area. More...
 
void OnLeaveDarkness (DarkZone zone)
 The actor leaves a dark area. More...
 
void OnStandingHeight (float value)
 Notify the component of the standing height (used when in cover). More...
 
void OnCurrentHeight (float value)
 Character has changed their current height (crouches or stands up). More...
 
void OnDead ()
 Notified by components that the actor is no longer alive. More...
 
void OnResurrect ()
 Notified that the actor has been resurrected. More...
 
void OnEnterCover (Cover cover)
 Tell the threat to mark itself as being behind the given cover. More...
 
void OnLeaveCover ()
 Tell the threat to mark itself as out of cover. More...
 
void OnAlerted ()
 Notified by an AI that the actor is alerted. More...
 
void OnSuccessfulHit (Hit hit)
 Notified that an enemy actor has been hit. More...
 
float GetViewDistance (float viewDistance, bool isAlerted)
 Calculates the view distance when looking at this actor. More...
 

Public Attributes

int Side = 0
 Team number used by the AI. More...
 
bool IsAggressive = true
 Is the actor aggresive. More...
 

Properties

bool IsAlive [get]
 Is the object alive. More...
 
bool IsArmed [get]
 Does the character have a weapon in their hands. More...
 
Cover Cover [get]
 Cover the threat is hiding behind. More...
 
Vector3 RelativeStandingTopPosition [get]
 Top position when the actor is standing. More...
 
Vector3 RelativeTopPosition [get]
 Current top position. More...
 
Vector3 StandingTopPosition [get]
 Top position when the actor is standing. More...
 
Vector3 TopPosition [get]
 Current top position. More...
 
Collider Collider [get]
 Collider attached to the object. More...
 
Vector3 HeadDirection [get]
 Current look direction of the actor's head. More...
 
bool IsAlerted [get]
 Is the AI attached to the actor alerted. More...
 
float HealthFraction [get]
 Fractional health value. More...
 
float Health [get]
 Fractional health value. More...
 
Actor Threat [get]
 Current threat of the actor. More...
 
Rigidbody Body [get]
 Physical body of the object. More...
 
CharacterMotor Motor [get]
 Character motor attached to the object. More...
 

Detailed Description

Each character inside the level must have this component as the AI only regards objects with Actor as characters.

Member Function Documentation

◆ GetViewDistance()

float CoverShooter.Actor.GetViewDistance ( float  viewDistance,
bool  isAlerted 
)

Calculates the view distance when looking at this actor.

◆ OnAlerted()

void CoverShooter.Actor.OnAlerted ( )

Notified by an AI that the actor is alerted.

◆ OnCurrentHeight()

void CoverShooter.Actor.OnCurrentHeight ( float  value)

Character has changed their current height (crouches or stands up).

Implements CoverShooter.ICharacterHeightListener.

◆ OnDead()

void CoverShooter.Actor.OnDead ( )

Notified by components that the actor is no longer alive.

Implements CoverShooter.ICharacterHealthListener.

◆ OnEnterCover()

void CoverShooter.Actor.OnEnterCover ( Cover  cover)

Tell the threat to mark itself as being behind the given cover.

Implements CoverShooter.ICharacterCoverListener.

◆ OnEnterDarkness()

void CoverShooter.Actor.OnEnterDarkness ( DarkZone  zone)

The actor enters a dark area.

◆ OnEnterGrass()

void CoverShooter.Actor.OnEnterGrass ( GrassZone  zone)

The actor enters a flashlight or any similar object.

◆ OnEnterLight()

void CoverShooter.Actor.OnEnterLight ( LightZone  zone)

The actor enters a flashlight or any similar object.

◆ OnLeaveCover()

void CoverShooter.Actor.OnLeaveCover ( )

Tell the threat to mark itself as out of cover.

Implements CoverShooter.ICharacterCoverListener.

◆ OnLeaveDarkness()

void CoverShooter.Actor.OnLeaveDarkness ( DarkZone  zone)

The actor leaves a dark area.

◆ OnLeaveGrass()

void CoverShooter.Actor.OnLeaveGrass ( GrassZone  zone)

The actor leaves a lighted area.

◆ OnLeaveLight()

void CoverShooter.Actor.OnLeaveLight ( LightZone  zone)

The actor leaves a lighted area.

◆ OnResurrect()

void CoverShooter.Actor.OnResurrect ( )

Notified that the actor has been resurrected.

Implements CoverShooter.ICharacterHealthListener.

◆ OnStandingHeight()

void CoverShooter.Actor.OnStandingHeight ( float  value)

Notify the component of the standing height (used when in cover).

Implements CoverShooter.ICharacterHeightListener.

◆ OnSuccessfulHit()

void CoverShooter.Actor.OnSuccessfulHit ( Hit  hit)

Notified that an enemy actor has been hit.

May be set as the Threat.

Member Data Documentation

◆ IsAggressive

bool CoverShooter.Actor.IsAggressive = true

Is the actor aggresive.

Value used by the AI. Owning AI usually overwrites the value if present.

◆ Side

int CoverShooter.Actor.Side = 0

Team number used by the AI.

Property Documentation

◆ Body

Rigidbody CoverShooter.Actor.Body
get

Physical body of the object.

Can be null.

◆ Collider

Collider CoverShooter.Actor.Collider
get

Collider attached to the object.

◆ Cover

Cover CoverShooter.Actor.Cover
get

Cover the threat is hiding behind.

Null if there isn't any.

◆ HeadDirection

Vector3 CoverShooter.Actor.HeadDirection
get

Current look direction of the actor's head.

◆ Health

float CoverShooter.Actor.Health
get

Fractional health value.

◆ HealthFraction

float CoverShooter.Actor.HealthFraction
get

Fractional health value.

◆ IsAlerted

bool CoverShooter.Actor.IsAlerted
get

Is the AI attached to the actor alerted.

◆ IsAlive

bool CoverShooter.Actor.IsAlive
get

Is the object alive.

◆ IsArmed

bool CoverShooter.Actor.IsArmed
get

Does the character have a weapon in their hands.

◆ Motor

CharacterMotor CoverShooter.Actor.Motor
get

Character motor attached to the object.

◆ RelativeStandingTopPosition

Vector3 CoverShooter.Actor.RelativeStandingTopPosition
get

Top position when the actor is standing.

◆ RelativeTopPosition

Vector3 CoverShooter.Actor.RelativeTopPosition
get

Current top position.

◆ StandingTopPosition

Vector3 CoverShooter.Actor.StandingTopPosition
get

Top position when the actor is standing.

◆ Threat

Actor CoverShooter.Actor.Threat
get

Current threat of the actor.

Can be set by the AI. Otherwise a last attacked enemy is used.

◆ TopPosition

Vector3 CoverShooter.Actor.TopPosition
get

Current top position.


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