Practice_Unity/Assets/Scripts/Scenes/BaseScene.cs
Seonkyu.kim ba665c50ce 작업
1. 카메라 컨트롤러 작성
2. Data 매니저 작성
3. 몬스터 세팅 시작
4. Gemini 환경 설정 등록
2025-09-23 17:58:22 +09:00

48 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using Object = UnityEngine.Object; // InputSystem 사용을 위해 추가
public abstract class BaseScene : MonoBehaviour
{
public Define.Scene _sceneType { get; protected set; } = Define.Scene.Uknown;
private void Start()
{
Init();
}
protected virtual void Init()
{
Object obj = FindFirstObjectByType<EventSystem>();
if (obj == null)
Manager.Resource.Instantiate("Prefabs/UI/EventSystem").name = "@EventSystem";
Manager.Input.InputAction -= Check;
Manager.Input.InputAction += Check;
}
private void Check(Define.InputEvent evt)
{
switch (evt)
{
case Define.InputEvent.Click:
Debug.Log($"Clicked Position:"); //{Manager.Input.LastPointPosition}");
break;
default:
Manager.Input.PointAction -= DebugLog;
break;
}
}
public void DebugLog(Vector2 vec)
{
Debug.Log(vec);
}
public abstract void Clear();
}