示例#1
0
        /// <summary>
        /// Create AutoMatch With Option Like :  Min , Max , Role
        /// </summary>
        /// <param name="option">(NOTNULL)AutoMatch Option</param>
        public void AutoMatch(GSLiveOption.AutoMatchOption option)
        {
            if (_turnBasedListener == null)
            {
                LogUtil.LogError(Tag, "Listener Must not be NULL");
                return;
            }

            if (option == null)
            {
                LogUtil.LogError(Tag, "Option Must not be NULL");
                return;
            }

            if (option.MinPlayer < 2 || option.MaxPlayer > 8)
            {
                LogUtil.LogError(Tag, "Min Player Must grater than 2 , Max Player Must less than 8");
                return;
            }

            var tb = GSLiveProvider.GetGSLiveTB();

            tb.Call("AutoMatch",
                    option.MaxPlayer,
                    option.MinPlayer,
                    option.Role,
                    option.IsPersist
                    );
        }
        /// <summary>
        /// Create AutoMatch With Option Like :  Min , Max , Role
        /// </summary>
        /// <param name="option">(NOTNULL)AutoMatch Option</param>
        public void AutoMatch(GSLiveOption.AutoMatchOption option)
        {
            if (_realTimeListener == null)
            {
                LogUtil.LogError(Tag, "Listener Must not be NULL");
                return;
            }

            if (option == null)
            {
                LogUtil.LogError(Tag, "Option Must not be NULL");
                return;
            }

            if (option.MinPlayer < 2 || option.MaxPlayer > 8)
            {
                LogUtil.LogError(Tag, "Min Player Must grater than 2 , Max Player Must less than 8");
                return;
            }

            var rt = GSLiveProvider.GetGSLiveRT();

            rt.Call("AutoMatch",
                    option.MaxPlayer,
                    option.MinPlayer,
                    option.Role
                    );
        }