JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Achievement Struct Reference

Unlockable Achievement (also called Trophy) More...

#include <jngl/Achievement.hpp>

Public Member Functions

 Achievement (std::string id, std::string name, std::string description, std::string icon, int initialValue=0, int maxValue=1)
 
int getValue () const
 
void increaseValue (int by)
 

Public Attributes

std::string id
 API Name. More...
 
std::string name
 
std::string description
 
std::string icon
 filename for achievement icon, will be loaded when the achievement is displayed More...
 
int maxValue
 
std::function< int(int)> customDisplayValue
 

Detailed Description

Unlockable Achievement (also called Trophy)

Definition at line 15 of file Achievement.hpp.

Collaboration diagram for Achievement:
[legend]

Member Data Documentation

◆ id

API Name.

Definition at line 20 of file Achievement.hpp.

◆ name

Definition at line 22 of file Achievement.hpp.

◆ description

std::string description

Definition at line 23 of file Achievement.hpp.

◆ icon

filename for achievement icon, will be loaded when the achievement is displayed

Definition at line 26 of file Achievement.hpp.

◆ maxValue

int maxValue

Definition at line 28 of file Achievement.hpp.

◆ customDisplayValue

std::function<int(int)> customDisplayValue

Definition at line 34 of file Achievement.hpp.


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