From 7a8ce33af06d9b393d90c0e49dc05898257d55d0 Mon Sep 17 00:00:00 2001 From: jonylu7 Date: Fri, 17 May 2024 01:27:57 +0800 Subject: [PATCH] some --- CMakeLists.txt | 2 ++ include/Avatar/Avatar.hpp | 6 +++--- include/Map/MapUtility.hpp | 4 ++-- include/Mechanics/NemesisManager.hpp | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b14312c..c7b53d9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,11 +173,13 @@ set(INCLUDE_FILES ${INCLUDE_DIR}/Mechanics/GameObjectManager.hpp + ${INCLUDE_DIR}/Mechanics/NemesisManager.hpp ${INCLUDE_DIR}/Mechanics/GameObjectID.hpp ${INCLUDE_DIR}/Mechanics/CursorSelection.hpp ${INCLUDE_DIR}/Mechanics/Spawn.hpp ${INCLUDE_DIR}/Mechanics/AvatarNavigator.hpp + ${INCLUDE_DIR}/App.hpp ${INCLUDE_DIR}/Tile.hpp ${INCLUDE_DIR}/config.hpp diff --git a/include/Avatar/Avatar.hpp b/include/Avatar/Avatar.hpp index 366a573e..b5a12e47 100644 --- a/include/Avatar/Avatar.hpp +++ b/include/Avatar/Avatar.hpp @@ -2,8 +2,8 @@ // Created by nudle on 2024/3/15. // -#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_DUMMY_HPP -#define PRACTICALTOOLSFORSIMPLEDESIGN_DUMMY_HPP +#ifndef PRACTICALTOOLSFORSIMPLEDESIGN_AVATAR_HPP +#define PRACTICALTOOLSFORSIMPLEDESIGN_AVATAR_HPP #include "Avatar/AttackAndDamage.hpp" #include "Avatar/AvatarOrder.hpp" #include "Avatar/Moving.hpp" @@ -89,4 +89,4 @@ class Avatar : public Moving, private: GameObjectID m_ID; }; -#endif // PRACTICALTOOLSFORSIMPLEDESIGN_DUMMY_HPP +#endif // PRACTICALTOOLSFORSIMPLEDESIGN_AVATAR_HPP diff --git a/include/Map/MapUtility.hpp b/include/Map/MapUtility.hpp index eba15249..befcdc21 100644 --- a/include/Map/MapUtility.hpp +++ b/include/Map/MapUtility.hpp @@ -38,8 +38,8 @@ class MapUtil { return {_x * CELL_SIZE.x, _y * CELL_SIZE.y}; } static float findDistance(glm::vec2 cell1, glm::vec2 cell2) { - float dx = cell2.x-cell1.x; - float dy = cell2.y-cell1.y; + float dx = cell2.x - cell1.x; + float dy = cell2.y - cell1.y; return sqrt(dx * dx + dy * dy); } }; diff --git a/include/Mechanics/NemesisManager.hpp b/include/Mechanics/NemesisManager.hpp index 1e0e7c7b..e554bcde 100644 --- a/include/Mechanics/NemesisManager.hpp +++ b/include/Mechanics/NemesisManager.hpp @@ -4,6 +4,7 @@ #ifndef PRACTICALTOOLSFORSIMPLEDESIGN_NEMESISMANAGER_HPP #define PRACTICALTOOLSFORSIMPLEDESIGN_NEMESISMANAGER_HPP +#include "Avatar/Avatar.hpp" #include "Map/MapUtility.hpp" class NemesisManager { @@ -37,8 +38,7 @@ class NemesisManager { { return true; } else { - // forceMove(hunter, - // m_Nemesis[hunter]->getCurrentCell()); // 向目標移動 + return false; } }