コード例 #1
0
ファイル: UICreateRoleGrid.cs プロジェクト: zuojiashun/src
    public void SetGridInfo(GameCmd.enumProfession pro)
    {
        this.m_emPro = pro;
        if (null != m_spIcon)
        {
            if (m_spIcon.mSpriteCount == 2)
            {
                m_spIcon.mSpriteList = new string[2];

                string strIcon = ChooseRolePanel.GetSpriteName(pro);
                m_spIcon.mSpriteList[0] = strIcon;
                m_spIcon.mSpriteList[1] = strIcon + "_hui";
            }
        }
        SetSelect(false, false);
    }
コード例 #2
0
ファイル: PBDG_GameMain.cs プロジェクト: ZPQ4539/ZPQDemo
    /// <summary>
    /// 初始化
    /// </summary>
    public void Initinal()
    {
        //辅助系统
        m_TipsSystem    = new TipsSystem(this);
        m_SwitchSystem  = new SwitchSystem(this);
        m_arsenalSystem = new ArsenalSystem(this);
        //界面
        m_tipsPanel = new TipsPanel();



        m_TipsSystem.Initialize();
        m_arsenalSystem.Initialize();


        //第一次打开才进行加载以下界面
        if (m_player == null)
        {
            m_mainPanel           = new MainPanel(this);
            m_mainMenuPanel       = new MainMenuPanel(this);
            m_mainMenuRightPanel  = new MainMenuRightPanel(this);
            m_readAssetPanel      = new ReadAssetPanel(this);
            m_readAssetRightPanel = new ReadAssetRightPanel(this);
            m_ChooseRolePanel     = new ChooseRolePanel(this);
            m_gameMenuRightPanel  = new GameMenuRightPanel(this);

            //界面状态系统初始化
            m_SwitchSystem.Initialize();
            //注册界面状态
            AddUIState();

            //主界面初始化
            m_mainPanel.Begin();
        }
        else
        {
            //进入游戏后加载兵营系统 以及  UI
            m_campSystem = new CampSystem(this);
            m_statePanel = new GameStatePanel(this);
            //初始化
            m_campSystem.Initialize();
            m_statePanel.Begin();
        }
    }
コード例 #3
0
    public void SetData(int index, GameCmd.SelectUserInfo info = null)
    {
        m_iIndex = index;
        m_uID    = (null != info) ? info.id : 0;
        m_info   = info;
        if (null != m_collider && m_collider.enabled == Empty)
        {
            m_collider.enabled = !Empty;
        }
        if (null != m_tsNone && null != m_tsNone.GetComponent <Collider>())
        {
            m_tsNone.GetComponent <Collider>().enabled = Empty;
        }
        //if (null != m_tsNone)
        //{
        //    if (m_tsNone.gameObject.activeSelf != Empty)
        //        m_tsNone.gameObject.SetActive(Empty);
        //    if (null != m_collider && m_collider.enabled)
        //    {
        //        m_collider.enabled = false;
        //    }
        //}
        if (m_labLeftTime != null)
        {
            if (info != null)
            {
                bool inDelete = info.del == 1;
                m_labLeftTime.gameObject.SetActive(inDelete);
                if (inDelete)
                {
                    m_labLeftTime.text = DataManager.Manager <TextManager>().GetLocalFormatText(LocalTextType.DeleteRole_Tips_5, GetTime(info.delleveltime));
                }
            }
        }
        if (null != m_tsCharacterInfo)
        {
            if (m_tsCharacterInfo.gameObject.activeSelf == Empty)
            {
                m_tsCharacterInfo.gameObject.SetActive(!Empty);
            }
            if (!Empty)
            {
                if (null != m_labLv)
                {
                    m_labLv.text = string.Format("{0}级", info.level);
                }

                if (null != m_labName)
                {
                    m_labName.text = info.name;
                }
                if (null != m_spCIcon)
                {
                    if (m_spCIcon.mSpriteCount == 2)
                    {
                        m_spCIcon.mSpriteList = new string[2];

                        string strIcon = ChooseRolePanel.GetSpriteName(info.type);
                        m_spCIcon.mSpriteList[0] = strIcon;
                        m_spCIcon.mSpriteList[1] = strIcon + "_hui";
                        m_spCIcon.Reset();
                    }
                }
            }
        }
        SetSelect(false, false);
    }