Slider for speed implemented

This commit is contained in:
dereelatwit
2023-08-08 19:30:56 -04:00
parent 45cb21030f
commit e5a4a17022
4 changed files with 197 additions and 4 deletions
@@ -10,6 +10,8 @@ public class nMain : MonoBehaviour
private LogicGrid world;
int placementValue;
public float speed = 3.0f;
int algorithm;
bool astarSelected;
bool bfsSelected;
@@ -150,12 +152,16 @@ public class nMain : MonoBehaviour
if (true)
{
Pathfinder astar = new Pathfinder(world, agent, obstacles, samples, algorithm, 0);
astar.go();
}
}
public void AdjustSpeed(float newSpeed)
{
speed = newSpeed;
Debug.Log(speed);
}
public void AstarToggle(bool tickOn)
{