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
@@ -18,9 +18,8 @@ public class AStar : MonoBehaviour
this.heuristic = heuristic; this.heuristic = heuristic;
} }
void Start() public void go()
{ {
} }
} }
+11 -7
View File
@@ -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();
}
}
} }