Assets/Scripts/State.cs
/// <summary>
/// Gets the current state of the world
/// </summary>
/// <param name="diggerX">x pos of the digger</param>
/// <param name="diggerY">y pos of the digger</param>
/// <returns>The current state</returns>
Gets the current state of the world
Gets the current state of the world
public static State GetCurrentState(int diggerX, int diggerY)
    {
        var digger = GameObject.FindObjectOfType<Digger>();
        var dist = LevelManager.instance.GetShortestPathDistance(digger.startX, digger.startY, diggerX, diggerY);
        return new State(diggerX, diggerY, dist, LevelManager.instance.GetLevel(), digger.availableKeys);
    }
public static State GetCurrentState ( int diggerX , int diggerY ) { var digger = GameObject . FindObjectOfType < Digger > ( ) ; var dist = LevelManager . instance . GetShortestPathDistance ( digger . startX , digger . startY , diggerX , diggerY ) ; return new State ( diggerX , diggerY , dist , LevelManager . instance . GetLevel ( ) , digger . availableKeys ) ; }
Gets the current state of the world
Gets the current state of the world
The current state
The current state
diggerX
int
x pos of the digger
x pos of the digger
diggerY
int
y pos of the digger
y pos of the digger