コード例 #1
0
ファイル: Agent.cs プロジェクト: jjr2930/DUDUDU
        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);
            }
        }
コード例 #2
0
        public void ListenReqPathfind(object param)
        {
            ReqPathfind p = param as ReqPathfind;

            PathFind(p.startPosition, p.endPosition, p.callback);
        }