22 #ifndef NANCY_ACTION_WHACKITPUZZLE_H 23 #define NANCY_ACTION_WHACKITPUZZLE_H 25 #include "engines/nancy/commontypes.h" 26 #include "engines/nancy/action/puzzlerecord.h" 27 #include "engines/nancy/action/physicalobject.h" 43 void registerGraphics()
override;
46 void execute()
override;
49 bool isViewportRelative()
const override {
return true; }
52 Common::String getRecordTypeName()
const override {
return "WhackItPuzzle"; }
64 uint32 frameRemainder = 0;
67 void start(
const Animation *newAnimation);
68 void advance(uint32 time,
bool loops);
71 const Common::Rect &getSrc()
const {
return animation->frames[MIN<uint>(frame, animation->frames.
size() - 1)]; }
82 BeeState state = kFlying;
83 uint32 stateEndTime = 0;
94 bool isViewportRelative()
const override {
return true; }
103 uint32 getRandomTime(uint32 minTime, uint32 maxTime)
const;
104 void spawnBee(
Bee &bee);
105 void flyAgain(
Bee &bee);
106 void knockDown(
Bee &bee);
107 void updateBee(
Bee &bee, uint32 numTicks);
109 void updateSounds(uint numReviving, uint numFlying, uint numAngry);
122 uint32 _downTime[2] = { 0, 0 };
123 uint32 _revivingTime[2] = { 0, 0 };
124 uint32 _flyingTime[2] = { 0, 0 };
125 uint32 _angryTime[2] = { 0, 0 };
128 bool _stopsWhenAllDown =
false;
141 int32 _maxStings = 0;
148 bool _isActive =
true;
149 int32 _numStings = 0;
150 uint32 _lastStingTime = 0;
151 bool _hasStung =
false;
153 uint32 _lastUpdateTime = 0;
155 bool _isMouseInside =
false;
156 bool _isLost =
false;
157 bool _exitRequested =
false;
163 #endif // NANCY_ACTION_WHACKITPUZZLE_H
Definition: commontypes.h:206
Definition: renderobject.h:36
Definition: whackitpuzzle.h:91
Definition: commontypes.h:324
Definition: whackitpuzzle.h:81
Definition: whackitpuzzle.h:97
size_type size() const
Definition: array.h:316
Definition: puzzlerecord.h:37
Definition: whackitpuzzle.h:36
Definition: commontypes.h:201
Definition: physicalobject.h:36
Definition: actionmanager.h:32
Definition: whackitpuzzle.h:61
Definition: whackitpuzzle.h:54