HelloPolycodeApp.h 587 B

123456789101112131415161718192021222324252627282930313233
  1. #include <Polycode.h>
  2. #include "PolycodeView.h"
  3. #include "NetworkingExampleGlobals.h"
  4. using namespace Polycode;
  5. class ClientPlayer {
  6. public:
  7. int clientID;
  8. char state;
  9. SceneEntity *playerEntity;
  10. };
  11. class HelloPolycodeApp : public EventHandler {
  12. public:
  13. HelloPolycodeApp(PolycodeView *view);
  14. ~HelloPolycodeApp();
  15. bool Update();
  16. void createClientPlayer(int clientID);
  17. void handleEvent(Event *event);
  18. private:
  19. Core *core;
  20. Scene *gameScene;
  21. Client *client;
  22. ClientData clientData;
  23. char state;
  24. SceneLabel *motdLabel;
  25. vector<ClientPlayer*> players;
  26. };