Added basic features

This commit is contained in:
2025-05-08 09:24:43 +09:00
parent 4acffb32e4
commit bee969f7ef
131 changed files with 69136 additions and 109 deletions

View File

@@ -0,0 +1,28 @@
using UnityEngine;
public class EventManager : MonoBehaviour
{
[SerializeField]
private Player _player;
[SerializeField]
private Goal _goal;
[SerializeField]
private UIManager _uiManager;
private void Start()
{
_player.OnPlayerDead += OnPlayerDead;
_goal.OnGoalReached += OnGoalReached;
}
private void OnPlayerDead()
{
_uiManager.ShowGameOverPanel();
}
private void OnGoalReached()
{
_uiManager.ShowSuccessPanel();
}
}

View File

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

View File

@@ -0,0 +1,34 @@
using UnityEngine;
public class StartMenuManager : MonoBehaviour
{
[SerializeField]
private GameObject _menuPanelUI;
[SerializeField]
private GameObject _settingPanelUI;
private void Awake()
{
_menuPanelUI.SetActive(true);
_settingPanelUI.SetActive(false);
}
public void StartGame()
{
}
public void SetSettingPanelActive(bool value)
{
_settingPanelUI.SetActive(value);
_menuPanelUI.SetActive(!value);
}
public void Quit()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.ExitPlaymode();
#else
Application.Quit();
#endif
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 61048706ae5a77947a3a95bf45709ac1

View File

@@ -0,0 +1,32 @@
using UnityEngine;
public class UIManager : MonoBehaviour
{
[SerializeField]
private GameObject _menuPanelUI;
[SerializeField]
private GameObject _successPanel;
[SerializeField]
private GameObject _gameOverPanel;
private void InitUI()
{
_successPanel.SetActive(false);
_gameOverPanel.SetActive(false);
}
private void Awake()
{
InitUI();
}
public void ShowSuccessPanel()
{
_successPanel.SetActive(true);
}
public void ShowGameOverPanel()
{
_gameOverPanel.SetActive(true);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 508242b6a15bf0e4f9fd0c8ff93b7371