Пример #1
0
        public void Update(bool isFast, float pastRound, int round)
        {
            recoverTime += pastRound * GameConstants.RoundRecoverAddon * ((round >= GameConstants.RoundRecoverDoubleRound) ? 2 : 1);
            var need = isFast ? GameConstants.DrawManaTimeFast : GameConstants.DrawManaTime;

            if (recoverTime >= need)
            {
                recoverTime -= need;
                AddManaData(EnergyGenerator.NextAimMana, 1);
                EnergyGenerator.UseMana();
                EnergyGenerator.Next(round);
            }
            if (ManaChanged != null)//todo 先ws下
            {
                ManaChanged();
            }
            SpikeManager.OnRound(pastRound);
            comboTime -= pastRound;
            if (comboTime <= 0)
            {
                comboTime = 0;
                CardManager.UpdateCardCombo();
            }
            if (CardManager.HeroSkillCd > 0)
            {
                CardManager.HeroSkillCd -= pastRound;
                if (HeroSkillChanged != null && CardManager.HeroSkillCd <= 0)
                {
                    HeroSkillChanged(true);
                }
            }
        }
Пример #2
0
        protected void InitBase()
        {
            Lp = 3;
            Mp = 3;
            Pp = 3;
            EnergyGenerator.Next(0);

            var jobConfig = ConfigData.GetJobConfig(Job);

            if (jobConfig.SkillId > 0)
            {
                HeroSkillList.Add(jobConfig.SkillId);//添加职业技能
            }
        }