Emergency 20 Dokumentation  4.2.0
CampaignProgress-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Namespace ]
6 //[-------------------------------------------------------]
7 namespace em5
8 {
9 
10 
11  //[-------------------------------------------------------]
12  //[ Public methods ]
13  //[-------------------------------------------------------]
15  {
16  return mCampaignIndex;
17  }
18 
20  {
21  return mCurrentCredits;
22  }
23 
24  inline void CampaignProgress::setCurrentCredits(uint32 creditsAmount)
25  {
26  mCurrentCredits = creditsAmount;
27  }
28 
30  {
31  return mCurrentMapIndex;
32  }
33 
35  {
36  mCurrentMapIndex = mapIndex;
37  }
38 
40  {
41  return mCurrentPhaseIndex;
42  }
43 
45  {
46  mCurrentPhaseIndex = phaseIndex;
47  }
48 
50  {
51  return mLastMainEvent;
52  }
53 
55  {
56  mLastMainEvent = mainevent;
57  }
58 
60  {
61  return mLastStandardEventIndex;
62  }
63 
65  {
66  mLastStandardEventIndex = eventIndex;
67  }
68 
70  {
71  mBoughtUnits.clear();
72  }
73 
74  inline void CampaignProgress::addBoughtUnit(const std::string& unitName)
75  {
76  mBoughtUnits.push_back(unitName);
77  }
78 
79  inline const std::vector<std::string>& CampaignProgress::getBoughtUnitList()
80  {
81  return mBoughtUnits;
82  }
83 
85  {
86  mBoughtUpgrades.clear();
87  }
88 
89  inline void CampaignProgress::addBoughtUpgrade(const std::string& upgradeName)
90  {
91  mBoughtUpgrades.push_back(upgradeName);
92  }
93 
94  inline const std::vector<std::string>& CampaignProgress::getBoughtUpgradeList()
95  {
96  return mBoughtUpgrades;
97  }
98 
100  {
101  return mFinishedFreeplayEvents;
102  }
103 
105  {
106  mFinishedFreeplayEvents = number;
107  }
108 
110  {
111  return *mCampaignDefinition;
112  }
113 
114 
115 //[-------------------------------------------------------]
116 //[ Namespace ]
117 //[-------------------------------------------------------]
118 } // em5
uint32 getCurrentCredits() const
Returns the current credit amount.
Definition: CampaignProgress-inl.h:19
Definition: ActionPriority.h:13
void addBoughtUnit(const std::string &unitName)
Add a bought unit to the list.
Definition: CampaignProgress-inl.h:74
void setCurrentMapIndex(uint32 index)
Set the current map index inside the campaign.
Definition: CampaignProgress-inl.h:34
uint32 getCampaignIndex() const
Returns the campaign index.
Definition: CampaignProgress-inl.h:14
unsigned int uint32
Definition: PlatformTypes.h:181
void setLastMainEvent(const qsf::NamedIdentifier &mainevent)
Set the last completed main event.
Definition: CampaignProgress-inl.h:54
EMERGENCY 5 campaign definition class.
Definition: CampaignDefinition.h:43
void clearBoughtUnits()
Clears the list of already bought units (of a freeplay phase)
Definition: CampaignProgress-inl.h:69
void setCurrentPhaseIndex(uint32 phaseIndex)
Set the current phase index.
Definition: CampaignProgress-inl.h:44
const std::vector< std::string > & getBoughtUpgradeList()
Returns the list of already bought upgrades.
Definition: CampaignProgress-inl.h:94
const std::vector< std::string > & getBoughtUnitList()
Returns the list of already bought units (of a freeplay phase)
Definition: CampaignProgress-inl.h:79
const qsf::NamedIdentifier & getLastMainEvent() const
Returns the last completed mainevent.
Definition: CampaignProgress-inl.h:49
void setFinishedFreeplayEventsCount(uint32 number)
Set the number of successfully finished freeplay events.
Definition: CampaignProgress-inl.h:104
void clearBoughtUpgrades()
Clears the list of already bought upgrades (of a freeplay phase)
Definition: CampaignProgress-inl.h:84
const CampaignDefinition & getCampaignDefinition() const
Return campaign definition.
Definition: CampaignProgress-inl.h:109
signed int int32
Definition: PlatformTypes.h:180
void setLastStandardEventIndex(int32 eventIndex)
Set the last completed standard event index in the current freeplay phase.
Definition: CampaignProgress-inl.h:64
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
void setCurrentCredits(uint32 creditsAmount)
Set the current credit amount.
Definition: CampaignProgress-inl.h:24
void addBoughtUpgrade(const std::string &upgradeName)
Add a bought upgrade to the list.
Definition: CampaignProgress-inl.h:89
uint32 getCurrentMapIndex() const
Returns the current map index inside the campaign.
Definition: CampaignProgress-inl.h:29
uint32 getCurrentPhaseIndex() const
Returns the current phase index.
Definition: CampaignProgress-inl.h:39
uint32 getFinishedFreeplayEventsCount() const
Returns the number of successfully finished freeplay events.
Definition: CampaignProgress-inl.h:99
int32 getLastStandardEventIndex() const
Returns the last completed standard event index in the current freeplay phase.
Definition: CampaignProgress-inl.h:59