/** * Just listen to the UI and print the * name of the button that was clicked */ public void CharacterSelected(Button button) { // Check the name of the button and // update the set as well as the button if (characters.Contains(button.name)) { characters.Remove(button.name); OnCharacterSelected.Invoke(button, false); } else { characters.Add(button.name); OnCharacterSelected.Invoke(button, true); } }
public void InvokeCharacterSelect(CharacterActor actor) { selectionEvent.Invoke(actor); }