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