Skip to content

Commit

Permalink
fix unresponsive
Browse files Browse the repository at this point in the history
  • Loading branch information
jonylu7 committed Jun 18, 2024
1 parent 9fee08e commit 5549e14
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Map/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void MapClass::Draw(const Util::Transform &trans, const float zindex) {
for (auto i : m_Images) {
i->DrawUsingCamera(maptrans, zindex);
}
m_Grid.DrawUsingCamera(trans, zindex - 0.2);
m_Grid.DrawUsingCamera(trans, zindex + 1.2);
}

void MapClass::Init(std::vector<std::vector<std::shared_ptr<TileClass>>> map,
Expand Down
4 changes: 2 additions & 2 deletions src/Mechanics/AvatarManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ void AvatarManager::assignOrderToMyAvatar(std::shared_ptr<Avatar> avatar) {
auto destcell = MapUtil::GlobalCoordToCellCoord(
MapUtil::ScreenToGlobalCoord(Util::Input::GetCursorPosition()));
if (destcell.x < 0 || destcell.y < 0 ||
destcell.x > m_Map->getWidth() / 2 - 1 ||
destcell.y > m_Map->getHeight() / 2 - 1) {
destcell.x > m_Map->getWidth() - 1 ||
destcell.y > m_Map->getHeight() - 1) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Scene/SandBoxScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void SandBoxScene::Update() {
->getStructureArray()
->getBuiltStructureArray()
.empty() ||
Util::Input::IsKeyPressed(Util::Keycode::DEBUG_KEY)) {
Util::Input::IsKeyPressed(Util::Keycode::P)) {
m_stage = Stages::AI_WON;
m_WUI->setPausedImage(
std::make_shared<Util::Image>("../assets/images/AIWon.png"));
Expand All @@ -76,7 +76,7 @@ void SandBoxScene::Update() {
->getStructureArray()
->getBuiltStructureArray()
.empty() ||
Util::Input::IsKeyPressed(Util::Keycode::K)) {
Util::Input::IsKeyPressed(Util::Keycode::A)) {
m_stage = Stages::PLAYER_WON;
m_WUI->setPausedImage(std::make_shared<Util::Image>(
"../assets/images/PlayerWon.png"));
Expand Down
2 changes: 1 addition & 1 deletion src/Scene/TutorialScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void TutorialScene::stageStart() {
m_PlayerObjectivesText->setMovingRelativeToCamera(false);
Util::Transform trans;

trans.translation = {540, 5};
trans.translation = {840, 5};
trans.scale = {0.7, 0.7};
m_PlayerObjectivesText->SetTransform(trans);

Expand Down

0 comments on commit 5549e14

Please sign in to comment.