Esempio n. 1
0
 public void StartJudge(COMDT_TGWINFO inTGW)
 {
     if (!this.IsWatching && !Singleton <BattleLogic> .instance.isRuning)
     {
         this._workMode = WorkMode.Judge;
         this._tgw      = inTGW;
         if (this._tgw != null)
         {
             NetworkModule.InitRelayConnnecting(this._tgw);
         }
     }
 }
Esempio n. 2
0
 public void StartJudge(COMDT_TGWINFO inTGW)
 {
     if (this.IsWatching || Singleton <BattleLogic> .get_instance().isRuning)
     {
         return;
     }
     this._workMode = WatchController.WorkMode.Judge;
     this.IsRunning = true;
     this._tgw      = inTGW;
     if (this._tgw != null)
     {
         NetworkModule.InitRelayConnnecting(this._tgw);
     }
 }
        public bool StartObserve(COMDT_TGWINFO inTGW)
        {
            if (this.IsWatching || Singleton <BattleLogic> .instance.isRuning)
            {
                return(false);
            }
            this._workMode        = WatchController.WorkMode.Observe;
            this._overTime        = 0f;
            this.FightOverJust    = false;
            this.IsRunning        = true;
            this.SpeedRate        = 1;
            this._recvBuff        = new byte[409600];
            this._buffRecvSize    = 0u;
            this._totalRecvSize   = 0u;
            this._pkgQueue        = new Queue <object>(1000);
            this._maxFrameNo      = 0u;
            this._isStreamEnd     = false;
            this._thisTick        = 0u;
            this._lastRequestTick = 0u;
            ResGlobalInfo resGlobalInfo = new ResGlobalInfo();

            if (GameDataMgr.svr2CltCfgDict.TryGetValue(215u, out resGlobalInfo))
            {
                this._observeDelayFrames = (uint)Mathf.Clamp((int)(resGlobalInfo.dwConfValue * 1000u / Singleton <FrameSynchr> .GetInstance().SvrFrameDelta), 0, 4500);
            }
            else
            {
                this._observeDelayFrames = 900u;
            }
            this._tgw = inTGW;
            if (this._tgw != null)
            {
                NetworkModule.InitRelayConnnecting(this._tgw);
            }
            this.RequestVideoPiece(true);
            return(true);
        }