public TrickOverViewItem(AExample_Base aExampleBase)
        {
            this.DrawCodeExample = true;
            if (aExampleBase == null)
            {
                Debug.LogError("AExampleBase数据为空,请检查类型");
                return;
            }
            m_Example = aExampleBase;

            this.m_TrickOverViewPreviewDrawer = new TrickOverViewPreview(m_Example);
            this.tabGroup = new GUITabGroup
            {
                ToolbarHeight = 30f
            };

            this.tabGroup.RegisterTab(m_Example.GetTrickOverViewInfo().Name);
        }
Exemplo n.º 2
0
        public TrickOverViewItem(Type type)
        {
            this.DrawCodeExample = true;
            AExample_Base aExampleBase =
                AllTrickOverViewUtilities.GetExampleByType(type);

            if (aExampleBase == null)
            {
                return;
            }

            TrickOverViewInfo trickOverViewInfo = aExampleBase.GetTrickOverViewInfo();

            this.Name        = trickOverViewInfo.Name;
            this.Description = trickOverViewInfo.Description;

            this.m_TrickOverViewPreviewDrawer = new TrickOverViewPreview(trickOverViewInfo);
            this.tabGroup = new GUITabGroup
            {
                ToolbarHeight = 30f
            };

            this.tabGroup.RegisterTab(trickOverViewInfo.Name);
        }