From 100f1772a184be26761117350cb04e005c146f41 Mon Sep 17 00:00:00 2001 From: jonylu7 Date: Fri, 14 Jun 2024 20:47:44 +0800 Subject: [PATCH] t --- src/Map/TerrainConfig.cpp | 6 +++--- src/Scene/TutorialScene.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Map/TerrainConfig.cpp b/src/Map/TerrainConfig.cpp index 50af40d..8909762 100644 --- a/src/Map/TerrainConfig.cpp +++ b/src/Map/TerrainConfig.cpp @@ -9,9 +9,9 @@ std::unordered_map> {"Clear", std::make_shared(UnitType::TILE_CLEAR, 1, 1, 1)}, {"Gems", std::make_shared(UnitType::OVERLAY_GEMS, 0, 1, 1)}, {"Ore", std::make_shared(UnitType::OVERLAY_ORE, 0, 1, 1)}, - {"River", std::make_shared(UnitType::TILE_RIVER, 0, 0, 0)}, + {"River", std::make_shared(UnitType::TILE_RIVER, 0, 1, 0)}, {"Road", std::make_shared(UnitType::TILE_ROAD, 1, 1, 1)}, - {"Rock", std::make_shared(UnitType::TILE_ROCK, 0, 0, 1)}, + {"Rock", std::make_shared(UnitType::TILE_ROCK, 0, 1, 1)}, {"Rough", std::make_shared(UnitType::TILE_ROUGH, 0, 1, 1)}, {"Tree", std::make_shared(UnitType::TILE_TREE, 0, 1, 1)}, - {"Water", std::make_shared(UnitType::TILE_WATER, 0, 0, 0)}}; + {"Water", std::make_shared(UnitType::TILE_WATER, 0, 1, 0)}}; diff --git a/src/Scene/TutorialScene.cpp b/src/Scene/TutorialScene.cpp index 7aeb127..aa0c348 100644 --- a/src/Scene/TutorialScene.cpp +++ b/src/Scene/TutorialScene.cpp @@ -41,6 +41,17 @@ void TutorialScene::Update() { auto tile = m_Map->getTileByCellPosition(MapUtil::GlobalCoordToCellCoord( MapUtil::ScreenToGlobalCoord(Util::Input::GetCursorPosition()))); + /* + std::cout + << MapUtil::GlobalCoordToCellCoord( + MapUtil::ScreenToGlobalCoord(Util::Input::GetCursorPosition())) + .x + << " " + << MapUtil::GlobalCoordToCellCoord( + MapUtil::ScreenToGlobalCoord(Util::Input::GetCursorPosition())) + .y + << " " << tile->getTileImagePath() << std::endl; + */ if (m_UI->getIfAnyBuildingReadyToBuild()) { m_GameObjectManager->getStructureManager()->AddStructSelectingBuiltSite(