Exemple #1
0
    protected override void DoRefresh(object userData)
    {
        DRStaff data = userData as DRStaff;

        UI.m_LabelCost.SetText(RecruitStaffCommand.GetCost(data));
        UI.m_InputName.text = data.Name;
    }
    /// <summary>
    /// 创建指令
    /// </summary>
    public static void Do(DRStaff staff, string name)
    {
        var command = new RecruitStaffCommand();

        command.DRStaff = staff;
        command.Name    = name;

        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);
    }
 /// <summary>
 /// 修改名字消耗
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static int GetCost(DRStaff staff)
 {
     return(staff.RecruitCost);
 }