using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class InGameMenuManager : MonoBehaviour
{
[SerializeField]
private Button settingsButton;
private Button returnToMenuButton;
private Animator menuAnimator;
private Scrollbar sensitivitySlider;
private PlayerComponent player;
// Start is called before the first frame update
void Start()
menuAnimator= GetComponent<Animator>();
settingsButton.onClick.AddListener(SettingsClicked);
returnToMenuButton.onClick.AddListener(SettingsUnClicked);
player = GameObject.FindObjectOfType(typeof(PlayerComponent)) as PlayerComponent;
}
void SettingsClicked()
menuAnimator.SetBool("SettingsOpen", true);
void SettingsUnClicked()
menuAnimator.SetBool("SettingsOpen", false);
public void UpdateSensitivity()
this.player.SetSensitivity(sensitivitySlider.value);
// Update is called once per frame
void Update()