public void ListenPathfindEvent(object param) { PeekPointParameter p = param as PeekPointParameter; if (p.instanceID == instanceID || p.instanceID == GlobalEventQueue.GlobalID) { ReqPathfind req = ParameterPool.GetParameter <ReqPathfind>(); req.instanceID = this.GetInstanceID(); req.startPosition = this.transform.position; req.endPosition = p.peekPoint; req.callback = PathfindCompleteCallback; GlobalEventQueue.EnQueueEvent(DefaultEvent.ReqPathfind, req); } }
public void ListenReqPathfind(object param) { ReqPathfind p = param as ReqPathfind; PathFind(p.startPosition, p.endPosition, p.callback); }