private void addOnWallet() { switch (itemType) { case ItemsType.coin: { WalletController.addCoin(); break; } case ItemsType.whistle: { WalletController.addCoins(value); break; } case ItemsType.yellowCard: { WalletController.addYellowCard(); break; } default: { WalletController.addItems(itemType, value); break; } } Destroy(this.gameObject); }
void Awake() { WalletController.addItems(ItemsType.blackSuitcase, 10); WalletController.addItems(ItemsType.rocket, 20); WalletController.addItems(ItemsType.stretcher, 20); WalletController.addItems(ItemsType.mother, 20); WalletController.addItems(ItemsType.soap, 20); }