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

37 lines
1.1 KiB
C#

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, 7 패배, 8 승리
private void Start()
{
Application.targetFrameRate = 60;
Screen.sleepTimeout = SleepTimeout.NeverSleep; // 게임 실행 중 화면 안 꺼지게
Set_UI(0);
}
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);
}
}
public void Set_UI(int index)
{
DSUtil.InActivateGameObjects(gos, index);
}
public void Set_OverUI(int index, bool active)
{
gos[index].SetActive(active);
}
}