Construct() public static method

public static Construct ( Array startPoints, Vector3 target, Array callbackDelegates, OnPathDelegate callback = null ) : MultiTargetPath
startPoints Array
target Vector3
callbackDelegates Array
callback OnPathDelegate
return MultiTargetPath
Ejemplo n.º 1
0
        public static MultiTargetPath Construct(Vector3[] startPoints, Vector3 target, OnPathDelegate[] callbackDelegates, OnPathDelegate callback = null)
        {
            MultiTargetPath multiTargetPath = MultiTargetPath.Construct(target, startPoints, callbackDelegates, callback);

            multiTargetPath.inverted = true;
            return(multiTargetPath);
        }
Ejemplo n.º 2
0
        // Token: 0x060021C9 RID: 8649 RVA: 0x00190514 File Offset: 0x0018E714
        public MultiTargetPath StartMultiTargetPath(Vector3[] startPoints, Vector3 end, bool pathsForAll, OnPathDelegate callback = null, int graphMask = -1)
        {
            MultiTargetPath multiTargetPath = MultiTargetPath.Construct(startPoints, end, null, null);

            multiTargetPath.pathsForAll = pathsForAll;
            this.StartPath(multiTargetPath, callback, graphMask);
            return(multiTargetPath);
        }
Ejemplo n.º 3
0
        /** Starts a Multi Target Path from multiple start points to a single target point.
         * A Multi Target Path will search from all start points to the target point in one search and will return all paths if \a pathsForAll is true, or only the shortest one if \a pathsForAll is false.\n
         *
         * \param startPoints	The start points of the path
         * \param end			The end point of the path
         * \param pathsForAll	Indicates whether or not a path from all start points should be searched for or only to the closest one
         * \param callback		The function to call when the path has been calculated
         * \param graphMask		Mask used to specify which graphs should be searched for close nodes. See Pathfinding.NNConstraint.graphMask.
         *
         * \a callback and #pathCallback will be called when the path has completed. \a Callback will not be called if the path is canceled (e.g when a new path is requested before the previous one has completed)
         * \astarpro
         * \see Pathfinding.MultiTargetPath
         * \see \ref MultiTargetPathExample.cs "Example of how to use multi-target-paths"
         */
        //Good Game
        //public MultiTargetPath StartMultiTargetPath (Vector3[] startPoints, Vector3 end, bool pathsForAll, OnPathDelegate callback = null, int graphMask = -1) {
        public MultiTargetPath StartMultiTargetPath(VInt3[] startPoints, VInt3 end, bool pathsForAll, OnPathDelegate callback = null, int graphMask = -1)
        {
            MultiTargetPath p = MultiTargetPath.Construct(startPoints, end, null, null);

            p.pathsForAll = pathsForAll;
            StartPath(p, callback, graphMask);
            return(p);
        }