Implemented reading spawn zones on maps. Monsters now spawn according to spawn zones.
This commit is contained in:
+1
-1
@@ -392,7 +392,7 @@ Key Player::GetFacingDirection(){
|
||||
|
||||
void Player::Moved(){
|
||||
for(MonsterSpawner&spawner:SPAWNER_LIST){
|
||||
if(!spawner.SpawnTriggered()&&geom2d::contains(geom2d::ellipse<float>{spawner.GetPos(),spawner.GetRange()},pos)){
|
||||
if(!spawner.SpawnTriggered()&&geom2d::contains(geom2d::rect<float>{spawner.GetPos(),spawner.GetRange()},pos)){
|
||||
spawner.SetTriggered(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user