Emergency 20 Dokumentation  4.2.0
TutorialStepStation3.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
15 #include <qsf/job/JobProxy.h>
16 #include <qsf/math/Transform.h>
19 
20 
21 //[-------------------------------------------------------]
22 //[ Namespace ]
23 //[-------------------------------------------------------]
24 namespace em5
25 {
26 
27 
28  //[-------------------------------------------------------]
29  //[ Classes ]
30  //[-------------------------------------------------------]
36  {
37 
38 
39  //[-------------------------------------------------------]
40  //[ Public methods ]
41  //[-------------------------------------------------------]
42  public:
47  TutorialStepStation3(Tutorial& tutorial);
48 
53  virtual ~TutorialStepStation3();
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public virtual em5::TutorialStep methods ]
58  //[-------------------------------------------------------]
59  public:
60  virtual void startup() override;
61  virtual bool update(const qsf::Time& timePassed) override;
62  virtual void shutdown() override;
63  virtual const std::string getLayerId() const override;
64  virtual const std::string getEraseLayerId() const override;
65  virtual const qsf::Entity* getFocusEntity() override;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Private definitions ]
70  //[-------------------------------------------------------]
71  private:
72  enum class STATE
73  {
74  STARTUP,
101  END,
102  };
103 
104 
105  //[-------------------------------------------------------]
106  //[ Private methods ]
107  //[-------------------------------------------------------]
108  private:
109  void onStwGetsSpawned(const qsf::MessageParameters& parameters);
110  void onLetPersonExitStwVehicle(const qsf::MessageParameters& parameters);
111  void onFightStarted(const qsf::MessageParameters& parameters);
112  void onGetPepperSprayCommandExecuted(const qsf::MessageParameters& parameters);
113  void onUsePepperSprayCommandExecuted(const qsf::MessageParameters& parameters);
114  void onGangsterGotStunned(const qsf::MessageParameters& parameters);
115  void onGetHandcuffsCommandExecuted(const qsf::MessageParameters& parameters);
116  void onArrestGangsterCommandExecuted(const qsf::MessageParameters& parameters);
117  void onSelectionChanged(const qsf::MessageParameters& parameters);
118 
119  void gatherAllEventEntities();
120  void setupGangsterForLeavingTheSupermarket();
121  void setupPersonEntityExitBuildingAtDoor(qsf::Entity& personEntity, const qsf::Entity& buildingEntity);
122  void setupPersonEntityToLeaveTheSupermarket(qsf::Entity& personEntity, const qsf::Transform& targetTransform, float waitTimeOffsetInSeconds);
123  void equipGangsterWithCase();
124 
125  void ShowTutorialObjectives19();
126  void ShowTutorialObjectives20();
127  void ShowTutorialObjectives21();
128  void ShowTutorialObjectives22();
129 
130  bool isPoliceVehicleListHudWindowOpen(const qsf::Time& timePassed) const;
131  bool isStwVehicleOrderHudWindowOpen(const qsf::Time& timePassed) const;
132 
133  void showStwTargetEntityOnMapAndOnMinimap(bool show);
134 
135  void checkForHint22(const qsf::Time& timePassed);
136 
137  void letGangsterAttackNearestPolicemen();
138  void attackTarget(qsf::Entity& gangsterEntity, qsf::Entity& victimEntity);
139 
140 
141  //[-------------------------------------------------------]
142  //[ Private data ]
143  //[-------------------------------------------------------]
144  private:
145  STATE mCurrentState;
146  bool mGotoEventBtnPressed;
147  qsf::Entity* mGangsterPerson;
148  qsf::Entity* mGangsterTargetPositionEntity;
149  qsf::Entity* mCaseEntity;
150  qsf::Transform mGansterFinalTransform;
151  qsf::Entity* mMaleWaverPerson;
152  qsf::Transform mMaleWaverPersonTargetTransform;
153  qsf::Entity* mFemaleWaverPerson;
154  qsf::Transform mFemaleWaverPersonTargetTransform;
155  qsf::Entity* mStwOrderAreaEntity;
156  qsf::Time mRemainingWaitTimeBeforeSupervisor34Start;
157  bool mCheckForHint22;
158  qsf::Time mRemainingWaitTimeForHint22;
159  qsf::Entity* mUnitEntity;
160  qsf::Entity* mFightingPoliceman;
161  qsf::Time mRemainingWaitTimeForHint23;
162  bool mHint23Shown;
163  qsf::Time mRemainingWaitTimeForHint25;
164  bool mHint25Shown;
165  qsf::Time mRemainingWaitTimeForHint27;
166  bool mHint27Shown;
167  int mHudActionButtonIdEnable;
168  int mHudActionButtonIdBlink;
169  bool mCurrentSelectedIsPolicePerson;
170  qsf::Transform mCameraTransformOnGotToEventClick;
171 
172  qsf::MessageProxy mMessageProxy;
173  qsf::MessageProxy mSelectionChangeMessageProxy;
174 
175  bool mSkippedOneFrame; // Dummy variable to indicate if the have skipped one frame
176 
177 
178  };
179 
180 
181 //[-------------------------------------------------------]
182 //[ Namespace ]
183 //[-------------------------------------------------------]
184 } // em5
Definition: ActionPriority.h:13
EMERGENCY 5 tutorial step station 3.
Definition: TutorialStepStation3.h:35
virtual bool update(const qsf::Time &timePassed) override
Updates the tutorial step.
virtual const std::string getEraseLayerId() const override
Entity class.
Definition: Entity.h:46
Message parameters class.
Definition: MessageParameters.h:34
EMERGENCY 5 tutorial step base class.
Definition: TutorialStep.h:48
Message listener proxy class.
Definition: MessageProxy.h:47
virtual void shutdown() override
Shutdown call for the tutorial step.
3D transform class
Definition: Transform.h:45
TutorialStepStation3(Tutorial &tutorial)
Default constructor.
virtual void startup() override
Startup call for the tutorial step.
virtual const qsf::Entity * getFocusEntity() override
EMERGENCY 5 tutorial event.
Definition: Tutorial.h:55
virtual ~TutorialStepStation3()
Destructor.
virtual const std::string getLayerId() const override
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32