formatted for logan

hooking buttons up to running algorigthms
This commit is contained in:
Simon O'Shea
2023-08-08 15:34:02 -04:00
parent 98a18e1d4e
commit 239f7ed4c5
2 changed files with 13 additions and 10 deletions
+11 -7
View File
@@ -12,6 +12,9 @@ public class Main : MonoBehaviour
int placementValue;
bool astarSelected;
// Start is called before the first frame update
void Start()
{
@@ -85,12 +88,6 @@ public class Main : MonoBehaviour
}
public void StartAStar()
{
AStar astar = new AStar(world, 0);
}
public void SetModeObstacle()
{
placementValue = 1;
@@ -108,6 +105,13 @@ public class Main : MonoBehaviour
world.reset();
}
public void StartAlgorithm()
{
if(astarSelected)
{
AStar astar = new AStar(world, 0);
astar.go();
}
}
}