コード例 #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));
        }
コード例 #2
0
        public void Confirm()
        {
            var curNickname = IptNickname.value;

            if (string.IsNullOrEmpty(curNickname))
            {
                MorlnTooltip.Show("昵称不能空",
                                  IptNickname.transform.position +
                                  new Vector3(102, 10));
                return;
            }
            Requester.Instance.Send(new EditUserInfo {
                NewNickname = curNickname
            });
        }
コード例 #3
0
        private void OnDetailClick()
        {
            UMengPlugin.UMengEvent(EventId.SKILL_DETAIL,
                                   new Dictionary <string, object> {
                { "code", _skill.SkillCode }, { "level", _level }
            });

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

            if (skillLevelDetailTextConfig != null)
            {
                string textToShow;
                var    skillLevelDetail = skillLevelDetailTextConfig.DetailList.Find(x => x.SkillCode == _skill.SkillCode);
                if (skillLevelDetail == null)
                {
                    return;
                }
                if (_level - 1 >= skillLevelDetail.LevelDetailList.Count)
                {
                    return;                                                      //配置长度不够,不管了
                }
                if (_level == 0)
                {
                    var textNextLevel = skillLevelDetail.LevelDetailList[_level];
                    textToShow = string.Format("1级\n{0}", textNextLevel);
                }
                else
                {
                    var textCurLevel = skillLevelDetail.LevelDetailList[_level - 1];
                    if (_level < skillLevelDetail.LevelDetailList.Count)
                    {
                        var textNextLevel = skillLevelDetail.LevelDetailList[_level];
                        textToShow = string.Format("{0}级\n{1}\n\n下一级\n{2}", _level, textCurLevel, textNextLevel);
                    }
                    else
                    {
                        textToShow = string.Format("{0}级\n{1}\n\n已经顶级", _level, textCurLevel);
                    }
                }
                MorlnTooltip.Show(textToShow, SprSkillIcon.transform.position);
            }
        }
コード例 #4
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));
            }
        }
コード例 #5
0
        void OnClick()
        {
            //这个复杂了,每个技能的介绍还不一样
            var skillLevelDetailTextConfig = ConfigManager.GetConfig(ConfigManager.ConfigType.SkillLevelDetailTextConfig) as SkillLevelDetailTextConfig;

            if (skillLevelDetailTextConfig != null)
            {
                var skillLevelDetail =
                    skillLevelDetailTextConfig.DetailList.Find(x => (SkillEnum)x.SkillCode == _skillCode);
                if (skillLevelDetail == null)
                {
                    return;
                }
                if (_level - 1 >= skillLevelDetail.LevelDetailList.Count)
                {
                    return;                                                       //配置长度不够,不管了
                }
                var textCurLevel = skillLevelDetail.LevelDetailList[_level - 1];
                var textToShow   = string.Format("{0}级\n{1}", _level, textCurLevel);

                MorlnTooltip.Show(textToShow, transform.position);
            }
        }