Esempio n. 1
0
        public void OnDetailClick()
        {
            UMengPlugin.UMengEvent(EventId.VEGETABLE_EXPLAIN, new Dictionary <string, object> {
                { "code", _userVegetable.VegetableCode }, { "level", _userVegetable.CurrentLevel }
            });

            //这个复杂了,每个技能的介绍或许还不一样
            var vegetableIntroTextConfig =
                ConfigManager.GetConfig(ConfigManager.ConfigType.VegetableIntroTextConfig) as VegetableIntroTextConfig;

            if (vegetableIntroTextConfig == null)
            {
                Debug.LogError("没有VegetableIntroTextConfig");
                return;
            }
            var vegetableIntro =
                vegetableIntroTextConfig.IntroList.Find(x => x.VegetableCode == _userVegetable.VegetableCode);

            if (vegetableIntro == null)
            {
                Debug.LogError("没有vegetableIntro.Code:" + _userVegetable.VegetableCode);
                return;
            }
            MorlnTooltip.Show(vegetableIntro.IntroContent, MainRoot.InverseTransformPoint(VegetableArtContentContainer.position));
        }
Esempio n. 2
0
        void OnClick()
        {
            UMengPlugin.UMengEvent(EventId.EQUIP_INTRO, new Dictionary <string, object> {
                { "code", _equip.EquipCode }
            });                                                                                                      //发送统计事件

            if (_equip == null)
            {
                return;
            }
            var equipIntroTextConfig =
                ConfigManager.GetConfig(ConfigManager.ConfigType.EquipIntroTextConfig) as EquipIntroTextConfig;

            if (equipIntroTextConfig != null)
            {
                var equipIntro = equipIntroTextConfig.IntroList.Find(x => x.EquipCode == _equip.EquipCode);
                var text       = equipIntro.IntroContent + (_worn ? "\n[FFFF00]双击脱下[-]" : "\n[FFFF00]双击穿上[-]");
                MorlnTooltip.Show(text, MainRoot.InverseTransformPoint(transform.position));
            }
        }