Emergency 20 Dokumentation  4.2.0
em5::Achievement Class Reference

EMERGENCY 5 specialized achievement class. More...

#include <Achievement.h>

Inheritance diagram for em5::Achievement:
qsf::game::Achievement

Public Types

enum  AchievementType { NORMAL_ACHIEVEMENT, TITLE_ACHIEVEMENT }
 
enum  AchievementPlace {
  GENERAL, MAINEVENT, FREEPLAY, CHALLENGE,
  MULTIPLAY_COOP, MULTIPLAY_AGAINST
}
 

Public Member Functions

 Achievement (const std::string &name, const std::string &title, const std::string &description, const std::string &icon, uint32 points, AchievementType achievementType, float neededProgress, AchievementPlace achievementPlace, VersionSwitch::Edition achievementEdition)
 Default constructor for normal achievement. More...
 
 Achievement (const std::string &name, const std::string &title, const std::string &icon, AchievementType achievementType=NORMAL_ACHIEVEMENT, float neededPoints=0.0f, AchievementPlace achievementPlace=GENERAL, VersionSwitch::Edition achievementEdition=VersionSwitch::Edition::STANDARD)
 Constructor for rank achievement. More...
 
AchievementType getAchievementType () const
 Return the achievement type. More...
 
AchievementPlace getAchievementPlace () const
 Return the achievement place. More...
 
std::string getIconName () const
 Return just the icon name (e.g. "em5_rank-medals_01" or "em5_rank-medals_deluxe_01") More...
 
std::string getMiniIconName () const
 Return just the icon name (e.g. "mini-medals_01" or "mini-medals_deluxe_01") More...
 
VersionSwitch::Edition getEdition () const
 Get application edition associated with this achievement. More...
 
uint32 getCampaignIndex () const
 Get campaign index associated with this achievement. More...
 
virtual void serialize (qsf::BinarySerializer &serializer) override
 
- Public Member Functions inherited from qsf::game::Achievement
 Achievement (const std::string &name, float neededProgress=1.0f, bool steamAchievement=true)
 Constructor. More...
 
virtual ~Achievement ()
 Destructor. More...
 
bool isCompleted () const
 Check whether the achievement is completed. More...
 

Public Attributes

std::string mTitle
 Title as localizable text ID. More...
 
std::string mDescription
 Description as localizable text ID. More...
 
uint32 mPoints
 Achievement point value. More...
 
- Public Attributes inherited from qsf::game::Achievement
NamedIdentifier mName
 
float mCurrentProgress
 
float mNeededProgress
 
bool mSteamAchievement
 

Detailed Description

EMERGENCY 5 specialized achievement class.

Member Enumeration Documentation

Enumerator
GENERAL 
MAINEVENT 
FREEPLAY 
CHALLENGE 
MULTIPLAY_COOP 
MULTIPLAY_AGAINST 
Enumerator
NORMAL_ACHIEVEMENT 
TITLE_ACHIEVEMENT 

Constructor & Destructor Documentation

em5::Achievement::Achievement ( const std::string &  name,
const std::string &  title,
const std::string &  description,
const std::string &  icon,
uint32  points,
AchievementType  achievementType,
float  neededProgress,
AchievementPlace  achievementPlace,
VersionSwitch::Edition  achievementEdition 
)

Default constructor for normal achievement.

em5::Achievement::Achievement ( const std::string &  name,
const std::string &  title,
const std::string &  icon,
AchievementType  achievementType = NORMAL_ACHIEVEMENT,
float  neededPoints = 0.0f,
AchievementPlace  achievementPlace = GENERAL,
VersionSwitch::Edition  achievementEdition = VersionSwitch::Edition::STANDARD 
)

Constructor for rank achievement.

Member Function Documentation

AchievementPlace em5::Achievement::getAchievementPlace ( ) const

Return the achievement place.

AchievementType em5::Achievement::getAchievementType ( ) const

Return the achievement type.

uint32 em5::Achievement::getCampaignIndex ( ) const

Get campaign index associated with this achievement.

VersionSwitch::Edition em5::Achievement::getEdition ( ) const

Get application edition associated with this achievement.

std::string em5::Achievement::getIconName ( ) const

Return just the icon name (e.g. "em5_rank-medals_01" or "em5_rank-medals_deluxe_01")

std::string em5::Achievement::getMiniIconName ( ) const

Return just the icon name (e.g. "mini-medals_01" or "mini-medals_deluxe_01")

virtual void em5::Achievement::serialize ( qsf::BinarySerializer serializer)
overridevirtual

Reimplemented from qsf::game::Achievement.

Member Data Documentation

std::string em5::Achievement::mDescription

Description as localizable text ID.

uint32 em5::Achievement::mPoints

Achievement point value.

std::string em5::Achievement::mTitle

Title as localizable text ID.


The documentation for this class was generated from the following file: