void Start() { ////////////////////////////// m_pNoticeBar = new NBNoticeBar(); m_pTop = new NBTop1(); m_pBottom = new NBBottom1(); m_pMiddle = new NBMiddleMedalBaglist(); NBUiHelper::addWidgetsToLayerTop(NBUiHelper.m_pUiLayer, m_pNoticeBar, m_pTop, m_pMiddle, null); NBUiHelper::addWidgetsToLayerBottom(NBUiHelper.m_pUiLayer, m_pBottom, null); NBUiHelper::addWidgetToLayerCenter(NBUiHelper.m_pUiLayer, m_pMiddle); return(true); }
void Start() { ////////////////////////////// // 1. super init first ms_this = this; if (!NBBaseLayer.Init()) { return(false); } m_pNoticeBar = new NBNoticeBar(); m_pTop = GameObject.Find(NBUiHelper.NB_UI_CONFIG_DIR); m_pBottom = new NBBottom1(); m_pMiddle = new NBMiddleMedalList(); InitTitle(false); NBUiHelper.addWidGetsToLayerTop(NBUiHelper.m_pUiLayer, m_pTop, m_pMiddle, null); NBUiHelper.addWidGetsToLayerBottom(NBUiHelper.m_pUiLayer, m_pBottom, m_pNoticeBar, null); NBUiHelper.setNodePosUsingAnchorPoint(NBUiHelper.m_pNoticeBar, new Vector2(0, m_pBottom.GetContentSize().height - 6), new Vector2(0, 0)); NBUiHelper.setNodePosUsingAnchorPoint(NBUiHelper.m_pMiddle, new Vector2(0, m_pBottom.GetContentSize().height + m_pNoticeBar.GetContentSize().height), new Vector2(0, 0)); return(true); }