OneShotOneKill/Assets/Script/UGUI/Common/GameUI.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2026-01-07 21:27:42 +00:00
using UnityEngine;
public class GameUI : MonoBehaviourSingletonTemplate<GameUI>
{
public Camera m_UICamera;
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;
//if (EffectMgr.Ins && EffectMgr.Ins.LoadComplete) // 터치 이펙트
// EffectMgr.Ins.Show_Effect("TouchEffect", worldPos);
2026-01-07 21:27:42 +00:00
}
}
public void Set_UI(int index)
{
DSUtil.InActivateGameObjects(gos, index);
}
2026-01-12 04:41:05 +00:00
2026-01-12 04:56:02 +00:00
public void Set_OverUI(int index)
2026-01-12 04:41:05 +00:00
{
2026-01-12 04:56:02 +00:00
gos[index].SetActive(true);
2026-01-12 04:41:05 +00:00
}
2026-01-07 21:27:42 +00:00
}