Fission FSN
Loading...
Searching...
No Matches
gfCRoundCongratulationsGui.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCRoundCongratulationsGui.h
4*
5* Purpose: Well done effect at the end of a round
6*
7*********************************************************************/
8
9#ifndef gfCRoundCongratulationsGuihdr
10#define gfCRoundCongratulationsGuihdr
11
13#include <fsCore/fsVec2d.h>
14
16
17
19{
20 friend class fsCComponentFactory;
21
22public:
23
24 static const fsCUniqueId mTypeId;
25
27
28protected:
29
30 void listenersRegisterDo() override;
31 void listenersDeregisterDo() override;
32 fsBool messageProcessDo(const fsCUniqueId& pMessageType,
33 const fsIMessageDispatcher::sMessageParameters& pParam) override;
34
35 void resetDo() override;
36 void updateDo(fsS32 pDeltaMs) override;
37
38 void serialiseDo() override;
39 void deserialiseDo() override;
40
41 static fsIComponent* create(fsCEntity* pParent);
42
44
45private:
46
47 enum eSTATE
48 {
49 eREADY,
50 eSPARKLES,
51 eBANNER,
52 ePAUSE_BEFORE_DONE,
53 eDONE
54 };
55
56 void completedMessageBroadcast() const;
57
58 fsBool skippedMinigame() const;
59
60 void ephemeralEntitiesDestroy();
61 void levelCompleteSet() const;
62
63 fsBool effectableEntityGet(fsCEntity* pEnt) const;
64
65 void bannerCreate();
66 void stateAdvance();
67 void stateInit();
68
69 void miniGameEntityListTrim();
70
71 gfCLevelCompleteCheckerComponent* levelCompleteCheckComponentGet();
72
73 void particleCreate(fsCEntity* pEnt, const fsVec2d& pPos, fsF32 pScale);
74 void miniGameEntitiesCollect();
75
76 void cometCreate();
77 void cometUpdate(fsS32 pDeltaMs);
78
79 eSTATE mState;
80
81 std::vector<fsCEntity*> mCongratulationParticles;
82 fsCEntity* mCongratulationsBannerEnt;
83
84 fsBool mWaitMessage;
85 std::vector<fsCEntity*> mMinigameEnts;
86 std::vector<fsVec2d> mSparklePos; // per-piece bloom positions (nudged off shared axes)
87 std::vector<fsCEntity*>::iterator mCurrMinigameEnt;
88
89 fsCEntity* mCometEnt;
90 fsVec2d mCometPos;
91 fsF32 mCometT;
92 fsF32 mCometSpeed; // derived: total path length / kCometTravelMs
93
94 fsS32 mTime;
95};
96
97#endif
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
fsIComponent(fsCEntity *pParent)
Definition fsIComponent.cpp:86
fsIMessageListenerGuiComponent(fsCEntity *pParent, fsS32 pPriority)
Definition fsIMessageListenerGuiComponent.cpp:4
Definition gfCLevelCompleteCheckerComponent.h:20
void listenersRegisterDo() override
Definition gfCRoundCongratulationsGui.cpp:580
void listenersDeregisterDo() override
Definition gfCRoundCongratulationsGui.cpp:589
void deserialiseDo() override
Definition gfCRoundCongratulationsGui.cpp:206
fsBool messageProcessDo(const fsCUniqueId &pMessageType, const fsIMessageDispatcher::sMessageParameters &pParam) override
Definition gfCRoundCongratulationsGui.cpp:598
friend class fsCComponentFactory
Definition gfCRoundCongratulationsGui.h:20
static const fsCUniqueId mTypeId
Definition gfCRoundCongratulationsGui.h:24
void resetDo() override
Definition gfCRoundCongratulationsGui.cpp:191
virtual ~gfCRoundCongratulationsGui()
gfCRoundCongratulationsGui(fsCEntity *pParent)
Definition gfCRoundCongratulationsGui.cpp:642
void serialiseDo() override
Definition gfCRoundCongratulationsGui.cpp:200
static fsIComponent * create(fsCEntity *pParent)
Definition gfCRoundCongratulationsGui.cpp:631
void updateDo(fsS32 pDeltaMs) override
Definition gfCRoundCongratulationsGui.cpp:556
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
float fsF32
Definition fsBaseTypes.h:28
Definition fsIMessageDispatcher.h:32
Definition fsVec2d.h:16