45 lines
1.2 KiB
C#
45 lines
1.2 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 CustomerTableManager CustomerTableManager { get; private set; }
|
|
|
|
[SerializeField]
|
|
private Transform _customerTables;
|
|
|
|
protected override void OnAwake()
|
|
{
|
|
InitializeComponents();
|
|
}
|
|
|
|
[Button("컴포넌트 초기화")]
|
|
private void InitializeComponents()
|
|
{
|
|
CustomerTableManager = GetComponent<CustomerTableManager>();
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
} |