zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Unity/Assets/HotfixView/Numeric/NumericWatcher_Hp.cs

21 lines
616 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using ET;
namespace ET
{
/// <summary>
/// 监视hp数值变化改变血条值
/// </summary>
[NumericWatcher(NumericType.Hp)]
public class NumericWatcher_Hp : INumericWatcher
{
public async ETTask Run(Entity entity, float old, float value)
{
Log.Info($"@{entity.Id}改变 Hp:{old} -> {value}");
var zoneScene = entity.ZoneScene();
CharacterUIHelper.Hud_ChangeHpOrMaxHp(zoneScene,entity);
CharacterUIHelper.UpdateHeadInfo_ChangeHp(zoneScene,entity.Id,old,value);
await ETTask.CompletedTask;
}
}
}