Example #1
0
        public HGameplay(IInstanceProvider instanceProvider)
        {
            audioPlayer               = instanceProvider.GetInstance <IAudioPlayerModel>();
            customSaveModel           = instanceProvider.GetInstance <ICustomSaveModel>();
            scoreModel                = instanceProvider.GetInstance <IScoreModel>();
            gameEndModel              = instanceProvider.GetInstance <IGameEndModel>();
            sessionStatistics         = instanceProvider.GetInstance <ISessionStatistics>();
            interstitialsDisplayModel = instanceProvider.GetInstance <InterstitialsDisplayModel>();
            gameStartSignal           = instanceProvider.GetInstance <GameStartSignal>();
            updateBestScoreSignal     = instanceProvider.GetInstance <UpdateBestScoreSignal>();
            newLevelSignal            = instanceProvider.GetInstance <NewLevelSignal>();
            endLevelSignal            = instanceProvider.GetInstance <EndLevelSignal>();
            currentLevelChangeSignal  = instanceProvider.GetInstance <CurrentLevelChangeSignal>();

            gameContinueSignal = instanceProvider.GetInstance <GameContinueSignal>();
            gameContinueSignal.AddListener(ContinueGame);

            gamePauseSignal = instanceProvider.GetInstance <GamePauseSignal>();
            gamePauseSignal.AddListener(PauseGame);

            gameResumeSignal = instanceProvider.GetInstance <GameResumeSignal>();
            gameResumeSignal.AddListener(ResumeGame);
        }