示例#1
0
 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);
     }
 }
示例#2
0
 public void AddSlot()
 {
     Player.Instance.Money -= DefaultResources.GetSlotCost(CurrentSnake.ModulesSlots);
     CurrentSnake.ModulesSlots++;
     UpdateSnakeView();
 }