Skip to content

Commit

Permalink
Merge pull request #100 from ntut-Tu/main
Browse files Browse the repository at this point in the history
修正編譯錯誤&AI Base 位置修改
  • Loading branch information
jonylu7 authored Jun 18, 2024
2 parents 4805e33 + a0a3f5e commit 2cb8b26
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/AI/AIScripts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AIScript {
std::shared_ptr<MapClass> m_Map;
std::shared_ptr<AIGroupCommander> m_AIGroupCommander;

glm::vec2 m_baseCell = {20, 30};
glm::vec2 m_baseCell = {30, 35};
int constructCountX = 0;
int constructCountY = 0;

Expand Down
2 changes: 1 addition & 1 deletion include/Mechanics/UnitManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class UnitManager : public Player {
}


int updateCurrency();
void updateCurrency();

void spawnToWayPoint(UnitType unit, HouseType house);
void spawn(UnitType unit, HouseType house, glm::vec2 cellPos);
Expand Down
2 changes: 1 addition & 1 deletion src/AI/AIScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void AIScript::UpdateSpawnScript(SpawnMode spawnMode) {
m_EnemyObjectManager->setBarrackWayPointByCell(
{m_baseCell.x - 1 +
5 * (m_EnemyObjectManager->getAvatarCount() % 3),
m_baseCell.y - 1});
m_baseCell.y - 1 + 5 * (m_EnemyObjectManager->getAvatarCount() % 6 ==0)});

m_EnemyObjectManager->spawnToWayPoint(m_selectedAvatarType,
HouseType::ENEMY);
Expand Down
2 changes: 1 addition & 1 deletion src/Mechanics/UnitManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void UnitManager::Update() {
m_StructureManager->SelectingBuildSite();
}

int UnitManager::updateCurrency() {
void UnitManager::updateCurrency() {
for (auto i :
m_StructureManager->getStructureArray()->getBuiltStructureArray()) {
if (std::dynamic_pointer_cast<OreRefinery>(i)) {
Expand Down

0 comments on commit 2cb8b26

Please sign in to comment.