2021-04-08 20:09:59 +08:00
|
|
|
|
using ET.EventType;
|
|
|
|
|
using ET;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ET
|
|
|
|
|
{
|
|
|
|
|
public class PathfindingResultEvent : AEvent_Sync<PathfindingResult>
|
|
|
|
|
{
|
|
|
|
|
public override void Run(PathfindingResult args)
|
|
|
|
|
{
|
|
|
|
|
|
2021-04-11 19:50:39 +08:00
|
|
|
|
Unit unit = args.unit;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
UnitPathComponent unitPathComponent = unit.GetComponent<UnitPathComponent>();
|
|
|
|
|
|
|
|
|
|
unitPathComponent.StartMove(args.currPos,args.targetPos,args.speed).Coroutine();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|