18 lines
466 B
C#
18 lines
466 B
C#
|
using ET;
|
|||
|
using UnityEditor;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
[NumericWatcher(NumericType.YuanBao)]
|
|||
|
public class NumericWatcher_YuanBao : INumericWatcher
|
|||
|
{
|
|||
|
public async ETTask Run(Entity entity, float old, float value)
|
|||
|
{
|
|||
|
Log.Info($"@{entity.Id}改变 YuanBao:{old} -> {value}");
|
|||
|
int yuanbao = MathHelper.RoundToInt(value);
|
|||
|
ItemHelper.ChangeYuanBao(yuanbao);
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|