Ejemplo n.º 1
0
        public async CTask CheckVersionUpdate()
        {
            bool isUpdate = await CSF.Mgr.VersionCheck.CheckRemoteUpdate();

            if (isUpdate)
            {
                await CTask.WaitForNextFrame();

                Confirm.AlertLangTop(() =>
                {
                    Mgr.Dispose();
                    Mgr.UI.Show <LoginUI>();
                    //Mgr.Net.Close(false);
                }, "Version.Update", "Version.UpdateTitle").Run(); //更新提示
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 播放挥鞭动画
        /// </summary>
        public async CTask PlayRunWhip(bool isOnce = true)
        {
            if (m_Animator == null)
            {
                return;
            }
            m_Animator.SetBool(AnimParam.IsWhip, true);
            if (isOnce)
            {
                await CTask.WaitForNextFrame();

                if (m_Animator != null)
                {
                    m_Animator.SetBool(AnimParam.IsWhip, false);
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 播放待机动画
        /// </summary>
        /// <param name="param"></param>
        public async CTask PlayIdle(EAnimIdleParam param = EAnimIdleParam.Idle)
        {
            m_State = EAnimState.Idle;
            m_Param = (int)param;
            if (m_Animator == null)
            {
                return;
            }
            m_Animator.SetInteger(AnimParam.State, (int)EAnimState.Idle);
            m_Animator.SetInteger(AnimParam.Param, m_Param);
            if (param != EAnimIdleParam.Idle)
            {
                await CTask.WaitForNextFrame();

                if (m_Animator != null)
                {
                    m_Animator.SetInteger(AnimParam.Param, (int)EAnimIdleParam.Idle);
                }
            }
        }
Ejemplo n.º 4
0
        public async CTask SetData(GameObject _target, string title, string content, int starNum = 0)
        {
            if (_target == null || posObj == null)
            {
                return;
            }
            posObj.transform.position = _target.transform.position;
            this.target = _target.GetComponent <RectTransform>();
            StarContent.SetActive(starNum != 0);
            //emUtils.CreateItems(starList, starNum, imgStar);
            //CreatStar(starNum);

            texTitle.text = title;
            texDes.text   = content;
            imgBG.enabled = false;
            await CTask.WaitForNextFrame();

            if (imgBG == null)
            {
                return;
            }
            imgBG.enabled = true;
            await CTask.WaitForNextFrame();

            if (imgBGrect == null)
            {
                return;
            }
            Vector2 targetPos = posObj.transform.GetComponent <RectTransform>().anchoredPosition;

            targetPos = new Vector2(
                targetPos.x + target.sizeDelta.x * (0.5f - target.pivot.x),
                targetPos.y + target.sizeDelta.y * (0.5f - target.pivot.y));
            imgBGrect.anchoredPosition = new Vector2(GetPos_x(targetPos.x), GetPos_y(targetPos.y));
            imgBG.gameObject.SetVisible(true);
            await Mgr.UI.UIAnim(imgBG.gameObject, EUIAnim.ScaleIn);
        }