コード例 #1
0
    void Start()
    {
        //if (!UIMgr.instance.atlasSetlist.Contains( gameObject.name ))
        //    AtlasSet();
        // Çػ󵵿¡ ¸Â°Ô ÆгΠ½ºÄÉÀϸµ
        if (ResolutionScale)
        {
            int Width  = 1280;
            int Height = 720;

            float originalRatio = (float)Width / (float)Height;
            float curRatio      = (float)Screen.width / (float)Screen.height;

            transform.localScale = new Vector3((float)curRatio / (float)originalRatio, (float)curRatio / (float)originalRatio, (float)curRatio / (float)originalRatio);
        }

        LateInit();
        mStarted = true;

        SetBlur();

        ///º°µµÀÇ Á¤ÀǾøÀÌ »ý¼ºÇÒ¶§ Á¶°Ç °Ë»çÈÄ ·ÎÅ×ÀÌ¼Ç ±â´É Ãß°¡ÇØÁØ´Ù.
        if (0 < RotationBoxList.Count && 0 < RotationTargetList.Count && RotationBoxList.Count == RotationTargetList.Count)
        {
            SettingRotationBox();
        }

        if (_UiOpenEvent != null)
        {
            _UiOpenEvent.InitOpenEvent();
        }

        if (UiEventType == eUIEventType.All || UiEventType == eUIEventType.Open)
        {
            if (_UiOpenEvent != null)// && this.gameObject.activeSelf
            {
                _UiOpenEvent.SetEvent(true, () => {
                    UIOpenEventCallback();
                });
            }
        }
        else
        {
            if (!gameObject.activeSelf)
            {
                gameObject.SetActive(true);
            }

            if (_UiOpenEvent != null)//&& this.gameObject.activeSelf
            {
                _UiOpenEvent.SetReset();
            }
        }
    }
コード例 #2
0
    /// <summary>
    /// 탑메뉴 셋팅. UIBasePanel의 Awake 에서 호출
    /// TopMenuType이 None이 아니어야지만 호출한다.
    /// </summary>
    public void ShowTopMenu(UIBasePanel curPanel)
    {
        CurPanel = curPanel;

        isFame = false;


        bool isEnergy = false;
        uint titleId  = 0;

        if (CurPanel is TowerPanel)
        {
            titleId = 194;
        }
        else if (CurPanel is PartnerPanel)
        {
            titleId = 7;
        }
        else if (CurPanel is ShopPanel)
        {
            titleId = 462;
        }
        else if (CurPanel is ArenaPanel)
        {
            isFame  = true;
            titleId = 823;
        }
        else if (CurPanel is FreefightPanel)
        {
            isFame  = true;
            titleId = 12;
        }
        else if (CurPanel is ColosseumPanel)
        {
            titleId = 720;
        }
        else if (CurPanel is GuildJoinPanel)
        {
            titleId = 215;
        }
        else if (CurPanel is GuildPanel)
        {
            titleId = 8;
        }
        else if (CurPanel is QuestPopup)
        {
            titleId = 244;
        }
        else if (CurPanel is GachaPanel)
        {
            titleId = 539;
        }
        else if (CurPanel is RankPanel)
        {
            titleId = 161;
        }
        else if (CurPanel is BenefitPanel)
        {
            titleId = 681;
        }
        else if (CurPanel is VipPopup)
        {
            titleId = 460;
        }
        else if (curPanel is DungeonPanel)
        {
            titleId  = 10;
            isEnergy = true;
        }
        else if (curPanel is ReadyPopup)
        {
            titleId = 63;
        }
        //else if (curPanel is ActivityPanel)
        //    titleId = 825;
        else if (curPanel is ChapterPanel)
        {
            titleId  = 9;
            isEnergy = true;
        }
        else if (curPanel is CategoryPanel)
        {
            titleId = 1287;
        }
        else//이쪽으로 온다고 버그는 아니다.
        {
            Debug.LogWarning(string.Format("undefined TitleName {0}", CurPanel.name));
        }

        if (0 < titleId)
        {
            SetTitleName(titleId);
        }

        Level.LevelInfo levelInfo = _LowDataMgr.instance.GetLowDataCharLevel(NetData.instance.UserLevel);
        if (levelInfo.EnergyMax < NetData.instance.GetAsset(AssetType.Energy))//무료 충전개수를 초과했는지.
        {
            RegenLbl.gameObject.SetActive(false);
            RegenTime = System.DateTime.Now;
        }
        else if (RegenTime <= System.DateTime.Now)//충전시간 체크
        {
            RegenLbl.gameObject.SetActive(false);
        }

        RefreshCash(AssetType.None);
        MenuType[3].transform.parent.gameObject.SetActive(isEnergy);

        if (SceneManager.instance.IsClearTutorial(TutorialType.CATEGORY))
        {
            CategoryGo.SetActive(!(curPanel is CategoryPanel));
        }
        else
        {
            CategoryGo.SetActive(false);
        }

        TutoSupport.enabled = false;
        gameObject.SetActive(true);
        OpenEvent.SetEvent(true, () => {
        });
    }