Exemple #1
0
        //显示被动技能提示
        private void OnPskillTips()
        {
            Skilltipsobj.SetActive(true);
            Skilltipsobj.transform.FindChild("beidong").gameObject.SetActive(true);
            Skilltipsobj.transform.FindChild("Image").gameObject.SetActive(false);
            GSkillImage = Skilltipsobj.transform.FindChild("beidong/Image_1").gameObject;
            PSkillImage = Skilltipsobj.transform.FindChild("beidong/Image_2").gameObject;
            ASkillImage = Skilltipsobj.transform.FindChild("beidong/Image_3").gameObject;
            GSkillImage.SetActive(false);
            PSkillImage.SetActive(true);
            ASkillImage.SetActive(false);
            skillName.transform.localPosition = postion_Small_Title.transform.localPosition;
            skilldec.transform.localPosition  = postion_Small_Desc.transform.localPosition;
            UI_SkillTips _tips = new UI_SkillTips(CurCard, Pskilltemp);

            //Skilltipstext.text = _tips.GetDesc();

            skillName.text = GameUtils.getString(Pskilltemp.getSkillName()) + "Lv" + Pskilltemp.getSkillLevel();
            skillxiaohao.transform.parent.parent.gameObject.SetActive(false);
            skilldec.transform.localPosition.Set(skilldec.transform.localPosition.x, -89.1f, skilldec.transform.localPosition.z);
            skilldec.text = _tips.GetDesc();

            if (m_HeroStar < 3)
            {
                string          tempText = null;
                ChsTextTemplate temp     = (ChsTextTemplate)DataTemplate.GetInstance().m_ChsTextTable.getTableData("hero_info_skill_open1");
                if (temp.languageMap.TryGetValue(AppManager.Inst.GameLanguage, out tempText))
                {
                    Skilltipstext.text += tempText.Replace("\\n", "\n");
                }
            }
            if (string.IsNullOrEmpty(GetLilimt(Pskilltemp)))
            {
                skillLimitLevel.gameObject.SetActive(false);
            }
            else
            {
                skillLimitLevel.gameObject.SetActive(true);
                skillLimitLevel.text = GetLilimt(Pskilltemp);
            }
            if (!InterfaceControler.GetInst().IsOpenSkill(CurCard.GetHeroRow(), Pskilltemp.getSkillNo()))
            {
                skillLimitLevel.gameObject.SetActive(true);
            }
            else
            {
                skillLimitLevel.gameObject.SetActive(false);
            }
        }
