Degullmok-client/Assets/KJM/ShopTest/MainPanelButtonController.cs
HaeinLEE eaaeaefd28 Revert "Merge branch 'main' of https://github.com/Degulleo/DegullMok-Client into DO-35-리플레이씬에서-기보-데이터로-돌-놓고-없애기"
This reverts commit a6846bb41deea026602bc2f4cf3da9ffbcbba94b, reversing
changes made to c8f59a7080b2b2896248c04952ae9383a54f0ddf.
2025-03-20 15:42:03 +09:00

43 lines
1.1 KiB
C#

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 = "광고"
};
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();
}
}