예제 #1
0
    private void LoadHeroIntorduct()
    {
        HeroIntroduceWnd wnd = WndManager.GetDialog <HeroIntroduceWnd>();

        if (wnd != null)
        {
            wnd.transform.parent        = MyHead.GoParent.transform;
            wnd.transform.localPosition = MyHead.GoParent.transform.localPosition;
            wnd.transform.localRotation = MyHead.GoParent.transform.localRotation;
            wnd.transform.localScale    = MyHead.GoParent.transform.localScale;
            wnd.SetData(m_soldierInfo);
        }
    }
예제 #2
0
    private void SetUI()
    {
        m_bShowInfo = true;

        //Top
        if (MyHead.SprType)        //设置角色的类型(力量0、敏捷1、智力2)
        {
            MyHead.SprType.spriteName = string.Format("bb_00{0}ic", m_soldierInfo.m_main_proerty + 1);
        }
        if (MyHead.LblTitle)
        {
            MyHead.LblTitle.text = m_soldierInfo.m_name;
        }
        SetStarNum(m_soldierInfo.StarLevel);
        //Mid
        //设置角色3D

        //装备 数据暂未配置
        GetEquimment();

        //Bottom
        if (MyHead.LblLevel)
        {
            MyHead.LblLevel.text = m_soldierInfo.Level.ToString();
        }
        SetExp();
        if (MyHead.LblCombatPower)
        {
            MyHead.LblCombatPower.text = m_soldierInfo.m_combat_power.ToString();
        }
        SetSoulPercentage();

        if (m_bShowInfo)
        {
            HeroIntroduceWnd heroWnd = WndManager.GetDialog <HeroIntroduceWnd>();
            heroWnd.SetData(m_soldierInfo);
        }
        SoldierScrollWnd wnd = WndManager.GetDialog <SoldierScrollWnd>();

        if (wnd)
        {
            wnd.m_currentSoldierInfo = m_soldierInfo;
        }
    }
예제 #3
0
    void BtnJiNeng_OnClickEventHandler(UIButton sender)
    {
        if (m_soldierInfo == null)
        {
            NGUIUtil.DebugLog("SoldierInfoWnd m_soldierInfo==null !!!");
            return;
        }

        if (m_bShowInfo)//技能按钮用来 切换显示炮弹兵信息面板 和 技能面板
        {
            m_bShowInfo = false;
            WndManager.DestoryDialog <HeroIntroduceWnd>();
            UISprite sprite = MyHead.BtnJiNeng.transform.GetChild(0).GetComponentInChildren <UISprite>();
            if (sprite)
            {
                sprite.spriteName = "pdbxx_011wd";
                sprite.MarkAsChanged();
            }
            AddSkillWnd wnd = WndManager.GetDialog <AddSkillWnd>();
            if (wnd)
            {
                wnd.SetData(m_soldierInfo);
            }
        }
        else
        {
            m_bShowInfo = true;
            WndManager.DestoryDialog <AddSkillWnd>();
            UISprite sprite = MyHead.BtnJiNeng.transform.GetChild(0).GetComponentInChildren <UISprite>();
            if (sprite)
            {
                sprite.spriteName = "pdbxx_001wd";
                sprite.MarkAsChanged();
            }
            HeroIntroduceWnd heroWnd = WndManager.GetDialog <HeroIntroduceWnd>();
            if (heroWnd)
            {
                heroWnd.SetData(m_soldierInfo);
            }
        }
    }