43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
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);
|
|
}
|
|
}
|