wavelength 1.0.0
Loading...
Searching...
No Matches
TriggerAction Class Referenceabstract

Something a trigger does when its conditions hold. More...

#include <triggeraction.h>

Inheritance diagram for TriggerAction:

Public Member Functions

virtual ~TriggerAction ()
 Release the action.
virtual void Exec ()=0
 Run the action.
virtual bool Poll ()
 Advance an action that TriggerMgr::AddRunning() received.
void Start ()
 Run the action now, or schedule it when it has a delay.
float GetDelay () const
void SetDelay (float fDelay)
 Set the time on the clock of the action before Exec() runs.
int GetClock () const
void SetClock (int nClock)
 Set the TriggerMgr::Clock the action runs on.

Static Public Member Functions

static TriggerAction * New (DataArray *pAction)
 Build the action a node describes.

Static Protected Member Functions

template<class T>
static T * FindObject (DataArray *pAction, const char *pszName)
 Find a renderer object of a class by name, warning when there is none.

Detailed Description

Something a trigger does when its conditions hold.

The RTTI includes the name. Each kind of action is a subclass, built by New() from one node of the actions entry of a trigger. An action runs once through Exec() after its delay. An action that takes time hands itself to TriggerMgr::AddRunning(), which polls it each frame until Poll() reports it done.

Constructor & Destructor Documentation

◆ ~TriggerAction()

virtual TriggerAction::~TriggerAction ( )
inlinevirtual

Release the action.

Ghidra address:
NTSC-U/C: 0x00374670
Ghidra address:
PAL: 0x003e2da0

Member Function Documentation

◆ New()

TriggerAction * TriggerAction::New ( DataArray * pAction)
static

Build the action a node describes.

Node 0 names the kind. An unrecognised name becomes a DataFuncAction that runs the node as a script command.

Parameters
pActionThe node.
Returns
The action.
Ghidra address:
NTSC-U/C: 0x001ffef0
Ghidra address:
PAL: 0x00208c90

◆ Exec()

◆ Poll()

virtual bool TriggerAction::Poll ( )
inlinevirtual

Advance an action that TriggerMgr::AddRunning() received.

The base action finishes at once.

Returns
Whether the action is done.
Ghidra address:
NTSC-U/C: 0x003746a0
Ghidra address:
PAL: 0x003e2dd0

Reimplemented in AnimateAction, AnimateToAction, BackgroundAction, BlurAction, and SetParticlesAction.

◆ Start()

void TriggerAction::Start ( )

Run the action now, or schedule it when it has a delay.

The clock of the action becomes the current clock of TheTriggerMgr first.

Ghidra address:
NTSC-U/C: 0x00202328
Ghidra address:
PAL: 0x0020b0c8

◆ GetDelay()

float TriggerAction::GetDelay ( ) const
inline
Returns
Time on the clock of the action before Exec() runs.

◆ SetDelay()

void TriggerAction::SetDelay ( float fDelay)
inline

Set the time on the clock of the action before Exec() runs.

Parameters
fDelayThe time.

◆ GetClock()

int TriggerAction::GetClock ( ) const
inline
Returns
The TriggerMgr::Clock the action runs on.

◆ SetClock()

void TriggerAction::SetClock ( int nClock)
inline

Set the TriggerMgr::Clock the action runs on.

Parameters
nClockThe clock.

◆ FindObject()

template<class T>
T * TriggerAction::FindObject ( DataArray * pAction,
const char * pszName )
inlinestaticprotected

Find a renderer object of a class by name, warning when there is none.

Every constructor that resolves an object expands it.

Parameters
pActionThe node of the action, which identifies it in the warning.
pszNameThe name of the object.
Returns
The object, or null.

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