// Switch pages when enter the garage. public void OnEnterGaragePageButtonClicked() { SetCanvas(garagePageCanvas); #if ONLINE NetworkRequestController.CheckSubscriptionPriceChange(); #endif }
public static void SaveGameData() { #if ONLINE NetworkRequestController.SaveGameDataOnline(); #else SaveGameDataOffline(); #endif }
public static void LoadGameData() { #if ONLINE NetworkRequestController.LoadGameOnline(); #else Debug.Log(DATA_PATH); LoadGameOffline(); #endif }
// Init the game. public void Awake() { #if ONLINE NetworkRequestController.registerUserDevice(); #endif InitConstantData(); GameDataController.LoadGameData(); SetCanvas(playPageCanvas); }
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args) { Debug.Log($"ProcessPurchase: PASS. Product: '{args.purchasedProduct.definition.id}'"); #if ONLINE NetworkRequestController.verifyAndSaveUserPurchase(args.purchasedProduct); return(PurchaseProcessingResult.Pending); #else if (ClientSideReceiptValidation(args.purchasedProduct.receipt)) { // Unlock the appropriate content. UnlockInGameContent(args.purchasedProduct.definition.id); } // Return a flag indicating whether this product has completely been received, or if the application needs // to be reminded of this purchase at next app launch. Use PurchaseProcessingResult.Pending when still // saving purchased products to the cloud, and when that save is delayed. return(PurchaseProcessingResult.Complete); #endif }