public void OnConfirmClick() { if (OnConfirm != null) { OnConfirm(HiredHumanList); OnConfirm = null; } PlayerController.MainController.CloseTopOverlayWindow(); }
public void ShowPeople(string LabelText, List <Human> FreeHumanList, List <Human> HiredHumanList, int MaxHiredCount, PeopleControlUI.ConfirmDelegate OnConfirm) { MainLabel.text = LabelText; this.MaxHiredCount = MaxHiredCount; this.OnConfirm = OnConfirm; this.FreeHumanList = new List <Human>(); this.FreeHumanList.AddRange(FreeHumanList.ToArray()); this.HiredHumanList = new List <Human>(); this.HiredHumanList.AddRange(HiredHumanList.ToArray()); Refresh(); }
public void ShowPeople(string LabelText, List <Human> FreeHumanList, List <int> HiredHumanList, int MaxHiredCount, PeopleControlUI.ConfirmDelegate OnConfirm) { MainLabel.text = LabelText; this.MaxHiredCount = MaxHiredCount; this.OnConfirm = OnConfirm; this.FreeHumanList = new List <Human>(); this.FreeHumanList.AddRange(FreeHumanList.ToArray()); this.HiredHumanList = new List <Human>(); foreach (var item in HiredHumanList) { this.HiredHumanList.Add(SessionData.Data.ResourceStorage.People[item]); } Refresh(); }
public void ShowPeopleControl(string Label, List <Human> FreePeople, List <int> HiredPeople, int MaxHiredCount, PeopleControlUI.ConfirmDelegate OnConfirm) { PeopleControlUI.UI.ShowPeople(Label, FreePeople, HiredPeople, MaxHiredCount, OnConfirm); AddOverlayWindow(PeopleControlUI.UI); }