My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RoslynCSharp.Example.MazeCrawler Class Referenceabstract

Base class for the maze crawler example. Any runtime maze crawler code should inherit from this class. More...

Inheritance diagram for RoslynCSharp.Example.MazeCrawler:
RoslynCSharp.Example.TestCrawler

Public Member Functions

abstract MazeDirection DecideDirection (Vector2Int position, bool canMoveLeft, bool canMoveRight, bool canMoveUp, bool canMoveDown)
 When overriden should return the MazeDirection that the crawler should move given the current state.
 
void Awake ()
 Called by Unity.
 
void Update ()
 Called by Unity.
 
void Restart ()
 Resets the maze crawler to its initial start position.
 

Public Attributes

GameObject breadcrumbPrefab
 The breadcrum game object that is dropped at every position.
 
float moveSpeed = 2f
 The move speed of the crawler move.
 

Detailed Description

Base class for the maze crawler example. Any runtime maze crawler code should inherit from this class.

Member Function Documentation

◆ DecideDirection()

abstract MazeDirection RoslynCSharp.Example.MazeCrawler.DecideDirection ( Vector2Int  position,
bool  canMoveLeft,
bool  canMoveRight,
bool  canMoveUp,
bool  canMoveDown 
)
pure virtual

When overriden should return the MazeDirection that the crawler should move given the current state.

Parameters
positionThe current maze index position
canMoveLeftCan the crawler move left or is there a wall in the way
canMoveRightCan the crawler move right or is there a wall in the way
canMoveUpCan the crawler move up or is there a wall in the way
canMoveDownCan the crawler move down or is there a wall in the way
Returns

Implemented in RoslynCSharp.Example.TestCrawler.


The documentation for this class was generated from the following file: