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)
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
Unit unit = args.unit;
|
|
|
|
|
M2C_SyncUnitAttribute syncUnitAttribute = new M2C_SyncUnitAttribute { UnitId = unit.Id, NumericType = args.numericType, Value = args.value };
|
2021-04-08 20:09:59 +08:00
|
|
|
|
unit.GetComponent<BrocastComponent>()?.BrocastInterval(syncUnitAttribute);
|
|
|
|
|
await ETTask.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|