示例#1
0
 public void SendCommand(ACommand cmd, bool update)
 {
     cmd.Send(this);
     if (update)
     {
         UpdateStatus();
     }
 }
示例#2
0
 protected void SendCommand(ACommand cmd, bool update, Action <SendResult> OnComplete)
 {
     if (update)
     {
         cmd.Send(this, sr =>
         {
             if (sr.Success)
             {
                 UpdateStatus(OnComplete);
             }
             else
             {
                 OnComplete.NullableInvoke(sr);
             }
         });
     }
     else
     {
         cmd.Send(this, sr => OnComplete.NullableInvoke(sr));
     }
 }