Third Person Cover Shooter  1.6
CoverShooter.GrenadeAction Class Reference

Throws a grenade. More...

Inheritance diagram for CoverShooter.GrenadeAction:
CoverShooter.AIAction

Public Member Functions

override bool WillMoveForPosition (Vector3 target)
 Will the action require it's executor to move if targeted at the given position. More...
 
override bool IsNeededFor (Actor target)
 Should the AI perform the action on the given target. More...
 
override bool OnThrow ()
 Catches the animator event during the throw animation and may perform the action. More...
 
override bool Update ()
 Updates the action during it's execution. More...
 
override void Stop ()
 Stops the action at the end of it's execution. More...
 
- Public Member Functions inherited from CoverShooter.AIAction
void SetupActor (Actor actor)
 Set's the actor that executes the action. More...
 
bool Execute (Actor actor)
 Starts the action by the given executor. More...
 
bool Execute (Actor actor, Vector3 position)
 Starts the action by the given executor. More...
 
bool Execute (Actor actor, Actor target)
 Starts the action by the given executor. More...
 
virtual bool OnFinishAction ()
 Catches the animator event during the execution and may perform the action. More...
 
virtual bool WillMoveForActor (Actor target)
 Will the action require it's executor to move if targeted at the given actor. More...
 

Public Attributes

Color DefaultColor = Color.red
 Associated UI color. More...
 
bool AlwaysUseDefaultColor = false
 Should the UI color always be set to default instead of looking for one inside the grenade prefab. More...
 
float Distance = 10
 Throw distance. More...
 
Grenade Prefab
 Grenade that will be copied and thrown. More...
 
- Public Attributes inherited from CoverShooter.AIAction
bool Auto
 Is the action performed automatically by the AI. More...
 
float Cooldown = 1
 Time in seconds to wait after activation before the action can be performed again. More...
 

Protected Member Functions

override bool Start ()
 Starts the action. More...
 
- Protected Member Functions inherited from CoverShooter.AIAction
void MarkCooldown ()
 Set's the cooldown timer. More...
 

Protected Attributes

CharacterMotor _motor
 
- Protected Attributes inherited from CoverShooter.AIAction
Actor _actor
 
Actor _targetActor
 
Vector3 _targetPosition
 

Properties

override bool CanTargetGround [get]
 Can the action be targeted at a location and not actors. More...
 
override bool CanTargetEnemy [get]
 Can the action target enemies of the executor directly. More...
 
override float UIRadius [get]
 Radius of the target sphere when the action is displayed in the UI. More...
 
override Color UIColor [get]
 Color of the action when presented in the UI. More...
 
Grenade Grenade [get]
 Potential grenade that will be thrown. More...
 
- Properties inherited from CoverShooter.AIAction
bool CanTargetAny [get]
 Can the action be targeted at both enemies and allies. More...
 
bool NeedsTargetLocation [get]
 Does the action require a target location to be executed. More...
 
bool NeedsOnlySelf [get]
 Can the action include self. More...
 
bool NeedsSingleTargetActor [get]
 Is the action always targeted at a single actor. More...
 
float Wait [get]
 Time in seconds left to wait before the action can be used again. More...
 
virtual bool CanTargetSelf [get]
 Can the action target the executor themselves. More...
 
virtual bool CanTargetEnemy [get]
 Can the action target enemies of the executor directly. More...
 
virtual bool CanTargetAlly [get]
 Can the action target allies of the executor directly. More...
 
virtual bool ShouldIgnoreDead [get]
 Should the UI ignore dead actors when picking targets. More...
 
virtual bool CanTargetGround [get]
 Can the action be targeted at a location and not actors. More...
 
virtual bool CanTargetMultiple [get]
 Can the action target multiple actors at once. More...
 
virtual bool HasNoTimeout [get]
 Can the action be cancelled if the Timout in AIActions is triggered. More...
 
virtual float UIRadius [get]
 Radius of the target sphere when the action is displayed in the UI. More...
 
abstract Color UIColor [get]
 Color of the action when presented in the UI. More...
 

Detailed Description

Throws a grenade.

Member Function Documentation

◆ IsNeededFor()

override bool CoverShooter.GrenadeAction.IsNeededFor ( Actor  target)
virtual

Should the AI perform the action on the given target.

Reimplemented from CoverShooter.AIAction.

◆ OnThrow()

override bool CoverShooter.GrenadeAction.OnThrow ( )
virtual

Catches the animator event during the throw animation and may perform the action.

Returns true if that is the case.

Reimplemented from CoverShooter.AIAction.

◆ Start()

override bool CoverShooter.GrenadeAction.Start ( )
protectedvirtual

Starts the action.

Returns true if the action should continue running until finished.

Implements CoverShooter.AIAction.

◆ Stop()

override void CoverShooter.GrenadeAction.Stop ( )
virtual

Stops the action at the end of it's execution.

Implements CoverShooter.AIAction.

◆ Update()

override bool CoverShooter.GrenadeAction.Update ( )
virtual

Updates the action during it's execution.

If false is returned the action is stopped.

Implements CoverShooter.AIAction.

◆ WillMoveForPosition()

override bool CoverShooter.GrenadeAction.WillMoveForPosition ( Vector3  target)
virtual

Will the action require it's executor to move if targeted at the given position.

Reimplemented from CoverShooter.AIAction.

Member Data Documentation

◆ _motor

CharacterMotor CoverShooter.GrenadeAction._motor
protected

◆ AlwaysUseDefaultColor

bool CoverShooter.GrenadeAction.AlwaysUseDefaultColor = false

Should the UI color always be set to default instead of looking for one inside the grenade prefab.

◆ DefaultColor

Color CoverShooter.GrenadeAction.DefaultColor = Color.red

Associated UI color.

Used if there is no preview explosion color on the grenade.

◆ Distance

float CoverShooter.GrenadeAction.Distance = 10

Throw distance.

◆ Prefab

Grenade CoverShooter.GrenadeAction.Prefab

Grenade that will be copied and thrown.

Property Documentation

◆ CanTargetEnemy

override bool CoverShooter.GrenadeAction.CanTargetEnemy
get

Can the action target enemies of the executor directly.

◆ CanTargetGround

override bool CoverShooter.GrenadeAction.CanTargetGround
get

Can the action be targeted at a location and not actors.

◆ Grenade

Grenade CoverShooter.GrenadeAction.Grenade
get

Potential grenade that will be thrown.

◆ UIColor

override Color CoverShooter.GrenadeAction.UIColor
get

Color of the action when presented in the UI.

◆ UIRadius

override float CoverShooter.GrenadeAction.UIRadius
get

Radius of the target sphere when the action is displayed in the UI.


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