// // Created by Louis Auzuret on 06/07/21 // #pragma once #include #include "Component/BombHolder/BombHolderComponent.hpp" #include "Map/MapInfo.hpp" #include "Map/LuaMap.hpp" #include "System/System.hpp" namespace BBM { //! @brief A system to handle keyboard entities. class IAControllableSystem : public WAL::System { private: //! @brief Reference to wal to get Views WAL::Wal &_wal; //! @brief Are the infos cached for current update bool _cached; //! @brief Map to handle the informations LuaMap _luamap; //! @brief All players in the map std::vector _players; //! @brief update danger map with a bomb void updateDangerBomb(Vector3f pos, int radius, std::chrono::nanoseconds ringIn); //! @brief Register the functions to the lua void registerFunc(LuaG::State &state); //! @brief update the raw info of the map void UpdateMapInfos(WAL::ViewEntity &entity); public: //! @inherit void onFixedUpdate(WAL::ViewEntity &entity) override; //! @inherit void onSelfUpdate(std::chrono::nanoseconds dtime) override; //! @brief A default constructor IAControllableSystem(WAL::Wal &wal); //! @brief A keyboard system is copy constructable IAControllableSystem(const IAControllableSystem &) = default; //! @brief A default destructor ~IAControllableSystem() override = default; //! @brief A keyboard system is assignable. IAControllableSystem &operator=(const IAControllableSystem &) = default; }; }