Esempio n. 1
0
        public ColosseumMatchingNetworkSynchronize GetOpponentReadyStateSync(Func <RequestBase, Coroutine> requestRoutine)
        {
            GameWebAPI.ColosseumPrepareStatusLogic opponentReadyCheckRequest           = this.matchingInfo.GetOpponentReadyCheckRequest();
            ColosseumMatchingNetworkSynchronize    colosseumMatchingNetworkSynchronize = new ColosseumMatchingNetworkSynchronize();

            colosseumMatchingNetworkSynchronize.SetIntervalAndTrialTime(5f, 15f);
            colosseumMatchingNetworkSynchronize.SetFailedAction(new Action(this.eventListener.OnFailedSyncMatchingFinish));
            colosseumMatchingNetworkSynchronize.SetRequestHTTP(opponentReadyCheckRequest, requestRoutine);
            return(colosseumMatchingNetworkSynchronize);
        }
Esempio n. 2
0
        public ColosseumMatchingNetworkSynchronize CreateSelectMonsterMessage(List <int> toAddress, int[] selectMonsterIndexList)
        {
            PvPEnemyData value = new PvPEnemyData
            {
                hashValue    = Singleton <TCPUtil> .Instance.CreateHash(TCPMessageType.PvPEnemyData, DataMng.Instance().UserId, TCPMessageType.None),
                playerUserId = DataMng.Instance().UserId,
                indexId      = selectMonsterIndexList
            };

            this.messageBuffer.Clear();
            this.messageBuffer.Add(TCPMessageType.PvPEnemyData.ToString(), value);
            ColosseumMatchingNetworkSynchronize colosseumMatchingNetworkSynchronize = new ColosseumMatchingNetworkSynchronize();

            colosseumMatchingNetworkSynchronize.SetIntervalAndTrialTime(5f, 15f);
            colosseumMatchingNetworkSynchronize.SetFailedAction(new Action(this.eventListener.OnFailedSelectMonsterSend));
            colosseumMatchingNetworkSynchronize.SetMessage(toAddress, this.messageBuffer, "enemyData");
            return(colosseumMatchingNetworkSynchronize);
        }