CTT/Unity/Assets/HotfixView/Numeric/NumericWatcher_YuanBao.cs

18 lines
466 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using ET;
2021-06-29 11:28:15 +08:00
using UnityEditor;
2021-04-08 20:09:59 +08:00
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);
2021-06-29 11:28:15 +08:00
ItemHelper.ChangeYuanBao(yuanbao);
2021-04-08 20:09:59 +08:00
await ETTask.CompletedTask;
}
}
}