public void Update_GUI() { current_Unit = queue_Manager.Current_Unit; List <Command> commands = current_Unit.Command_Controller.Commands; for (int i = 0; i < buttons.Length; i++) { Command_UI_Button button = buttons[i]; if (i > commands.Count - 1) { Button_Inactive(button); } else { Button_Active(button); button.Update_GUI(commands[i]); } } }
private void Button_Inactive(Command_UI_Button button) { button.gameObject.SetActive(false); }
private void Button_Active(Command_UI_Button button) { button.gameObject.SetActive(true); button.Initalize(current_Unit); }