Example #1
0
        public override void Awake()
        {
            base.Awake();

            instance = this;

            tooltipDataPanelRoot = mDMono.transform.FindEx("DataPanels").gameObject;
            PanelOffsetX         = -0.6f;
            PanelOffsetY         = -0.2f;

            m_tooltipDataPanelDic = new Dictionary <string, GameObject>();

            tooltipLibrary = new List <TooltipLibraryEntry>()
            {
                default(TooltipLibraryEntry), default(TooltipLibraryEntry)
            };

            m_AwakeLoadedFinishedCount = 0;

            string str_generic = "_GameAssets/Res/Prefabs/UIPrefabs/Tooltip/DataPanelNew_generic_default";

            EB.Assets.LoadAsync(str_generic, typeof(GameObject), o => {
                if (!o)
                {
                    return;
                }
                tooltipLibrary[0] = new TooltipLibraryEntry()
                {
                    systemName    = "Generic",
                    contextName   = "default",
                    tooltipObject = o as GameObject,
                };
                m_AwakeLoadedFinishedCount += 1;
                CheckInitToolTips();
            });

            string str_skill = "_GameAssets/Res/Prefabs/UIPrefabs/Tooltip/DataPanelNew_skill_default";

            EB.Assets.LoadAsync(str_skill, typeof(GameObject), o => {
                if (!o)
                {
                    return;
                }
                tooltipLibrary[1] = new TooltipLibraryEntry()
                {
                    systemName    = "Skill",
                    contextName   = "default",
                    tooltipObject = o as GameObject,
                };
                m_AwakeLoadedFinishedCount += 1;
                CheckInitToolTips();
            });
        }
Example #2
0
        public override void OnDestroy()
        {
            instance = null;

            base.OnDestroy();
        }