NetworkResponse.h 770 B

1234567891011121314151617181920212223242526272829303132333435
  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. public:
  19. NetworkResponse();
  20. ~NetworkResponse();
  21. void adressChunck( Chunk *zChunk );
  22. void adressEntity( Entity *zEntity );
  23. void adressBlock( Block *zBlock );
  24. void setMessage( char *msg, int length, bool deleteMsg );
  25. void sendToAll();
  26. bool isAreaAffected( Framework::Vec3<float> min, Framework::Vec3<float> max ) const;
  27. void writeTo( Framework::StreamWriter *zWriter ) const;
  28. bool isBroadcast() const;
  29. };