PathfindingObstaclesManager

PathfindingObstaclesManager

PathfindingObstaclesManager manages the common objects shared by objects having a pathfinding behavior: In particular, the obstacles behaviors are required to declare themselves (see PathfindingObstaclesManager.addObstacle) to the manager of their associated scene (see gdjs.PathfindingRuntimeBehavior.obstaclesManagers).

Constructor

new PathfindingObstaclesManager(object)

Parameters:
Name Type Description
object

The object

Source:

Methods

(static) getManager()

Get the obstacles manager of a scene.

Source:

addObstacle()

Add a obstacle to the list of existing obstacles.

Source:

getAllObstaclesAround(maxMovementLength)

Returns all the platforms around the specified object.

Parameters:
Name Type Description
maxMovementLength

The maximum distance, in pixels, the object is going to do.

Returns:
Type Description

An array with all platforms near the object.

Source:

removeObstacle()

Remove a obstacle from the list of existing obstacles. Be sure that the obstacle was added before.

Source: