Beispiel #1
0
    private void LoadAddSkillWnd()
    {
        AddSkillWnd wnd = WndManager.GetDialog <AddSkillWnd>();

        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);
        }
    }
Beispiel #2
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);
            }
        }
    }