16 lines
492 B
C#
16 lines
492 B
C#
|
namespace ET
|
|||
|
{
|
|||
|
[NumericWatcher(NumericType.SkinId)]
|
|||
|
public class NumericWatcher_SkinId : INumericWatcher
|
|||
|
{
|
|||
|
public async ETTask Run(Entity entity, float old, float value)
|
|||
|
{
|
|||
|
|
|||
|
DelaySendSyncAttributeComponent.instance.Add(entity.As<Unit>(), NumericType.SkinId, value);
|
|||
|
User user =await UserComponent.Instance.Query(entity.Id);
|
|||
|
user.SkinId = MathHelper.RoundToInt(value);
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|