feat: 가이드 UI 추가
This commit is contained in:
@@ -27,6 +27,7 @@ namespace TON
|
||||
GameWinUI, // 게임 오버 및 클리어 시 노출되는 UI
|
||||
PauseUI, // 일시중지 버튼 선택 시 노출되는 UI
|
||||
GoldPopup,
|
||||
GuideUI,
|
||||
|
||||
POPUP_END,
|
||||
}
|
||||
|
||||
47
Gameton-06/Assets/Gameton/Scripts/UI/GuideUI.cs
Normal file
47
Gameton-06/Assets/Gameton/Scripts/UI/GuideUI.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class GuideUI : UIBase
|
||||
{
|
||||
[SerializeField] private List<GameObject> guideList = new List<GameObject>();
|
||||
private int index = 0;
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
index = 0;
|
||||
|
||||
ShowGuideObject();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
guideList.ForEach(guide => guide.SetActive(false));
|
||||
}
|
||||
|
||||
private void ShowGuideObject()
|
||||
{
|
||||
if (index > 0)
|
||||
{
|
||||
guideList[index - 1].SetActive(false);
|
||||
}
|
||||
guideList[index].SetActive(true);
|
||||
}
|
||||
|
||||
public void HandleClickScreen()
|
||||
{
|
||||
if (index == guideList.Count)
|
||||
{
|
||||
UIManager.Hide<GuideUI>(UIList.GuideUI);
|
||||
return;
|
||||
}
|
||||
|
||||
index++;
|
||||
ShowGuideObject();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Gameton-06/Assets/Gameton/Scripts/UI/GuideUI.cs.meta
Normal file
11
Gameton-06/Assets/Gameton/Scripts/UI/GuideUI.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0660ed70b99bd664ead23cc2ec33dbd2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -134,5 +134,15 @@ namespace TON
|
||||
// TODO: 상점 UI 추가
|
||||
// 상점은 Scene으로 전환하자.
|
||||
}
|
||||
|
||||
public void OnClickRouletteButton()
|
||||
{
|
||||
// TODO: 룰렛 UI 추가가
|
||||
}
|
||||
|
||||
public void OnClickGuideButton()
|
||||
{
|
||||
UIManager.Show<GuideUI>(UIList.GuideUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user