void ICommandPanel.RemoveButtonCommands(IButtonCommands buttonCommands) { if (_ButtonCommandsList.Contains(buttonCommands)) { _ButtonCommandsList.Remove(buttonCommands); UpdateCommandPanelButtons(); } }
private void RemoveGameObjectButtonCommands(GameObject unit) { IButtonCommands buttonCommands = unit.GetComponents <IButtonCommands>().ThrowIfMoreThanOne(); if (buttonCommands != null) { _CommandPanel.RemoveButtonCommands(buttonCommands); } }
private void AddGameObjectButtonCommands(GameObject unit) { IButtonCommands buttonCommands = unit.GetComponents <IButtonCommands>().ThrowIfMoreThanOne(); if (buttonCommands != null) { _CommandPanel.ShowPanel(); _CommandPanel.AddButtonCommands(buttonCommands); } }
void ICommandPanel.AddButtonCommands(IButtonCommands buttonCommands) { _ButtonCommandsList.Add(buttonCommands); UpdateCommandPanelButtons(); }