Exemplo n.º 1
0
    private void ShowUnit()
    {
        StaticShipCanvas info = ShipPlanM.GetShipCanvasInfo(m_id);

        if (info != null)
        {
            List <string> data  = ShipPlanM.ParseShapeData(info.Shape);
            int           index = 0;
            foreach (string item in data)
            {
                for (int i = 0; i < item.Length; i++)
                {
                    if (item[i] == 49)
                    {
                        NGUIUtil.SetActive(m_lGo[index], true);
                    }
                    index++;
                }
            }
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 显示船只设计图
    /// </summary>
    public void ShowDesignAction()
    {
        treasure.TreasureRobSettleResponse response = null;
        if (response != null)
        {
            int sShipCanvasID      = response.shipdrawingid;
            StaticShipCanvas sInfo = ShipPlanM.GetShipCanvasInfo(sShipCanvasID);
            if (sInfo != null)
            {
                sdata.s_itemtypeInfo itypeInfo = new sdata.s_itemtypeInfo();
                itypeInfo.gid   = sShipCanvasID;
                itypeInfo.name  = sInfo.Name;
                itypeInfo.gtype = 5;
                List <sdata.s_itemtypeInfo> lInfo = new List <sdata.s_itemtypeInfo>();
                lInfo.Add(itypeInfo);

                TrophiesActionWnd TropWnd = WndManager.GetDialog <TrophiesActionWnd>();
                if (TropWnd)
                {
                    TropWnd.ClearTropiesData();
                    TropWnd.AddTropiesData(lInfo);
                    TropWnd.SetWndType(5);
                    TropWnd.MyHead.LblDes.gameObject.SetActive(false);
                    TropWnd.BtnOKClickHandler += CheckShowCombatResult;
                }
            }
            else
            {
                CheckShowCombatResult();
            }
        }
        else
        {
            CheckShowCombatResult();
        }
    }
Exemplo n.º 3
0
    private void LoadTrophies(int gtype, int gid, bool isSoul = false, bool isNewVersion = false, int num = 0, bool isBook = false)
    {
        NGUIUtil.SetActive(MyHead.SkillInfo, false);
        NGUIUtil.SetActive(MyHead.Building, false);

        if (isNewVersion)
        {
            if (MyHead.LblDes != null)
            {
                MyHead.LblDes.gameObject.SetActive(false);
            }
        }
        if (gtype == 1)   //炮弹兵
        {
            SoldierInfo Info = SoldierM.GetStartSoldierInfo(gid);
            CreateSoldier(Info);

            if (isNewVersion)
            {
                if (isSoul && num > 0)
                {
                    int startLevel = SoldierM.GetSoldierStarLevel(Info.SoldierTypeID);
                    MyHead.LblDes.text = string.Format(NGUIUtil.GetStringByKey(10000119), startLevel, num);
                    MyHead.LblDes.gameObject.SetActive(true);
                }
            }
            else if (m_isSoulPis && m_SoulPisNum > 0)
            {
                int startLevel = SoldierM.GetSoldierStarLevel(Info.SoldierTypeID);
                MyHead.LblDes.text = string.Format(NGUIUtil.GetStringByKey(10000119), startLevel, m_SoulPisNum);
            }
            m_bNotTween = false;
        }
        else if (gtype == 3)     // 陷阱/建筑物
        {
            BuildInfo Info = buildingM.GetStartBuildInfo(gid);
            if (Info != null)
            {
                CreateBuilding(Info);
            }

            m_bNotTween = true;
        }
        else if (gtype == 4)     //黑科技
        {
            NGUIUtil.SetActive(MyHead.BlackScience, true);
            CaptionInfo info = new CaptionInfo();
            GodSkillM.GetCaption(gid, ref info);
            CreateBlackScience(info);
            if (isNewVersion)
            {
                if (isBook && num > 0)
                {
                    int star = GodSkillM.GetCaptionMinStarLevel(info.m_godskilltype1);
                    MyHead.LblDes.text = string.Format(NGUIUtil.GetStringByKey(30000060), star, num);
                    MyHead.LblDes.gameObject.SetActive(true);
                }
            }
            else if (m_isSoulPis && m_SoulPisNum > 0)
            {
                int star = GodSkillM.GetCaptionMinStarLevel(info.m_godskilltype1);
                MyHead.LblDes.text = string.Format(NGUIUtil.GetStringByKey(30000060), star, m_SoulPisNum);
            }
            m_bNotTween = true;
        }
        else if (gtype == 5)     //设计图
        {
            StaticShipCanvas cInfo = ShipPlanM.GetShipCanvasInfo(gid);
            CreateDesignPic(cInfo);
            m_bNotTween = true;
        }
        else if (gtype == 2)     //碎片
        {
            CreateTrophyItem(gtype, gid);
        }
        SoundPlay.Play("get_item", false, false);
    }