public void DoFixedUpdate(float fixedDeltaTime) { if (!IgnoreTimeScale && (counter += fixedDeltaTime) > Interval && tarSkillEnergy) { counter = 0; tarSkillEnergy.ChangeValue(Value); } }
/// <summary> /// 尝试增/减技能资源 /// </summary> /// <param name="type">技能资源类型</param> /// <param name="value">改变数量</param> /// <param name="allowFree">当目标资源不存在时也判断为成功</param> /// <returns></returns> public virtual bool TryChangeSkillEnergy(WorldSetting.Energy type, float value) { SkillEnergy skillEnergy = GetSkillEnergy(type); return(skillEnergy && skillEnergy.ChangeValue(value)); }