zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Event/SyncAttributeEvent.cs

18 lines
539 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using ET.EventType;
using System;
using System.Collections.Generic;
namespace ET
{
public class SyncAttributeEvent : AEvent<SyncAttribute>
{
public override async ETTask Run(SyncAttribute args)
{
var unit = args.unit;
var syncUnitAttribute = new M2C_SyncUnitAttribute { UnitId = unit.Id, NumericType = args.numericType, Value = args.value };
unit.GetComponent<BrocastComponent>()?.BrocastInterval(syncUnitAttribute);
await ETTask.CompletedTask;
}
}
}