HelloPolycodeApp.h 623 B

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