private void OnClickEnter() { var data = UserData as StaffData; FireStaffCommand.Do(data); Close(); }
protected override void DoRefresh(object userData) { var data = userData as StaffData; UI.m_LabelContent.SetValue(data.Name); UI.m_LabelCost.SetText(FireStaffCommand.GetCost(data.Id)); UI.m_LoaderIcon.SetStaffIcon(data.Id); }
/// <summary> /// 创建指令 /// </summary> public static void Do(StaffData staffData) { var command = new FireStaffCommand(); command.StaffData = staffData; var sequence = GameEntry.Command.Sequence(); sequence.AppendCommand(new CheckCurrencyCommand(command)); sequence.AppendCommand(command); sequence.AppendCommand(new DoCurrencyCostCommand(command)); sequence.AppendCommand(new DataUpdatedCommand()); sequence.AppendResultHandler(command.HandleResult); }