2026-01-07 21:27:42 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class GameUI : MonoBehaviourSingletonTemplate<GameUI>
|
|
|
|
|
{
|
|
|
|
|
public Camera m_UICamera;
|
2026-01-12 03:59:01 +00:00
|
|
|
public GameObject[] gos; // 0 Title_Loading, 1 Title_Login, 2 LobbyMain, 3 Tutorial_1, 4 Play_Stage_Select_1,
|
|
|
|
|
// 5 Play_Ingame, 6 Play_UI_ChoiceSkill
|
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
Application.targetFrameRate = 60;
|
|
|
|
|
Screen.sleepTimeout = SleepTimeout.NeverSleep; // 게임 실행 중 화면 안 꺼지게
|
|
|
|
|
Set_UI(0);
|
|
|
|
|
}
|
2026-01-07 21:27:42 +00:00
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetMouseButtonDown(0))
|
|
|
|
|
{
|
|
|
|
|
Vector3 mousePos = Input.mousePosition;
|
|
|
|
|
Vector3 worldPos = m_UICamera.ScreenToWorldPoint(mousePos);
|
|
|
|
|
worldPos.z = 0f;
|
2026-01-12 03:59:01 +00:00
|
|
|
//if (EffectMgr.Ins && EffectMgr.Ins.LoadComplete) // 터치 이펙트
|
2026-01-11 23:28:01 +00:00
|
|
|
// EffectMgr.Ins.Show_Effect("TouchEffect", worldPos);
|
2026-01-07 21:27:42 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-01-12 03:59:01 +00:00
|
|
|
|
|
|
|
|
public void Set_UI(int index)
|
|
|
|
|
{
|
|
|
|
|
DSUtil.InActivateGameObjects(gos, index);
|
|
|
|
|
}
|
2026-01-12 04:41:05 +00:00
|
|
|
|
|
|
|
|
public void Set_UI(params int[] index)
|
|
|
|
|
{
|
|
|
|
|
DSUtil.InActivateGameObjects(gos);
|
|
|
|
|
for (int i = 0; i < index.Length; i++)
|
|
|
|
|
gos[index[i]].SetActive(true);
|
|
|
|
|
}
|
2026-01-07 21:27:42 +00:00
|
|
|
}
|