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); }