#pragma once #include "Event.h" template class Listener { public: virtual void accept(EventType *) {} }; class InputListener : public Listener { public: void accept(InputEvent * event) override; protected: virtual void OnMouseClicked() {}; }; class GameListener : public Listener { public: void accept(GameEvent * event) override; protected: virtual void OnCoinCollect(CoinCollectEvent * event) {}; virtual void OnDamage(DamageEvent * event) {}; };