feat: 우측 상단 더보기 옵션 버튼 UI 구성 수정
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class IngameOptionUI : UIBase
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
|
||||
}
|
||||
|
||||
public void OnClickOptionButton()
|
||||
{
|
||||
Scene activeScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene();
|
||||
|
||||
if (activeScene.name.Equals("Lobby"))
|
||||
{
|
||||
//
|
||||
}
|
||||
else if (activeScene.name.StartsWith("Stage"))
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Gameton-06/Assets/Gameton/Scripts/UI/OptionUI.cs
Normal file
67
Gameton-06/Assets/Gameton/Scripts/UI/OptionUI.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class OptionUI : UIBase
|
||||
{
|
||||
public GameObject goldObject; // 골드
|
||||
public GameObject fishObject; // 생선
|
||||
public GameObject inventoryObject; // 인벤토리 버튼
|
||||
public GameObject settingObject; // 더보기(옵션) 버튼
|
||||
public GameObject parseObject; // 일시정지
|
||||
|
||||
|
||||
// 로비 : 골드/생선/인벤토리/더보기 버튼
|
||||
// 스테이지 : 인벤토리/일시정지 버튼
|
||||
// 상점 : 골드/생선
|
||||
private void Start()
|
||||
{
|
||||
Scene activeScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene();
|
||||
|
||||
if (activeScene.name.Equals("Lobby"))
|
||||
{
|
||||
goldObject.SetActive(true);
|
||||
fishObject.SetActive(true);
|
||||
inventoryObject.SetActive(true);
|
||||
settingObject.SetActive(true);
|
||||
parseObject.SetActive(false);
|
||||
}
|
||||
else if (activeScene.name.StartsWith("Stage"))
|
||||
{
|
||||
goldObject.SetActive(false);
|
||||
fishObject.SetActive(false);
|
||||
inventoryObject.SetActive(true);
|
||||
settingObject.SetActive(false);
|
||||
parseObject.SetActive(true);
|
||||
}
|
||||
else if (activeScene.name.Equals("Shop"))
|
||||
{
|
||||
goldObject.SetActive(true);
|
||||
fishObject.SetActive(true);
|
||||
inventoryObject.SetActive(false);
|
||||
settingObject.SetActive(false);
|
||||
parseObject.SetActive(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void OnClickOptionButton()
|
||||
{
|
||||
Scene activeScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene();
|
||||
|
||||
if (activeScene.name.Equals("Lobby"))
|
||||
{
|
||||
// TODO: 설정 더보기 UI 추가
|
||||
}
|
||||
else if (activeScene.name.StartsWith("Stage"))
|
||||
{
|
||||
UIManager.Show<PauseUI>(UIList.PauseUI);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user