copied EventManager from gamestatemanager project