void CheckBalance(ShopButton button) //checking if the player can affod the item { if (gameManager.Money() >= button.GetCost()) { int index = gameManager.GetMealIndex(button.NewMealName()); gameManager.AddToCurrent(index); StartCoroutine(gameManager.UpdateMoney(-button.GetCost(), -.5)); Debug.Log("Meal added to menu!!"); button.GetComponent <Button>().interactable = false; } else { Debug.Log("Not enough Money!!"); StartCoroutine(gameManager.FlashText(gameManager.moneyText)); } }