NetworkResponse.h 895 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <Writer.h>
  3. #include <Vec3.h>
  4. class Chunk;
  5. class Block;
  6. class Entity;
  7. class NetworkResponse
  8. {
  9. private:
  10. char* adress;
  11. char adressLength;
  12. Framework::Vec3<float> minPosition;
  13. Framework::Vec3<float> maxPosition;
  14. bool broadcast;
  15. char* message;
  16. bool msgDelete;
  17. int msgLength;
  18. bool useBackground;
  19. public:
  20. NetworkResponse();
  21. ~NetworkResponse();
  22. void adressChunck(Chunk* zChunk);
  23. void adressEntity(Entity* zEntity);
  24. void adressBlock(Block* zBlock);
  25. void openDialog(Framework::Text dialogName);
  26. void adressGui(Framework::Text elementId);
  27. void setMessage(char* msg, int length, bool deleteMsg);
  28. void setUseBackground();
  29. void sendToAll();
  30. bool isAreaAffected(Framework::Vec3<float> min, Framework::Vec3<float> max) const;
  31. void writeTo(Framework::StreamWriter* zWriter) const;
  32. bool isBroadcast() const;
  33. bool isEmpty() const;
  34. bool isUseBackground() const;
  35. };