private void UpdateAddSlotButton() { AddSlotButton.gameObject.SetActive(CurrentSnake != null && CurrentSnake.ModulesSlots != 9); if (AddSlotButton.isActiveAndEnabled) { AddSlotButton.transform.GetChild(3).GetComponent <Text>().text = "" + DefaultResources.GetSlotCost(CurrentSnake.ModulesSlots); } }
public void AddSlot() { Player.Instance.Money -= DefaultResources.GetSlotCost(CurrentSnake.ModulesSlots); CurrentSnake.ModulesSlots++; UpdateSnakeView(); }