diff --git a/src/AI/EnemyScripts.cpp b/src/AI/EnemyScripts.cpp index c1acf7bc..4d0d49cf 100644 --- a/src/AI/EnemyScripts.cpp +++ b/src/AI/EnemyScripts.cpp @@ -186,7 +186,7 @@ void EnemyScripts::UpdateSpawnScript(SpawnMode spawnMode) { if (m_selectedBuildingType == UnitType::NONE) { return; } - m_GameObjectManager->spawn( + m_EnemyObjectManager->spawn( m_selectedBuildingType, HouseType::ENEMY, {m_baseCell.x + constructCountX, m_baseCell.y + constructCountY}); m_EnemyObjectManager->addUnitConstructCount(m_selectedBuildingType, 1); @@ -206,7 +206,7 @@ void EnemyScripts::UpdateSpawnScript(SpawnMode spawnMode) { return; } if (m_selectedAvatarType == UnitType::INFANTRY) { - m_GameObjectManager->spawnToWayPoint(m_selectedAvatarType, + m_EnemyObjectManager->spawnToWayPoint(m_selectedAvatarType, HouseType::ENEMY); setCost(0, SpawnMode::AVATAR); setCDTime(0.f, SpawnMode::AVATAR); diff --git a/src/Scene/SandBoxScene.cpp b/src/Scene/SandBoxScene.cpp index 9a780bf1..3c69bcd5 100644 --- a/src/Scene/SandBoxScene.cpp +++ b/src/Scene/SandBoxScene.cpp @@ -102,9 +102,8 @@ void SandBoxScene::stageStart() { } case Stages::STAGE4: { m_GameObjectManager->spawn( UnitType::BARRACKS, HouseType::MY,{5,5}); - for(int i=0;i<30;i++){ - m_EnemyObjectManager->spawn(UnitType::INFANTRY, HouseType::MY,{10,10}); - } + m_GameObjectManager->spawn(UnitType::INFANTRY, HouseType::MY, {5, 7}); + m_GameObjectManager->spawn(UnitType::INFANTRY, HouseType::MY, {5, 6}); m_stage = Stages::END; break; }