2025-09-11 06:10:39 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public enum eOption { Sound, Bgm }
|
2025-09-12 04:04:46 +00:00
|
|
|
public enum eMoney { AlbumOpen, Chat, Gacha, Lucky }
|
2025-09-11 06:10:39 +00:00
|
|
|
|
|
|
|
|
public class OptionUI : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField] GameObject[] onoff_sound, onoff_bgm;
|
|
|
|
|
|
|
|
|
|
public void Set()
|
|
|
|
|
{
|
|
|
|
|
gameObject.SetActive(true);
|
|
|
|
|
DSUtil.InActivateGameObjects(onoff_sound, SaveMgr.Ins.Get_Option(eOption.Sound) ? 0 : 1);
|
|
|
|
|
DSUtil.InActivateGameObjects(onoff_bgm, SaveMgr.Ins.Get_Option(eOption.Bgm) ? 0 : 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClick_Toggle(int index)
|
|
|
|
|
{
|
|
|
|
|
var option = (eOption)index;
|
|
|
|
|
SaveMgr.Ins.Set_Option(option);
|
|
|
|
|
Set();
|
|
|
|
|
|
2025-09-13 22:08:25 +00:00
|
|
|
if (option == eOption.Bgm)
|
|
|
|
|
{
|
|
|
|
|
if (!SaveMgr.Ins.Get_Option(option))
|
|
|
|
|
SoundInfo.Ins.Stop_BGM();
|
|
|
|
|
else
|
|
|
|
|
SoundInfo.Ins.RePlay_BGM();
|
|
|
|
|
}
|
2025-09-11 06:10:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void OnClick_Game(int index)
|
|
|
|
|
{
|
|
|
|
|
switch (index)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
// 원스토어
|
|
|
|
|
// 구글
|
|
|
|
|
Application.OpenURL("market://details?id=com.fgb.randomgfgostop");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|