Made background music and started on difficulty slider
This commit is contained in:
20
Assets/Scripts/DifficultyManager.cs
Normal file
20
Assets/Scripts/DifficultyManager.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InterfaceOff.MainMenu
|
||||
{
|
||||
public class DifficultyManager : MonoBehaviour
|
||||
{
|
||||
public static float DifficultyMultiplier { get; private set; } = 1;
|
||||
[SerializeField] private Slider DifficultySlider;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
DifficultySlider.onValueChanged.AddListener((val) =>
|
||||
{
|
||||
DifficultyMultiplier = val / 4f; // Makes it between 0.75 and 1.25
|
||||
Debug.Log("Difficulty Slider: " + DifficultyMultiplier);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user