12345678910111213141516171819202122232425262728293031323334353637383940 |
- #pragma once
- #include <Writer.h>
- #include <Vec3.h>
- #include <ReferenceCounter.h>
- class Chunk;
- class Block;
- class Entity;
- class NetworkMessage : public virtual Framework::ReferenceCounter
- {
- private:
- char* address;
- char addressLength;
- bool broadcast;
- char* message;
- int msgLength;
- bool useBackground;
- public:
- NetworkMessage();
- ~NetworkMessage();
- void addressChunck(Chunk* zChunk);
- void addressEntity(Entity* zEntity);
- void addressBlock(Block* zBlock);;
- void addressDimension();
- void openDialog(Framework::Text dialogName);
- void addressGui(Framework::Text elementId);
- void setMessage(char* msg, int length);
- void setUseBackground();
- void sendToAll();
- void writeTo(Framework::StreamWriter* zWriter) const;
- bool isBroadcast() const;
- bool isEmpty() const;
- bool isUseBackground() const;
- NetworkMessage* clone() const;
- };
|