Exemple #1
0
        /// <summary>
        /// 具体的升级规则
        /// </summary>
        /// <param name="maxhp">最大生命值增量</param>
        /// <param name="maxmp">最大魔法值增量</param>
        /// <param name="maxATK">最大攻击力增量</param>
        /// <param name="maxDEF">最大防御力增量</param>
        /// <param name="maxDEX">最大敏捷度增量</param>
        public void UpgradeRuleOperation(float maxhp, float maxmp, float maxATK, float maxDEF, float maxDEX)
        {
            //处理核心最大数值增加
            PlayerKernalDataProxy.GetInstance().IncreaseMaxHealth(maxhp);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxMagic(maxmp);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxATK(maxATK);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxDEF(maxDEF);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxDEX(maxDEX);

            //hp mp加满为最大数值
            PlayerKernalDataProxy.GetInstance().IncreaseHealthValues(PlayerKernalDataProxy.GetInstance().GetMaxHealth());
            PlayerKernalDataProxy.GetInstance().IncreaseMagicValues(PlayerKernalDataProxy.GetInstance().GetMaxMagic());
        }
Exemple #2
0
        }  //UpgradeOperation  end

        //具体的升级规则的操作
        private void UpgradeRuleOperation(float hp, float mp, float ATK, float DED, float DEX, float Crit)
        {
            //所有的核心数值增加
            PlayerKernalDataProxy.GetInstance().IncreaseMaxHealth(hp);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxMagic(mp);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxATK(ATK);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxDefence(DED);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxDexterity(DEX);
            PlayerKernalDataProxy.GetInstance().IncreaseMaxCritChance(Crit);

            //对应的“生命数值”和“魔法数值”核心数值,加满最大数值  加大的值为本身当前最大的值

            PlayerKernalDataProxy.GetInstance().IncreaseHealthValues(PlayerKernalDataProxy.GetInstance().GetMaxHealth());

            PlayerKernalDataProxy.GetInstance().IncreaseMagicValues(PlayerKernalDataProxy.GetInstance().GetMaxMagic());
        }