TopDown Engine  v3.6
MoreMountains.TopDownEngine.AIDecisionHit Class Reference

This decision returns true if the Character got hit this frame, or after the specified number of hits has been reached. More...

Inheritance diagram for MoreMountains.TopDownEngine.AIDecisionHit:
MoreMountains.Tools.AIDecision

Public Member Functions

override void Initialization ()
 On init we grab our Health component More...
 
override bool Decide ()
 On Decide we check whether we've been hit More...
 
override void OnEnterState ()
 On EnterState, resets the hit counter More...
 
override void OnExitState ()
 On exit state, resets the hit counter More...
 

Public Attributes

int NumberOfHits = 1
 The number of hits required to return true. More...
 
- Public Attributes inherited from MoreMountains.Tools.AIDecision
string Label
 a label you can set to organize your AI Decisions, not used by anything else More...
 

Protected Member Functions

virtual bool EvaluateHits ()
 Checks whether we've been hit enough times More...
 
virtual void OnHit ()
 When we get hit we increase our hit counter More...
 
virtual void OnEnable ()
 Grabs our health component and starts listening for OnHit events More...
 
virtual void OnDisable ()
 Stops listening for OnHit events More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIDecision
virtual void Awake ()
 On Awake we grab our Brain More...
 

Protected Attributes

int _hitCounter
 
Health _health
 
Character _character
 
- Protected Attributes inherited from MoreMountains.Tools.AIDecision
AIBrain _brain
 

Additional Inherited Members

- Properties inherited from MoreMountains.Tools.AIDecision
virtual bool DecisionInProgress [get, set]
 

Detailed Description

This decision returns true if the Character got hit this frame, or after the specified number of hits has been reached.

Member Function Documentation

◆ Decide()

override bool MoreMountains.TopDownEngine.AIDecisionHit.Decide ( )
virtual

On Decide we check whether we've been hit

Returns

Implements MoreMountains.Tools.AIDecision.

◆ EvaluateHits()

virtual bool MoreMountains.TopDownEngine.AIDecisionHit.EvaluateHits ( )
protectedvirtual

Checks whether we've been hit enough times

Returns

◆ Initialization()

override void MoreMountains.TopDownEngine.AIDecisionHit.Initialization ( )
virtual

On init we grab our Health component

Reimplemented from MoreMountains.Tools.AIDecision.

◆ OnDisable()

virtual void MoreMountains.TopDownEngine.AIDecisionHit.OnDisable ( )
protectedvirtual

Stops listening for OnHit events

◆ OnEnable()

virtual void MoreMountains.TopDownEngine.AIDecisionHit.OnEnable ( )
protectedvirtual

Grabs our health component and starts listening for OnHit events

◆ OnEnterState()

override void MoreMountains.TopDownEngine.AIDecisionHit.OnEnterState ( )
virtual

On EnterState, resets the hit counter

Reimplemented from MoreMountains.Tools.AIDecision.

◆ OnExitState()

override void MoreMountains.TopDownEngine.AIDecisionHit.OnExitState ( )
virtual

On exit state, resets the hit counter

Reimplemented from MoreMountains.Tools.AIDecision.

◆ OnHit()

virtual void MoreMountains.TopDownEngine.AIDecisionHit.OnHit ( )
protectedvirtual

When we get hit we increase our hit counter

Member Data Documentation

◆ _character

Character MoreMountains.TopDownEngine.AIDecisionHit._character
protected

◆ _health

Health MoreMountains.TopDownEngine.AIDecisionHit._health
protected

◆ _hitCounter

int MoreMountains.TopDownEngine.AIDecisionHit._hitCounter
protected

◆ NumberOfHits

int MoreMountains.TopDownEngine.AIDecisionHit.NumberOfHits = 1

The number of hits required to return true.


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