DO-37 [Fix] MainPanelButtonController 수정

This commit is contained in:
99jamin 2025-03-19 18:08:51 +09:00
commit 5ba44357e8
3 changed files with 60 additions and 8 deletions

View File

@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 메인 패널 메뉴 버튼
/// </summary>
public class MainPanelButtonController : MonoBehaviour
{
//상점 패널 생성
public void OnShopPanelClick()
{
List<ShopItem> shopItems = new List<ShopItem>(); //상점 데이터 리스트 생성
for (int i = 0; i < 5; i++)
{
if (i == 0) //광고 항목
{
ShopItem shopItem = new ShopItem
{
Name = "광고) 코인500개 ",
Price = 0
};
shopItems.Add(shopItem);
}
else
{
ShopItem shopItem = new ShopItem
{
Name = i*1000+"개 ",
Price = i * 1000
};
shopItems.Add(shopItem);
}
}
GameManager.Instance.panelManager.OpenShopPanel(shopItems);
}
public void OpenReplayPanelClick()
{
GameManager.Instance.panelManager.OpenReplayPanel();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 93bfed50167472f489a27f0518070ed5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -121,7 +121,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8890768496808647529}
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp
m_MethodName: OnRankingPanelClick
m_Mode: 1
@ -388,7 +388,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8890768496808647529}
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp
m_MethodName: OpenSettingsPanel
m_Mode: 1
@ -410,7 +410,7 @@ GameObject:
m_Component:
- component: {fileID: 2720476515686469179}
- component: {fileID: 7796730417217941349}
- component: {fileID: 8890768496808647529}
- component: {fileID: 5873276942444222861}
m_Layer: 5
m_Name: Buttons
m_TagString: Untagged
@ -468,7 +468,7 @@ MonoBehaviour:
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &8890768496808647529
--- !u!114 &5873276942444222861
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -477,7 +477,7 @@ MonoBehaviour:
m_GameObject: {fileID: 1637449823560643887}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03aef985a8b802a409630fdcab7be09b, type: 3}
m_Script: {fileID: 11500000, guid: 93bfed50167472f489a27f0518070ed5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2440131775796007731
@ -869,8 +869,8 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8890768496808647529}
m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp
- m_Target: {fileID: 5873276942444222861}
m_TargetAssemblyTypeName: MainPanelButtonController, Assembly-CSharp
m_MethodName: OnShopPanelClick
m_Mode: 1
m_Arguments:
@ -1307,7 +1307,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8890768496808647529}
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp
m_MethodName: OpenReplayPanel
m_Mode: 1