wavelength 1.0.0
Loading...
Searching...
No Matches
WaitInteractiveTask Class Reference

Task that waits until the player performs the game actions a tutorial step lists. More...

#include <waitinteractivetask.h>

Inheritance diagram for WaitInteractiveTask:
Collaboration diagram for WaitInteractiveTask:

Public Member Functions

 ~WaitInteractiveTask () override=default
 Destroy the object.
 WaitInteractiveTask (DataArray *pStep, TutorialGameLogic *pLogic)
 Construct a task for one tutorial step.
void OnGemHit () override
 Count a hit gem, and evaluate the conditions.
void OnGemMiss (int nLane) override
 Count a missed gem, and evaluate the conditions.
void OnGemPass () override
 Count a gem that passed, and evaluate the conditions.
void OnCapture (int nTrack) override
 Count a capture, and evaluate the conditions.
void OnAutocapture () override
 Count an automatic capture, and evaluate the conditions.
void OnStreakBroken (int nStreak) override
 Count a broken streak, and evaluate the conditions.
void OnPowerup () override
 Count a deployed powerup, and evaluate the conditions.
Public Member Functions inherited from Task
 Task ()
 Construct an idle task.
virtual ~Task ()
 Release the task.
int Poll ()
 Report the state after giving a running task one poll.
void Start ()
 Enter the running state and call OnStart(), unless the task is already running.
void Stop ()
 Call OnStop() when the task is running, and return to the idle state.
void Finish (bool bSucceeded)
 End the task from outside its poll, and call OnStop() when it was running.
int GetState () const
 Report mState.
Public Member Functions inherited from GameCallback
virtual ~GameCallback ()
 Release the listener.
virtual void OnPitch ()
 Report a pitch change.
virtual void OnLoop ()
 Report that looping was switched on.
virtual void OnSectionChange (int nSection)
 Report a section change.
virtual void OnBurnPattern ()
 Report a burned pattern.
virtual void OnErase ()
 Report an erased pattern.
virtual void OnEraseSection ()
 Report an erased section.
virtual void OnRotate (bool bRight)
 Report a rotation.
virtual void OnPatternMenuOpen ()
 Report that the pattern menu was opened.

Protected Member Functions

void OnStart () override
 Install the task as TheGameCallback, and reset the counts and the times.
void OnStop () override
 Stop reporting to the task.
void OnPoll () override
 Run the actions of the timed conditions whose time has passed.

Additional Inherited Members

Public Types inherited from Task
enum  State { kStateIdle = 0 , kStateRunning = 1 , kStateDone = 2 , kStateFailed = 3 }
 Values of mState. More...
Static Public Member Functions inherited from GameCallback
static void Set (GameCallback *pCallback)
 Install the listener the gameplay code reports to.

Detailed Description

Task that waits until the player performs the game actions a tutorial step lists.

The RTTI includes the class name and records Task and GameCallback as the bases. Each node of the step after the first is a condition, an array whose first node is the condition name and whose later nodes are the actions to run when the condition is met. An action is a script command, or the symbol done to finish the task. The counts reset when their condition fires.

Constructor & Destructor Documentation

◆ ~WaitInteractiveTask()

WaitInteractiveTask::~WaitInteractiveTask ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x00344178
Ghidra address:
PAL: 0x003b16b0

◆ WaitInteractiveTask()

WaitInteractiveTask::WaitInteractiveTask ( DataArray * pStep,
TutorialGameLogic * pLogic )

Construct a task for one tutorial step.

Parameters
pStepThe step, with the conditions to wait for.
pLogicThe tutorial the step belongs to.
Ghidra address:
NTSC-U/C: 0x001419f0
Ghidra address:
PAL: 0x00143390

Member Function Documentation

◆ OnGemHit()

void WaitInteractiveTask::OnGemHit ( )
overridevirtual

Count a hit gem, and evaluate the conditions.

Ghidra address:
NTSC-U/C: 0x00141cd8
Ghidra address:
PAL: 0x00143678

Reimplemented from GameCallback.

◆ OnGemMiss()

void WaitInteractiveTask::OnGemMiss ( int nLane)
overridevirtual

Count a missed gem, and evaluate the conditions.

Parameters
nLaneThe lane of the gem.
Ghidra address:
NTSC-U/C: 0x00141c98
Ghidra address:
PAL: 0x00143638

Reimplemented from GameCallback.

◆ OnGemPass()

void WaitInteractiveTask::OnGemPass ( )
overridevirtual

Count a gem that passed, and evaluate the conditions.

Ghidra address:
NTSC-U/C: 0x00141c68
Ghidra address:
PAL: 0x00143608

Reimplemented from GameCallback.

◆ OnCapture()

void WaitInteractiveTask::OnCapture ( int nTrack)
overridevirtual

Count a capture, and evaluate the conditions.

Parameters
nTrackThe captured track.
Ghidra address:
NTSC-U/C: 0x00141d10
Ghidra address:
PAL: 0x001436b0

Reimplemented from GameCallback.

◆ OnAutocapture()

void WaitInteractiveTask::OnAutocapture ( )
overridevirtual

Count an automatic capture, and evaluate the conditions.

Ghidra address:
NTSC-U/C: 0x00141d58
Ghidra address:
PAL: 0x001436f8

Reimplemented from GameCallback.

◆ OnStreakBroken()

void WaitInteractiveTask::OnStreakBroken ( int nStreak)
overridevirtual

Count a broken streak, and evaluate the conditions.

Parameters
nStreakThe length of the streak that broke. The task does not read it.
Ghidra address:
NTSC-U/C: 0x00141d88
Ghidra address:
PAL: 0x00143728

Reimplemented from GameCallback.

◆ OnPowerup()

void WaitInteractiveTask::OnPowerup ( )
overridevirtual

Count a deployed powerup, and evaluate the conditions.

Ghidra address:
NTSC-U/C: 0x00141dc0
Ghidra address:
PAL: 0x00143760

Reimplemented from GameCallback.

◆ OnStart()

void WaitInteractiveTask::OnStart ( )
overrideprotectedvirtual

Install the task as TheGameCallback, and reset the counts and the times.

Ghidra address:
NTSC-U/C: 0x00141a58
Ghidra address:
PAL: 0x001433f8

Reimplemented from Task.

◆ OnStop()

void WaitInteractiveTask::OnStop ( )
overrideprotectedvirtual

Stop reporting to the task.

Ghidra address:
NTSC-U/C: 0x00141ac8
Ghidra address:
PAL: 0x00143468

Reimplemented from Task.

◆ OnPoll()

void WaitInteractiveTask::OnPoll ( )
overrideprotectedvirtual

Run the actions of the timed conditions whose time has passed.

Ghidra address:
NTSC-U/C: 0x00141ae8
Ghidra address:
PAL: 0x00143488

Reimplemented from Task.


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