wavelength 1.0.0
Loading...
Searching...
No Matches
waitinteractivetask.h
Go to the documentation of this file.
1#pragma once
2
3#include "game/gamecallback.h"
5#include "os/task.h"
6#include "script/dataarray.h"
7
16class WaitInteractiveTask : public Task, public GameCallback {
17public:
24 ~WaitInteractiveTask() override = default;
25
35
42 void OnGemHit() override;
43
51 void OnGemMiss(int nLane) override;
52
59 void OnGemPass() override;
60
68 void OnCapture(int nTrack) override;
69
76 void OnAutocapture() override;
77
85 void OnStreakBroken(int nStreak) override;
86
93 void OnPowerup() override;
94
95protected:
102 void OnStart() override;
103
110 void OnStop() override;
111
118 void OnPoll() override;
119
120private:
127 void EvaluateConditions();
128
136 void EvaluateCondition(DataArray *pCondition);
137
146 void RunActions(DataArray *pCondition, int nFirst);
147
148 TutorialGameLogic *mLogic;
149 DataArray *mStep;
150 int mPassCount;
151 int mMissCount;
152 int mHitCount;
153 int mCaptureCount;
154 int mNthCapture;
155 int mCaptureFailCount;
156 int mMissLane;
157 float mPromptTime;
158 float mActiveIdleTime;
159 int mPowerupCount;
160 int mStreak;
161 int mAutocaptureCount;
162 int mMissStreak;
163 int mMashCount;
164};
Reference-counted array of script data nodes.
Definition dataarray.h:20
Listener the gameplay code tells about the player's actions.
Definition gamecallback.h:10
Task()
Construct an idle task.
Definition task.h:24
Rules of the tutorial song.
Definition tutorialgamelogic.h:36
void OnStop() override
Stop reporting to the task.
void OnStart() override
Install the task as TheGameCallback, and reset the counts and the times.
void OnStreakBroken(int nStreak) override
Count a broken streak, and evaluate the conditions.
WaitInteractiveTask(DataArray *pStep, TutorialGameLogic *pLogic)
Construct a task for one tutorial step.
void OnAutocapture() override
Count an automatic capture, and evaluate the conditions.
void OnPoll() override
Run the actions of the timed conditions whose time has passed.
void OnCapture(int nTrack) override
Count a capture, and evaluate the conditions.
void OnPowerup() override
Count a deployed powerup, and evaluate the conditions.
void OnGemHit() override
Count a hit gem, and evaluate the conditions.
~WaitInteractiveTask() override=default
Destroy the object.
void OnGemPass() override
Count a gem that passed, and evaluate the conditions.
void OnGemMiss(int nLane) override
Count a missed gem, and evaluate the conditions.