스테이지 선택 영역 로직 적용
This commit is contained in:
@@ -10,6 +10,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 7857639710680952705}
|
- component: {fileID: 7857639710680952705}
|
||||||
- component: {fileID: 4225804751692156500}
|
- component: {fileID: 4225804751692156500}
|
||||||
|
- component: {fileID: 4961787770283683285}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Stage Slot
|
m_Name: Stage Slot
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -82,6 +83,19 @@ MonoBehaviour:
|
|||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
|
--- !u!114 &4961787770283683285
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 387253265420760142}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 6fbbb12042f0b9342a568f0b015f8892, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
index: 0
|
||||||
--- !u!1 &7072256940192523073
|
--- !u!1 &7072256940192523073
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c9138cc62a0b4a347a46191cfb0fd7ef, type: 3}
|
m_Script: {fileID: 11500000, guid: c9138cc62a0b4a347a46191cfb0fd7ef, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
playButton: {fileID: 163394969067314430}
|
||||||
--- !u!222 &3081003855718353481
|
--- !u!222 &3081003855718353481
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1163,7 +1164,7 @@ MonoBehaviour:
|
|||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 1117665430397923154}
|
- m_Target: {fileID: 1117665430397923154}
|
||||||
m_TargetAssemblyTypeName: TON.StageEntryUI, Assembly-CSharp
|
m_TargetAssemblyTypeName: TON.StageEntryUI, Assembly-CSharp
|
||||||
m_MethodName: OnClickBackButton
|
m_MethodName: OnClickPlayButton
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
@@ -1384,6 +1385,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Stage Slot
|
value: Stage Slot
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4961787770283683285, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
|
propertyPath: index
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7857639710680952705, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
- target: {fileID: 7857639710680952705, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
value: 0.5
|
value: 0.5
|
||||||
@@ -1486,6 +1491,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Stage Slot
|
value: Stage Slot
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4961787770283683285, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
|
propertyPath: index
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5185707800194162268, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
- target: {fileID: 5185707800194162268, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
propertyPath: m_text
|
propertyPath: m_text
|
||||||
value: Stage 2
|
value: Stage 2
|
||||||
@@ -1592,6 +1601,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Stage Slot
|
value: Stage Slot
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4961787770283683285, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
|
propertyPath: index
|
||||||
|
value: 3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5185707800194162268, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
- target: {fileID: 5185707800194162268, guid: 9c3db63c99bd0e9458638b79c344993e, type: 3}
|
||||||
propertyPath: m_text
|
propertyPath: m_text
|
||||||
value: Stage 3
|
value: Stage 3
|
||||||
|
|||||||
@@ -1,15 +1,43 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace TON
|
namespace TON
|
||||||
{
|
{
|
||||||
public class StageEntryUI : UIBase
|
public class StageEntryUI : UIBase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[SerializeField] private Button playButton; // Play 버튼 참조
|
||||||
|
|
||||||
|
private int currentSelectStage;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
playButton.interactable = false;
|
||||||
|
}
|
||||||
|
|
||||||
public void OnClickBackButton()
|
public void OnClickBackButton()
|
||||||
{
|
{
|
||||||
UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
||||||
UIManager.Hide<StageEntryUI>(UIList.StageEntryUI);
|
UIManager.Hide<StageEntryUI>(UIList.StageEntryUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnClickStageButton(int stage)
|
||||||
|
{
|
||||||
|
currentSelectStage = stage;
|
||||||
|
if (currentSelectStage != 0)
|
||||||
|
{
|
||||||
|
playButton.interactable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickPlayButton()
|
||||||
|
{
|
||||||
|
if (currentSelectStage == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Debug.Log("OnClickPlayButton::::" + currentSelectStage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace TON
|
||||||
|
{
|
||||||
|
public class StageEntryUI_SlotItem : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private int index;
|
||||||
|
private StageEntryUI stageEntryUI;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
// 상위 오브젝트에서 CharacterSelectUI 찾기
|
||||||
|
stageEntryUI = FindObjectOfType<StageEntryUI>();
|
||||||
|
|
||||||
|
// 버튼 클릭 이벤트 등록
|
||||||
|
GetComponent<Button>().onClick.AddListener(OnClickStage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickStage()
|
||||||
|
{
|
||||||
|
stageEntryUI.OnClickStageButton(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6fbbb12042f0b9342a568f0b015f8892
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user