Exemple #1
0
        public void NewProviderAvailable(IProvider newProvider)
        {
            //Get Reference to SaveManager when Initialized
            if (DepInjector.MapProvider <SaveManager>(newProvider, ref this.currentSave))
            {
                //Subscribe to receive Deck Notifications
                currentSave.AddDeckNotifications(this);
                data = currentSave.GetAllGameData();
                this.Logger.LogInfo("SaveManager Initialized");
                InitializeCardDataBase();
                this.Logger.LogInfo("Relic Manager Initialized");
                InitializeRelicDataBase();
                IsInit = false;
            }

            //Get Reference to GameStateManager When Initialized
            if (DepInjector.MapProvider <GameStateManager>(newProvider, ref this.Game))
            {
                //Subscribe listener to Signal
                Game.runStartedSignal.AddListener(GameStartedListener);
            }
            if (DepInjector.MapProvider <RelicManager>(newProvider, ref this.relicManager))
            {
                relicManager.AddRelicNotifications(this);
            }
        }