using ET.EventType; using System; using System.Collections.Generic; namespace ET { public class OnCreateUnitEvent : AEvent { public override async ETTask Run(OnCreateUnit args) { M2C_CreateMapMonster pproto = new M2C_CreateMapMonster { Id = args.unit.Id, X = args.pos.x, Y = args.pos.y, ConfigId=args.configId, MapMonsterType = (int)args.monsterType }; var unit = MapUnitComponent.Instance.Get(args.Actor_UnitId); unit.GetComponent().BrocastInterval(pproto); await ETTask.CompletedTask; } } }