25 lines
717 B
C#
25 lines
717 B
C#
|
using ET.EventType;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
public class OnCreateUnitEvent : AEvent<OnCreateUnit>
|
|||
|
{
|
|||
|
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<BrocastComponent>().BrocastInterval(pproto);
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|