Options
All
  • Public
  • Public/Protected
  • All
Menu

基本静态网格图与A*一起使用 将walls添加到walls HashSet,并将加权节点添加到weightedNodes

Hierarchy

  • AstarGridGraph

Implements

Index

Constructors

constructor

Properties

Private _height

_height: any

Private _neighbors

_neighbors: Vector2[] = new Array(4)

Private _width

_width: any

defaultWeight

defaultWeight: number = 1

dirs

dirs: Vector2[] = [new Vector2(1, 0),new Vector2(0, -1),new Vector2(-1, 0),new Vector2(0, 1)]

walls

walls: Vector2[] = []

weightedNodeWeight

weightedNodeWeight: number = 5

weightedNodes

weightedNodes: Vector2[] = []

Methods

cost

getNeighbors

heuristic

isNodeInBounds

  • isNodeInBounds(node: Vector2): boolean

isNodePassable

  • isNodePassable(node: Vector2): boolean

search

Generated using TypeDoc