Exemple #2
0
        //显示通用技能提示
        private void OnGskillTips()
        {
            Skilltipsobj.SetActive(true);
            Skilltipsobj.transform.FindChild("beidong").gameObject.SetActive(false);
            Skilltipsobj.transform.FindChild("Image").gameObject.SetActive(true);
            GSkillImage = Skilltipsobj.transform.FindChild("Image/Image_1").gameObject;
            PSkillImage = Skilltipsobj.transform.FindChild("Image/Image_2").gameObject;
            ASkillImage = Skilltipsobj.transform.FindChild("Image/Image_3").gameObject;
            GSkillImage.SetActive(true);
            PSkillImage.SetActive(false);
            ASkillImage.SetActive(false);

            skillName.transform.localPosition = postion_Big_Title.localPosition;
            skilldec.transform.localPosition  = postion_Big_Desc.localPosition;
            UI_SkillTips _tips = new UI_SkillTips(CurCard, Gskilltemp);

            skillxiaohao.transform.parent.parent.gameObject.SetActive(true);
            skillName.text    = GameUtils.getString(Gskilltemp.getSkillName()) + "Lv" + Gskilltemp.getSkillLevel();
            skillxiaohao.text = string.Format("<color=#FF0000>{0}</color>{1}", Gskilltemp.getSkillCostNum1(), GetSkillCostString());
            skillCD.text      = string.Format("<color=#FF0000>{0}</color>秒", Gskilltemp.getCooldown() / 1000);
            skilldec.text     = _tips.GetDesc();
            if (string.IsNullOrEmpty(GetLilimt(Gskilltemp)))
            {
                skillLimitLevel.gameObject.SetActive(false);
            }
            else
            {
                skillLimitLevel.gameObject.SetActive(true);
                skillLimitLevel.text = GetLilimt(Gskilltemp);
            }
            //技能是否开启
            if (!InterfaceControler.GetInst().IsOpenSkill(CurCard.GetHeroRow(), Gskilltemp.getSkillNo()))
            {
                skillLimitLevel.gameObject.SetActive(true);
            }
            else
            {
                skillLimitLevel.gameObject.SetActive(false);
            }
        }
        /// <summary>
        /// 进阶后的属性显示
        /// </summary>
        public void NewShow()
        {
            HeroTemplate _hero = (HeroTemplate)DataTemplate.GetInstance().m_HeroTable.getTableData(_Card.GetHeroRow().getStageUpTargetID());
            int          level = 0;

            switch (_hero.getQuality())
            {
            case 2:
                mSkill.SetActive(false);
                break;

            case 3:
                mSkill.SetActive(true);
                int           skillID3 = _hero.getSkill2ID();
                SkillTemplate skill3   = (SkillTemplate)DataTemplate.GetInstance().m_SkillTable.getTableData(skillID3);
                mSkillBg.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + skill3.getSkillIcon());
                mSkillLevel.text        = skill3.getSkillLevel().ToString();
                mSkillName.text         = GameUtils.getString(skill3.getSkillName());
                mSkillType.text         = GameUtils.getString("common_skilltypename_1");
                UI_SkillTips _tips3 = new UI_SkillTips(_Card, skill3);
                mSkillDesText.text = _tips3.SetShow();
                level = DataTemplate.GetInstance().m_GameConfig.getHero_advanced_level_3();

                break;

            case 4:
                mSkill.SetActive(true);
                int skillID4 = _hero.getSkill3ID();
                if (skillID4 != -1)
                {
                    SkillTemplate skill4 = (SkillTemplate)DataTemplate.GetInstance().m_SkillTable.getTableData(skillID4);
                    mSkillBg.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + skill4.getSkillIcon());
                    mSkillLevel.text        = skill4.getSkillLevel().ToString();
                    mSkillName.text         = GameUtils.getString(skill4.getSkillName());
                    mSkillType.text         = GameUtils.getString("common_skilltypename_3");
                    UI_SkillTips _tips4 = new UI_SkillTips(_Card, skill4);
                    mSkillDesText.text = _tips4.SetShow();
                }
                else
                {
                    mSkill.SetActive(false);
                }
                level = DataTemplate.GetInstance().m_GameConfig.getHero_advanced_level_4();
                break;

            case 5:
                level = DataTemplate.GetInstance().m_GameConfig.getHero_advanced_level_5();
                mSkill.SetActive(false);
                break;

            default:
                break;
            }
            Hero hero = new Hero();

            hero.heroid     = _Card.GetHeroRow().getStageUpTargetID();
            hero.herolevel  = level;
            hero.heroviewid = _hero.getArtresources();
            // ObjectCard obj = new ObjectCard();
            obj.GetHeroData().Init(hero);


            HeroData _heroDate = obj.GetHeroData();

            mLevelNew.text = obj.GetHeroData().Level + "/" + _hero.getMaxLevel();
            mHpNew.text    = (obj.GetBaseMaxHP() - _heroDate.TrainingMaxHP).ToString();
            int nPhysicalTraniningValue = 0;

            if (_hero.getClientSignType()[1] == 0)
            {
                nPhysicalTraniningValue = _heroDate.TrainingPhysicalAttack;
            }
            mPhysicsAttacksNew.text = (obj.GetPhysicalBaseAttack() - nPhysicalTraniningValue).ToString();
            int nMagicTraniningValue = 0;

            if (_hero.getClientSignType()[1] == 1)
            {
                nMagicTraniningValue = _heroDate.TrainingMagicAttack;
            }
            mMagicAttacksNew.text   = (obj.GetMagicBaseAttack() - nMagicTraniningValue).ToString();
            mPhysicsDefenseNew.text = (obj.GetPhysicalBaseDefence() - _heroDate.TrainingPhysicalDefence).ToString();
            mMagicDefenseNew.text   = (obj.GetMagicBaseDefence() - _heroDate.TrainingMagicDefence).ToString();
            mAccuracyNew.text       = obj.GetBaseHit().ToString();
            mEvaNew.text            = obj.GetBaseDodge().ToString();
            mCritNew.text           = obj.GetBaseCritical().ToString();
            mTenacityNew.text       = obj.GetBaseTenacity().ToString();
            mVelocityNew.text       = obj.GetBaseSpeed().ToString();
            int m_HeroStar = _hero.getQuality();
            int maxStar    = _hero.getMaxQuality();

            //星级品质界面控制
            for (int i = 0; i < 5; i++)
            {
                mStarListNew[i].SetActive(i + 1 <= m_HeroStar);
                mStarBGListNew[i].SetActive(i + 1 <= maxStar);
            }
            //for (int i = 0; i < mStarListNew.Count; i++)
            //{
            //    if (i < _hero.getQuality())
            //    {
            //        mStarListNew[i].SetActive(true);
            //    }
            //    else
            //    {
            //        mStarListNew[i].SetActive(false);
            //    }
            //}
            mSkillMaxNew.text = _hero.getSkillMaxLevel().ToString();
            Show3DModel(obj);
        }