Debian Codegraph @

TetrisAttack/src/CPauseIfFirstDropEvent.h

raw
1 #ifndef _CPAUSEIFFIRSTDROPEVENT_
2 #define _CPAUSEIFFIRSTDROPEVENT_
3
4 #include "CPauseEvent.h"
5
6 class CPauseIfFirstDropEvent : public CPauseEvent
7 {
8 public:
9 CPauseIfFirstDropEvent(int time, bool c = false) : CPauseEvent(time, c) { }
10
11 CPauseIfFirstDropEvent* getCopy() { return new CPauseIfFirstDropEvent(*this); }
12
13
14 void doUpdate()
15 {
16 if (!d)
17 {
18 CPauseEvent::doUpdate();
19 }
20 else
21 {
22 setDone();
23 return;
24 }
25
26 CGotoData* d2 = dynamic_cast<CGotoData*>(d);
27
28 if (!d2)
29 {
30 CPauseEvent::doUpdate();
31 }
32 else
33 {
34 setDone();
35 return;
36 }
37 }
38
39 };
40
41 #endif