Skip to content

AIPathGrid2D

jay19240 edited this page Dec 11, 2024 · 2 revisions

AIPathGrid2D

A 2D grid representation.

  • inherit from: AIPathGrid

Constructors

  • new AIPathGrid2D(size: vec2, grid: number[]): AIPathGrid2D
    • size: The grid size.
    • grid: The grid data.

Methods

  • getDirections(a: vec2, b: vec2)
    • a: The cell position A.
    • b: The cell position B.
  • getValue(pos: vec2): number
    • pos: The cell position.
  • isInside(pos: vec2): boolean
    • pos: The cell position.
  • isSame(a: vec2, b: vec2): boolean
    • a: The cell position A.
    • b: The cell position B.
Clone this wiki locally