41 lines
894 B
C#
41 lines
894 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.UI;
|
|
|
|
public class MoverSettingsManager : MonoBehaviour
|
|
{
|
|
public Button btnClose,btnBackToPrep,btnRestart;
|
|
public PredictiveMover mover;
|
|
|
|
public GameObject panel;
|
|
public GameObject activator;
|
|
|
|
void Start()
|
|
{
|
|
|
|
btnClose.onClick.AddListener(HideSettings);
|
|
btnRestart.onClick.AddListener(Restart);
|
|
btnBackToPrep.onClick.AddListener(()=>{SceneManager.LoadScene("prep");});
|
|
m_onSettingsChanged();
|
|
}
|
|
|
|
void HideSettings(){
|
|
activator.SetActive(true);
|
|
panel.SetActive(false);
|
|
}
|
|
|
|
void OnSettingsChanged(float useless){
|
|
m_onSettingsChanged();
|
|
}
|
|
|
|
void m_onSettingsChanged(){
|
|
mover.RegenerateLines();
|
|
}
|
|
|
|
void Restart(){
|
|
mover.Restart();
|
|
}
|
|
}
|