NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Buff/BaseSkillBuff.cs

44 lines
1.2 KiB
C#
Raw Normal View History

2023-12-13 16:20:41 +08:00
using Gameplay.Unit;
using Gameplay.Unit.Data;
2023-08-22 19:08:45 +08:00
namespace Gameplay.Buff
{
using cfg.BuffCfg;
2023-12-13 16:20:41 +08:00
using Skill;
2023-08-22 19:08:45 +08:00
2023-10-19 15:00:19 +08:00
public class BaseSkillBuff : BaseBuff
2023-08-22 19:08:45 +08:00
{
protected SkillHandle _skill;
2023-08-22 19:08:45 +08:00
2023-10-19 15:00:19 +08:00
public override void Ctor(GameUnit creator,
DataBuff configData)
2023-08-22 19:08:45 +08:00
{
2023-10-19 15:00:19 +08:00
if (creator == null)
{
DebugUtil.LogError("创建者为空");
return;
}
switch (creator.gameunitType)
{
case EGameUnitType.Character:
case EGameUnitType.Vehicle:
var skillManager = SkillManager.instance.GetUnitSkillManager(creator);
_skill = skillManager.positiveSkill;
OverrideFloatParams(_skill.runtimeData.configData.FloatParams.ToArray());
2023-10-19 15:00:19 +08:00
break;
case EGameUnitType.Summon:
2023-12-13 14:11:09 +08:00
// 不在覆写
2023-10-19 15:00:19 +08:00
break;
default:
DebugUtil.LogError("不支持的类型:{0}", creator.gameunitType);
break;
}
2023-10-19 15:00:19 +08:00
base.Ctor(creator, configData);
2023-08-22 19:08:45 +08:00
}
}
}