40 lines
955 B
C#
40 lines
955 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class SettingWindws : SingletonMonoBehaviour<SettingWindws>
|
|
{
|
|
[SerializeField] GameObject[] clossObjs;
|
|
[SerializeField] Scrollbar music;
|
|
[SerializeField] Scrollbar sound;
|
|
public bool Active
|
|
{
|
|
get { return gameObject.activeSelf; }
|
|
}
|
|
protected override void OnAwake()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
public void SetUI(bool isMain)
|
|
{
|
|
for(int n = 0; n < clossObjs.Length; n++)
|
|
{
|
|
clossObjs[n].SetActive(!isMain);
|
|
}
|
|
gameObject.SetActive(true);
|
|
}
|
|
public void OnMain()
|
|
{
|
|
gameObject.SetActive(false);
|
|
GameManager.Instance.NextScene(GameManager.eScene.Game);
|
|
}
|
|
public void OnRestart()
|
|
{
|
|
gameObject.SetActive(false);
|
|
GameManager.Instance.NextScene(GameManager.eScene.Play);
|
|
}
|
|
public void OnExit()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|