37 lines
596 B
C++
37 lines
596 B
C++
#ifndef SYSTEM_H
|
|
#define SYSTEM_H
|
|
|
|
class MessageBus;
|
|
class Message;
|
|
class Input;
|
|
|
|
namespace sf{
|
|
class Window;
|
|
}
|
|
|
|
//TODO:complete this part with other existing system,
|
|
enum SystemType {INPUT_SYSTEM, RENDERER_SYSTEM, IA_SYSTEM,GAME_SYSTEM,LENGTH};
|
|
|
|
class System
|
|
{
|
|
SystemType m_type;
|
|
protected:
|
|
MessageBus* m_msgBus;
|
|
|
|
public:
|
|
System();
|
|
virtual void handleMessage(Message* message) = 0;
|
|
};
|
|
|
|
class InputSystem : public System{
|
|
private:
|
|
Input* m_input;
|
|
public:
|
|
InputSystem();
|
|
~InputSystem();
|
|
void initInput(sf::Window* window);
|
|
void update();
|
|
};
|
|
|
|
#endif // SYSTEM_H
|