Search Results for

    Show / Hide Table of Contents

    Class PathGenerator

    Responsible for creating all path related elements in the level.

    Inheritance
    Object
    PathGenerator
    RiverGenerator
    WalkpathGenerator
    Namespace: Global
    Assembly: cs.temp.dll.dll
    Syntax
    public class PathGenerator

    Methods

    createPaths(Map, Int32, Boolean, Cell.CellStatus)

    Declaration
    protected int createPaths(Map map, int maxCount, bool intersectionsEnabled, Cell.CellStatus type)
    Parameters
    Type Name Description
    Map map
    Int32 maxCount
    Boolean intersectionsEnabled
    Cell.CellStatus type
    Returns
    Type Description
    Int32

    findAStarPath(Map, Cell, Cell, Cell.CellStatus, Boolean)

    Based on the a* algorithm. Used to find a path between a pair of cells.

    Declaration
    protected bool findAStarPath(Map map, Cell startCell, Cell endCell, Cell.CellStatus status, bool intersectionsEnabled)
    Parameters
    Type Name Description
    Map map

    The map to find the path on.

    Cell startCell

    The start of the path.

    Cell endCell

    The end goal of the path.

    Cell.CellStatus status

    Defines the type of path to be generated.

    Boolean intersectionsEnabled

    Whether or not intersections are enabled for the path.

    Returns
    Type Description
    Boolean

    Whether or not the path was generated.

    getReachableCells(Map, Heap<CellPair>, Boolean)

    Gets a pair of start and end cells for which a path can be generated.

    Declaration
    protected CellPair getReachableCells(Map map, Heap<CellPair> existingCellPairs, bool intersectionsEnabled)
    Parameters
    Type Name Description
    Map map

    The levels 2D array of cells.

    Heap<CellPair> existingCellPairs

    The current chosen cell pairs. Used to ensure paths do not cross if intersections are disabled.

    Boolean intersectionsEnabled

    Whether or not intersections are enabled.

    Returns
    Type Description
    CellPair

    A pair of start and end cells for which a path can be generated.

    In This Article
    Back to top Project documentation