CapersProject/Assets/02.Scripts/Tycoon/TycoonManager.cs
Nam Tae Gun 04fbc8c7d4 #7 상호작용 가구 추가 중
+ FireWood, Pot, PowerSwitch 가구 추가
+ GameTimeData 추가
2024-07-09 05:06:22 +09:00

53 lines
1.6 KiB
C#

using System;
using UnityEngine;
using Sirenix.OdinInspector;
namespace BlueWater.Tycoons
{
public enum BuildableObjectType
{
None = 0,
CustomerTable
}
public class TycoonManager : Singleton<TycoonManager>
{
[field: SerializeField]
public CustomerTableController CustomerTableController { get; private set; }
[field: SerializeField]
public TycoonStageController TycoonStageController { get; private set; }
[SerializeField]
private Transform _customerTables;
// TODO : 타이쿤 오픈 연출 추가, 게임시간 흐름, 타이쿤 시작하면 상호작용 금지해야하는 것들
public Action OnTycoonOpenedEvent;
public Action OnTycoonClosedEvent;
protected override void OnAwake()
{
InitializeComponents();
}
[Button("컴포넌트 초기화")]
private void InitializeComponents()
{
CustomerTableController = GetComponent<CustomerTableController>();
TycoonStageController = GetComponent<TycoonStageController>();
}
public Transform GetParent(BuildableObjectType buildableObjectType)
{
switch (buildableObjectType)
{
case BuildableObjectType.None:
return null;
case BuildableObjectType.CustomerTable:
return _customerTables;
default:
throw new ArgumentOutOfRangeException(nameof(buildableObjectType), buildableObjectType, null);
}
}
}
}