blob: 61c1982e30bb26b284fb065c1baff9010931dd29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
};
|