public void Clear() { if (currentlyShownControl != null) { currentlyShownControl.Hide(); currentlyShownControl = null; } }
void OnControlHidden(UILevelControl control) { control.HiddenEvent -= OnControlHidden; if (control is UISoldierChoiceMultiple uiSoldierChoiceMultiple) { uiSoldierChoiceMultiple.GoButtonClickedEvent -= OnGoButtonClicked; } else if (control is UITrapChoiceClouds uiTrapChoice) { uiTrapChoice.TrapChosenEvent -= OnTrapChosen; } else if (control is UISoldierChoice uiSoldierChoice) { uiSoldierChoice.SoldierClickedEvent -= OnSoldierClicked; } }
void OnControlShown(UILevelControl control) { currentlyShownControl = control; }
void OnControlHidden(UILevelControl control) { currentlyShownControl = null; }