Upper level and lower level spawning now distinguished in map editor.

This commit is contained in:
2023-07-10 19:22:33 -05:00
parent 0349e5d16e
commit 228a3caa0e
8 changed files with 39 additions and 15 deletions
+4 -2
View File
@@ -86,7 +86,7 @@ struct Monster{
protected:
public:
Monster()=delete;
Monster(vf2d pos,MonsterData data);
Monster(vf2d pos,MonsterData data,bool upperLevel=false);
vf2d&GetPos();
int GetHealth();
int GetAttack();
@@ -127,13 +127,15 @@ struct MonsterSpawner{
vf2d range;
std::vector<std::pair<MonsterName,vf2d>>monsters;
bool triggered=false;
bool upperLevel=false;
public:
MonsterSpawner();
//For the monster list, the second pair item is the position relative to the spawner to spawn the monster.
MonsterSpawner(vf2d pos,vf2d range,std::vector<std::pair<MonsterName,vf2d>>MONSTER_LIST);
MonsterSpawner(vf2d pos,vf2d range,std::vector<std::pair<MonsterName,vf2d>>MONSTER_LIST,bool upperLevel=false);
bool SpawnTriggered();
vf2d GetRange();
vf2d GetPos();
bool DoesUpperLevelSpawning();
void SetTriggered(bool trigger,bool spawnMonsters=true);
friend std::ostream&operator<<(std::ostream&os,MonsterSpawner&rhs);
};