123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Writer.h>
- #include "StaticRegistry.h"
- class Dimension;
- class WorldUpdate : public Framework::ReferenceCounter
- {
- private:
- int affectedDimensionId;
- Framework::Vec3<int> minAffected;
- Framework::Vec3<int> maxAffected;
- int type;
- protected:
- virtual void write(Framework::StreamWriter* zWriter) = 0;
- public:
- WorldUpdate(int type, int dimensionId, Framework::Vec3<int> minAffected, Framework::Vec3<int> maxAffected);
- virtual void onUpdate(Dimension* zDimension) = 0;
- void writeAndCheck(Framework::StreamWriter* zWriter);
- int getAffectedDimension() const;
- const Framework::Vec3<int>& getMinAffectedPoint() const;
- const Framework::Vec3<int>& getMaxAffectedPoint() const;
- int getType() const;
- int distanceTo(int x, int y) const;
- };
- class WorldUpdateType : public Framework::ReferenceCounter
- {
- protected:
- WorldUpdateType(int id);
- };
|