diff options
Diffstat (limited to 'Minecraft.World/LookAtPlayerGoal.h')
| -rw-r--r-- | Minecraft.World/LookAtPlayerGoal.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Minecraft.World/LookAtPlayerGoal.h b/Minecraft.World/LookAtPlayerGoal.h new file mode 100644 index 00000000..bfc524c8 --- /dev/null +++ b/Minecraft.World/LookAtPlayerGoal.h @@ -0,0 +1,32 @@ +#pragma once + +#include "Goal.h" + +class Mob; +class Level; + +class LookAtPlayerGoal : public Goal +{ +private: + Mob *mob; // Owner of this goal + +protected: + weak_ptr<Entity> lookAt; + +private: + float lookDistance; + int lookTime; + float probability; + const type_info& lookAtType; + +public: + LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance); + LookAtPlayerGoal(Mob *mob, const type_info& lookAtType, float lookDistance, float probability); + virtual ~LookAtPlayerGoal() {} + + virtual bool canUse(); + virtual bool canContinueToUse(); + virtual void start(); + virtual void stop(); + virtual void tick(); +};
\ No newline at end of file |
