Esempio n. 1
0
        /// <summary>
        ///     显示投票结果内容
        /// </summary>
        public void ShowHandUp(HupData data, int countDown)
        {
            App.GetRServer <Lyzz2DGameServer>().IsInHandsUp = true;
            switch (data.Operation)
            {
            case -1:
                hupEnd = true;
                break;

            case 2:
                _showParent.SetActive(true);
                localID = App.GetGameManager <Lyzz2DGameManager>().SelfPlayer.UserInfo.id;
                ScrollAnim.PlayForward();
                hups = new List <HupData>();
                MiddleBtn.SetActive(false);
                CurTime = countDown;
                StartCoroutine(CuntDownTime());
                hupEnd = false;
                break;

            case 3:
                break;
            }
            hups.Add(data);
            DealHups();
        }
Esempio n. 2
0
        // 返回投票
        public void OnHandsUp(ISFSObject requestData)
        {
            HupData data = new HupData()
            {
                Name      = requestData.GetUtfString(RequestKey.KeyUserName),
                ID        = requestData.GetInt(RequestKey.KeyId),
                Operation = requestData.GetInt(RequestKey.KeyType)
            };
            int time = Data.HupTime;

            if (requestData.ContainsKey(RequestKey.KeyCDTime))
            {
                time = requestData.GetInt(RequestKey.KeyCDTime);
            }
            HupWindow.Instance.ShowHandUp(data, time);
        }
Esempio n. 3
0
        /// <summary>
        /// 投票结束
        /// </summary>
        public void HandupEnd()
        {
            RightBtn.SetActive(false);
            LeftBtn.SetActive(false);
            MiddleBtn.SetActive(true);
            _isStopCountDown = true;
            if (_handUpCoroutine != null)
            {
                StopCoroutine(_handUpCoroutine);
            }
            HupData lastData = hups.Last();

            TitleLabel.TrySetComponentValue(string.Format(FormatDeffuseTitle, lastData.ID == localID ? "您" : string.Format("玩家{0}", lastData.Name)));
            CountDown.TrySetComponentValue("0");
            hups.Clear();
            App.GetRServer <Mahjong2DGameServer>().IsInHandsUp = false;
        }
Esempio n. 4
0
        /// <summary>
        /// 显示投票结果内容
        /// </summary>
        public void ShowHandUp(HupData data, int countDown)
        {
            App.GetRServer <Mahjong2DGameServer>().IsInHandsUp = true;
            switch (data.Operation)
            {
            case -1:
                hupEnd = true;
                break;

            case 2:
                _showParent.SetActive(true);
                localID = App.GetGameManager <Mahjong2DGameManager>().SelfPlayer.UserInfo.id;
                if (!App.GameKey.Equals(EnumGameKeys.shmj.ToString()))
                {
                    if (ScrollAnim != null)
                    {
                        ScrollAnim.PlayForward();
                    }
                }
                hups = new List <HupData>();
                MiddleBtn.SetActive(false);
                CurTime = countDown;
                if (_handUpCoroutine != null)
                {
                    StopCoroutine(_handUpCoroutine);
                }
                CountDown.TrySetComponentValue(CurTime.ToString());
                _handUpCoroutine = StartCoroutine(CuntDownTime());
                _isStopCountDown = false;
                hupEnd           = false;
                break;

            case 3:
                break;
            }
            hups.Add(data);
            DealHups();
        }