2024-07-08 06:02:12 +00:00
|
|
|
using System;
|
2024-06-18 18:16:19 +00:00
|
|
|
using UnityEngine;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
2024-07-02 18:27:56 +00:00
|
|
|
namespace BlueWater.Tycoons
|
2024-06-18 18:16:19 +00:00
|
|
|
{
|
2024-07-08 06:02:12 +00:00
|
|
|
public enum BuildableObjectType
|
|
|
|
{
|
|
|
|
None = 0,
|
|
|
|
CustomerTable
|
|
|
|
}
|
|
|
|
|
2024-07-02 18:27:56 +00:00
|
|
|
public class TycoonManager : Singleton<TycoonManager>
|
2024-06-18 18:16:19 +00:00
|
|
|
{
|
|
|
|
[field: SerializeField]
|
|
|
|
public CustomerTableManager CustomerTableManager { get; private set; }
|
|
|
|
|
2024-07-08 06:02:12 +00:00
|
|
|
[SerializeField]
|
|
|
|
private Transform _customerTables;
|
|
|
|
|
2024-06-18 18:16:19 +00:00
|
|
|
protected override void OnAwake()
|
|
|
|
{
|
|
|
|
InitializeComponents();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Button("컴포넌트 초기화")]
|
|
|
|
private void InitializeComponents()
|
|
|
|
{
|
|
|
|
CustomerTableManager = GetComponent<CustomerTableManager>();
|
|
|
|
}
|
2024-07-08 06:02:12 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
2024-06-18 18:16:19 +00:00
|
|
|
}
|
|
|
|
}
|