Merge branch 'main' of https://github.com/osheas1atwit/pathfinding-visualizer
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SliderScript : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] private Slider _slider;
|
||||
[SerializeField] private TextMeshProUGUI _sliderText;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_slider.onValueChanged.AddListener((v) =>
|
||||
{
|
||||
_sliderText.text = v.ToString("0.00");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55075ed3d579c274786d0d73ac889061
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,6 +10,8 @@ public class nMain : MonoBehaviour
|
||||
private LogicGrid world;
|
||||
int placementValue;
|
||||
|
||||
public float speed = 3.0f;
|
||||
|
||||
int algorithm;
|
||||
bool astarSelected;
|
||||
bool bfsSelected;
|
||||
@@ -154,7 +156,11 @@ public class nMain : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void AdjustSpeed(float newSpeed)
|
||||
{
|
||||
speed = newSpeed;
|
||||
Debug.Log(speed);
|
||||
}
|
||||
|
||||
public void AstarToggle(bool tickOn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user