Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ntut-Tu committed May 31, 2024
1 parent a353c21 commit 432f6de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/AI/EnemyScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions src/Scene/SandBoxScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 432f6de

Please sign in to comment.