Genesis Game Client Project Setup

This commit is contained in:
2026-03-13 12:43:28 +09:00
commit af885151b3
832 changed files with 630533 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
public class MenuButton : MonoBehaviour
{
public string Name;
public Image MenuImage;
public GameObject GlowEffect;
public UnityEvent ConfirmAction; //유니티가 제공해주는 event
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8a2487a13f17eba4bacda6db519183f1

View File

@@ -0,0 +1,44 @@
using System.Collections.Generic;
using UnityEngine;
public class MenuLogic
{
private List<MenuButton> buttons;
private int currentIndex = 0;
public MenuLogic(List<MenuButton> buttonList)
{
buttons = buttonList;
RefreshUI();
}
private void RefreshUI()
{
for (int i = 0; i < buttons.Count; i++)
{
// 현재 인덱스만 백그라운드 활성화!
buttons[i].GlowEffect.SetActive(i == currentIndex);
}
}
public void MenuMoveUp()
{
MenuMove(1);
}
public void MenuMoveDown()
{
MenuMove(-1);
}
public void MenuMove(int direction)
{
currentIndex = (currentIndex + direction + buttons.Count) % buttons.Count;
RefreshUI();
}
public void MenuConfirm()
{
buttons[currentIndex].ConfirmAction.Invoke();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1a9d2da91d67ef747a7767f987c7c105