/// <summary> /// 创建黑科技 /// </summary> void CreateBlackScience(CaptionInfo info) { if (info == null) { NGUIUtil.DebugLog("CreateBlackScience info == null"); return; } GodSkillInfo gInfo = new GodSkillInfo(); //黑科技抽取是1级,王振鑫确认 GodSkillM.GetGodSkill(info.m_godskilltype1, 1, ref gInfo); NGUIUtil.SetLableText(MyHead.LblBlackScienceDesc, gInfo.m_explain); string icon = "Textures/role/" + info.m_captionid; NGUIUtil.Set2DSprite(MyHead.Spr2dBSIcon, icon); int star = GodSkillM.GetCaptionMinStarLevel(info.m_godskilltype1); SetStarsLevel(star); }
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); }