formatted for logan
hooking buttons up to running algorigthms
This commit is contained in:
@@ -18,9 +18,8 @@ public class AStar : MonoBehaviour
|
|||||||
this.heuristic = heuristic;
|
this.heuristic = heuristic;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
public void go()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ public class Main : MonoBehaviour
|
|||||||
int placementValue;
|
int placementValue;
|
||||||
|
|
||||||
|
|
||||||
|
bool astarSelected;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -85,12 +88,6 @@ public class Main : MonoBehaviour
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartAStar()
|
|
||||||
{
|
|
||||||
AStar astar = new AStar(world, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void SetModeObstacle()
|
public void SetModeObstacle()
|
||||||
{
|
{
|
||||||
placementValue = 1;
|
placementValue = 1;
|
||||||
@@ -108,6 +105,13 @@ public class Main : MonoBehaviour
|
|||||||
world.reset();
|
world.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StartAlgorithm()
|
||||||
|
{
|
||||||
|
if(astarSelected)
|
||||||
|
{
|
||||||
|
AStar astar = new AStar(world, 0);
|
||||||
|
astar.go();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user