diff options
Diffstat (limited to 'Minecraft.World/VillageSiege.h')
| -rw-r--r-- | Minecraft.World/VillageSiege.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Minecraft.World/VillageSiege.h b/Minecraft.World/VillageSiege.h new file mode 100644 index 00000000..61c1982e --- /dev/null +++ b/Minecraft.World/VillageSiege.h @@ -0,0 +1,28 @@ +#pragma once + +class VillageSiege +{ +private: + Level *level; + bool hasSetupSiege; + int siegeState; + int siegeCount; + int nextSpawnTime; + weak_ptr<Village> village; + int spawnX, spawnY, spawnZ; + + static const int SIEGE_NOT_INITED = -1; + static const int SIEGE_CAN_ACTIVATE = 0; + static const int SIEGE_TONIGHT = 1; + static const int SIEGE_DONE = 2; + +public: + VillageSiege(Level *level); + + void tick(); + +private: + bool tryToSetupSiege(); + bool trySpawn(); + Vec3 *findRandomSpawnPos(int x, int y, int z); +};
\ No newline at end of file |
