static void checkStartingValues() { if (!startingValuesInitialized) { PPGameController game = PPGameController.GetInstance; bool initFromTuning = false; if (game) { PPTuning tuning = game.Tuning; if (tuning != null) { startingCoins = tuning.StartingCoins; startingDogFood = tuning.StartingDogFood; initFromTuning = true; } } // Fail safe method in case PPGameControlelr is not initialized yet if (!initFromTuning) { startingCoins = DEFAULT_COINS; startingDogFood = DEFAULT_DOG_FOOD; } startingValuesInitialized = true; } }
public CoinsAdReward() { gameController = PPGameController.GetInstance; PPTuning tuning = gameController.Tuning; this.amount = tuning.VideoAdCoinBonus; rewardSFXEvent = k.GIFT_REDEEM; }
public void Init(PPGameController gameController, PPDataController dataController, PPGiftController giftController) { unsubscribeEvents(); this.giftController = giftController; this.dataController = dataController; subscribeEvents(); // Display Updated Currency coinsDisplay.Init(dataController.Coins, dataController); initDailyGiftCountdown(gameController.Tuning, dataController); }
protected virtual void fetchReferences() { this.referencesFetched = true; // Check if it has already been initialized, some classes may prefer to use a custom data controller if (!this.dataController) { this.dataController = PPDataController.GetInstance; } if (!this.gameController) { this.gameController = PPGameController.GetInstance; } if (!this.analytics) { this.analytics = AnalyticsController.Instance; } }
public void SetGame(PPGameController game) { this.gameController = game; }