16 lines
492 B
C#
Executable File
16 lines
492 B
C#
Executable File
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;
|
|
}
|
|
}
|
|
}
|