#pragma once #include "InteractionListener.h" #include "SDL3/SDL_events.h" #include "SDL3/SDL_init.h" #include #include #include #include #include // TODO: ranges concept to avoid to in cpp typedef std::function(Vector2D*, std::vector>)> TargetingFunc; class InteractionManager { public: InteractionManager(); InteractionManager (const InteractionManager&) = delete; InteractionManager& operator= (const InteractionManager&) = delete; enum class TargetingStrategy : uint8_t { none = 0, closest, manhattenDistance }; SDL_AppResult handleInteract(SDL_EventType type, SDL_Event* const event); void registerListener(std::weak_ptr listener); uint8_t registerTargetingFunc(TargetingFunc func); private: std::vector> listeners; std::array targetingFuncs; };