Exemple #1
0
        public CoinGameLevelController(LevelConfig config, IEventHub eventHub,
                                       RandomGenerator randomGenerator, Action <bool> returnAction)
        {
            _eventHub     = new DisposableEventHub(eventHub);
            _random       = randomGenerator;
            _level        = config.CreateLevel(_random);
            _returnAction = returnAction;
            GenerateRules();

            _eventHub.Register <GameInput>(OnGameInput);
        }