Controlling entities
Since we have already laid down the code foundation, it's now possible to focus on controlling the entities on the screen. Whether they're being controlled as player avatars by means of a keyboard, or through some sort of artificial intelligence (AI), they still need to have this basic component:
class C_Controller : public C_Base{ public: C_Controller() : C_Base(Component::Controller){} void ReadIn(std::stringstream& l_stream){} };
As you can tell, we have absolutely no data that gets stored here so far. For now, it can simply be considered just a specific signature that lets the ECS know it can be controlled.
Control system
In order for entities to be controlled, they must have three basic component types:
S_Control::S_Control(SystemManager* l_systemMgr) : S_Base(System::Control,l_systemMgr) { Bitmask req; req.TurnOnBit((unsigned int)Component::Position); req.TurnOnBit((unsigned int)Component::Movable); req.TurnOnBit((unsigned int)Component...