#pragma once #include "Goal.h" class PathfinderMob; class Path; class DoorInfo; class MoveThroughVillageGoal : public Goal { private: PathfinderMob* mob; double speedModifier; Path* path; std::weak_ptr doorInfo; bool onlyAtNight; std::vector > visited; public: MoveThroughVillageGoal(PathfinderMob* mob, double speedModifier, bool onlyAtNight); ~MoveThroughVillageGoal(); virtual bool canUse(); virtual bool canContinueToUse(); virtual void start(); virtual void stop(); private: std::shared_ptr getNextDoorInfo(std::shared_ptr village); bool hasVisited(std::shared_ptr di); void updateVisited(); };