MazeAI / MazeAIRunner

Namespace Playniax.MazeAI

Inherits from MazeAISprite

Script can be found in Assets/Playniax/Framework/Extensions/MazeAI/Scripts (MonoBehaviour)/MazeAIRunner.cs

Class MazeAIRunner


Base class for maze sprites. The sprite will display a Pacman ghost-like behaviour.

Public fieldsDescription
Direction startDirection = Direction.Right Start direction.
bool borderControl When enabled the sprite will exit the screen on one side but reappear on the other. Note that the tilemap should allow it.

Public MethodsDescription
virtual bool IsObstacle(Tilemap tilemap, Vector3 position, Vector3[] contactPoints, int contactPoint)Returns whether a tile in the tilemap is an obstacle or not.
virtual void OnSetDirection(Vector3 direction)OnSetDirection is called when the sprite changes direction. Implement OnSetDirection if you for example want the sprite to face the correct direction.