Gives the user the opportunity to earn some credits for performing various tasks.
Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.
Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
49 lines
846 B
C++
49 lines
846 B
C++
#ifndef _CREDITS_H_
|
|
#define _CREDITS_H_
|
|
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <JGE.h>
|
|
#include <JLBFont.h>
|
|
#include <time.h>
|
|
#include "../include/Player.h"
|
|
|
|
class GameApp;
|
|
|
|
using namespace std;
|
|
|
|
|
|
class CreditBonus{
|
|
public:
|
|
int value;
|
|
string text;
|
|
CreditBonus(int _value, string _text);
|
|
void Render(float x, float y, JLBFont * font);
|
|
};
|
|
|
|
class Credits{
|
|
private:
|
|
time_t gameLength;
|
|
int isDifficultyUnlocked();
|
|
int isMomirUnlocked();
|
|
int isEvilTwinUnlocked();
|
|
int isRandomDeckUnlocked();
|
|
int unlockRandomSet();
|
|
public:
|
|
int value;
|
|
Player * p1, *p2;
|
|
GameApp * app;
|
|
int showMsg;
|
|
int unlocked;
|
|
JQuad * unlockedQuad;
|
|
JTexture * unlockedTex;
|
|
string unlockedString;
|
|
vector<CreditBonus *> bonus;
|
|
Credits();
|
|
~Credits();
|
|
void compute(Player * _p1, Player * _p2, GameApp * _app);
|
|
void Render();
|
|
};
|
|
|
|
#endif |