public void AutoPlayTimestamp(Action <bool> call_back)
 {
     AutoPlaySwitchModel.RequestSendForm requestSendForm = new AutoPlaySwitchModel.RequestSendForm();
     requestSendForm.type = 0;
     Protocol.Send(AutoPlayTimestampModel.URL, requestSendForm, delegate(AutoPlayTimestampModel ret)
     {
         bool flag = false;
         if (ret.Error == Error.None)
         {
             flag = true;
             if (ret.result.timeLeft == 0.0)
             {
                 self.SwitchAutoBattle(false);
                 GameSaveData.instance.isAutoMode = false;
                 cachedAutoFlg = false;
                 Initialize(0.0, false);
             }
             else if (needUpdateUI)
             {
                 needUpdateUI = false;
                 ForceResumeAutoMode();
                 Initialize(ret.result.timeLeft, true);
             }
         }
         if (!flag)
         {
             needUpdateUI = true;
             ForcePauseAutoMode();
         }
         call_back(flag);
     }, string.Empty);
 }
 public void AutoPlaySwitch(int playState, Action <bool> call_back)
 {
     AutoPlaySwitchModel.RequestSendForm requestSendForm = new AutoPlaySwitchModel.RequestSendForm();
     requestSendForm.type = playState;
     if (btnEnable)
     {
         if (btnCollider != null)
         {
             btnCollider.set_enabled(false);
         }
         btnEnable = false;
         Protocol.Send(AutoPlaySwitchModel.URL, requestSendForm, delegate(AutoPlaySwitchModel ret)
         {
             bool obj = false;
             if (ret.Error == Error.None)
             {
                 obj       = true;
                 btnEnable = true;
                 if (btnCollider != null)
                 {
                     btnCollider.set_enabled(true);
                 }
                 Initialize(ret.result.timeLeft, playState == 0);
             }
             call_back(obj);
         }, string.Empty);
     }
 }
 public void AutoPlayForceStop()
 {
     AutoPlaySwitchModel.RequestSendForm requestSendForm = new AutoPlaySwitchModel.RequestSendForm();
     requestSendForm.type = 1;
     Protocol.Send <AutoPlaySwitchModel.RequestSendForm, AutoPlaySwitchModel>(AutoPlaySwitchModel.URL, requestSendForm, delegate
     {
     }, string.Empty);
 }