void android_purchaseSucceededEvent(GooglePurchase purchase) { if (purchase.purchaseState == GooglePurchase.GooglePurchaseState.Purchased) { if (purchase.productId == BillingItemsIds.coin_01) { WalletController.addCoins(100f); } else if (purchase.productId == BillingItemsIds.coin_02) { WalletController.addCoins(1000f); } else if (purchase.productId == BillingItemsIds.coin_03) { WalletController.addCoins(10000f); } else if (purchase.productId == BillingItemsIds.coin_04) { WalletController.addCoins(100000f); } BillingManager.consumeItem(purchase.productId); StoreInterface.updateCoin(); } }
public static void buyItemLevelUp(Items _item, float _moneyItem) { if (_moneyItem <= WalletController.getValue(ItemsType.coin)) { WalletController.removeItems(ItemsType.coin, _moneyItem); DictionaryItems.LevelUp(_item); DictionaryItems.playInitItems(); StoreInterface.updateCoin(); } else { WarningManager.noMoney(); } }
static void Main(string[] args) { using var logStream = new StreamWriter("ef-logs.txt"); var ob = new DbContextOptionsBuilder <Project0Context>(); ob.UseSqlServer(GetConnectionString()); ob.LogTo(logStream.WriteLine, LogLevel.Information); using var context = new Project0Context(ob.Options); IStoreRepository storeRepository = new StoreRepository(context); var prompts = new ConsolePrompts(storeRepository); var interpreter = new ConsoleInputInterpreter(prompts); var user_interface = new StoreInterface(prompts, interpreter); user_interface.Launch(); }
public void createScene(string name) { if (name == "Shop") { this.createShop(); StoreInterface.updateCoin(); } else if (name == "Opcoes") { this.createConfiguration(); } else if (name == "Menu") { this.createMenu(); } else if (name == "cred") { this.createCredits(); } else if (name == "Level-UP") { this.createLevelUp(); } else if (name == "Utilits") { this.createUtilits(); } else if (name == "Accessories") { this.createAccessories(); } else if (name == "Coins") { this.createBuyCoins(); } }