16 lines
578 B
C#
Executable File
16 lines
578 B
C#
Executable File
namespace ET
|
|
{
|
|
[NumericWatcher(NumericType.Spd)]
|
|
public class NumericWatcher_Spd : INumericWatcher
|
|
{
|
|
public async ETTask Run(Entity entity, float old, float value)
|
|
{
|
|
Unit unit = entity.As<Unit>();
|
|
UserSetting setting = unit.GetComponent<UserSetting>();
|
|
NumericComponent num = unit.GetComponent<NumericComponent>();
|
|
if (setting!=null)
|
|
setting.SetCD(MathHelper.RoundToInt(CharacterHelper.GetSkillCD(num.Get(NumericType.Spd))));
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
} |