NetworkResponse.h 936 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. int affectedDimension;
  20. public:
  21. NetworkResponse();
  22. ~NetworkResponse();
  23. void adressChunck(Chunk* zChunk);
  24. void adressEntity(Entity* zEntity);
  25. void adressBlock(Block* zBlock);
  26. void openDialog(Framework::Text dialogName);
  27. void adressGui(Framework::Text elementId);
  28. void setMessage(char* msg, int length, bool deleteMsg);
  29. void setUseBackground();
  30. void sendToAll();
  31. bool isAreaAffected(Framework::Vec3<float> min, Framework::Vec3<float> max, int dimensionId) const;
  32. void writeTo(Framework::StreamWriter* zWriter) const;
  33. bool isBroadcast() const;
  34. bool isEmpty() const;
  35. bool isUseBackground() const;
  36. };