Example #1
0
    private void OnClickEnter()
    {
        var data = UserData as StaffData;

        FireStaffCommand.Do(data);
        Close();
    }
Example #2
0
    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);
    }
Example #3
0
    /// <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);
    }