Files
wagic/projects/mtg/include/GameStateShop.h
d32.wagic 002851a943 Daddy32: Tasks Mode
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).
2009-12-13 22:12:14 +00:00

55 lines
999 B
C++

#ifndef _GAME_STATE_SHOP_H_
#define _GAME_STATE_SHOP_H_
#include <JGE.h>
#include "../include/GameState.h"
#include "../include/SimpleMenu.h"
#include "../include/ShopItem.h"
#include "../include/Tasks.h"
#define STATE_BUY 1
#define STATE_SELL 2
#define STAGE_SHOP_MENU 3
#define STAGE_SHOP_SHOP 4
#define STAGE_SHOP_TASKS 5
class GameStateShop: public GameState, public JGuiListener
{
private:
ShopItems * shop;
JTexture * altThumb[8];
JQuad * mBack;
JQuad * mBg;
JTexture * mBgTex;
TaskList * taskList;
SimpleMenu * menu;
int mStage;
char starterBuffer[128], boosterBuffer[128];
char setNames[SHOP_BOOSTERS][128];
int setIds[SHOP_BOOSTERS];
void load();
public:
GameStateShop(GameApp* parent);
virtual ~GameStateShop();
virtual void Start();
virtual void End();
virtual void Create();
virtual void Destroy();
virtual void Update(float dt);
virtual void Render();
virtual void ButtonPressed(int controllerId, int controlId);
};
#endif