/// <summary> /// 黑科技 /// </summary> void BtnBlackScience_OnClickEventHandler(UIButton sender) { if (BlackScienceDC.CheckHaveCaption() == false) { NGUIUtil.ShowTipWndByKey(30000050); return; } BlackScienceChoWnd bsWnd = WndManager.GetDialog <BlackScienceChoWnd>(); ShipPlan P = ShipPlanDC.GetCurShipPlan(); CaptionInfo captionInfo = BlackScienceDC.GetCaptionD(P.BlackScienceID); bsWnd.SetSelectCaptain(captionInfo); }
// 传的是数据表里的ID public void SetBlackScienceDataID(int id) { CaptionInfo c = BlackScienceDC.GetCaptionD(id); m_SelectedBlackScienceDataID = id; m_SelectedBlackScienceCaptainID = c.m_captionid; if (c != null) { NGUIUtil.Set2DSprite(MyHead.SprCaptainHead, "Textures/role/", c.m_captionid.ToString()); } else { NGUIUtil.DebugLog("BlackScienceID = " + id + " 未设置"); } }
void RefreshBlackScienceUI() { ShipPlan P = ShipPlanDC.GetCurShipPlan(); CaptionInfo captionInfo = BlackScienceDC.GetCaptionD(P.BlackScienceID); if (captionInfo != null) { SetBlackScienceUI(captionInfo); } else //未设置黑科技 { NGUIUtil.Set2DSprite(MyHead.SprCaptainHead, "Textures/role/", "-999"); NGUIUtil.SetLableText <string>(MyHead.LblSkillName, ""); } }