1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Writer.h>
- class Dimension;
- class WorldUpdateTypeEnum
- {
- public:
- static const int ADD_ENTITY = 0;
- static const int REMOVE_ENTITY = 1;
- };
- class WorldUpdate : public Framework::ReferenceCounter
- {
- private:
- int affectedDimensionId;
- int type;
- Framework::Vec3<float> pos;
- protected:
- virtual void write(Framework::StreamWriter* zWriter) = 0;
- public:
- WorldUpdate(int type, int dimensionId, Framework::Vec3<float> pos);
- virtual void onUpdate(Dimension* zDimension) = 0;
- void writeAndCheck(Framework::StreamWriter* zWriter);
- int getAffectedDimension() const;
- int getType() const;
- int distanceTo(int x, int y) const;
- };
|