In details: - I removed my player swap idea, it caused tons of issues with randoms - instead I simply keep both peer on the exact same game and added one single parameter allowing to configure the view on the game. So, each peer is rendering the same game (gameObserver class) from a different player point of view (DuelLayers and related classes). - a lot of gui stuff are missing to prevent user forbidden interactions but it works fine on Windows
36 lines
802 B
C++
36 lines
802 B
C++
#ifndef _GUIAVATARS_H_
|
|
#define _GUIAVATARS_H_
|
|
|
|
#include "GuiLayers.h"
|
|
|
|
struct GuiAvatar;
|
|
class GuiGraveyard;
|
|
class GuiLibrary;
|
|
class GuiOpponentHand;
|
|
class GuiAvatars: public GuiLayer
|
|
{
|
|
protected:
|
|
GuiAvatar* self, *opponent;
|
|
GuiGraveyard* selfGraveyard, *opponentGraveyard;
|
|
GuiLibrary* selfLibrary, *opponentLibrary;
|
|
GuiOpponentHand *opponentHand;
|
|
GuiAvatar* active;
|
|
|
|
public:
|
|
GuiAvatars(DuelLayers* duelLayers);
|
|
~GuiAvatars();
|
|
|
|
GuiAvatar* GetSelf();
|
|
GuiAvatar* GetOpponent();
|
|
void Update(float dt);
|
|
void Render();
|
|
void Activate(PlayGuiObject* c);
|
|
void Deactivate(PlayGuiObject* c);
|
|
int receiveEventPlus(WEvent*);
|
|
int receiveEventMinus(WEvent*);
|
|
bool CheckUserInput(JButton key);
|
|
float LeftBoundarySelf();
|
|
};
|
|
|
|
#endif // _GUIAVATARS_H_
|