#ifndef CHARACTER_MIND_CLASS #define CHARACTER_MIND_CLASS #include #include "CharacterAction.h" class Character; class Camera; // Decides what a character does, as actions. A character without a mind does nothing. // AI goes here later, as another kind of mind. class CharacterMind { public: virtual ~CharacterMind() = default; // Called once a frame, adds whatever the character should do this frame virtual void ProduceActions(const Character& character, std::vector& actions) = 0; }; // The player: WASD, relative to where the camera faces class KeyboardMind : public CharacterMind { public: explicit KeyboardMind(const Camera& camera) : camera(camera) {} // Off while the keys are busy with something else, like typing in the console bool enabled = true; void ProduceActions(const Character& character, std::vector& actions) override; private: const Camera& camera; }; #endif