44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using System;
|
|
using BlueWater.Audios;
|
|
using UnityEngine;
|
|
using Sirenix.OdinInspector;
|
|
|
|
namespace BlueWater.Tycoons
|
|
{
|
|
public class TycoonManager : Singleton<TycoonManager>
|
|
{
|
|
[field: Title("컴포넌트")]
|
|
[field: SerializeField]
|
|
public CustomerTableController CustomerTableController { get; private set; }
|
|
|
|
[field: SerializeField]
|
|
public TycoonStageController TycoonStageController { get; private set; }
|
|
|
|
[SerializeField]
|
|
private string _dailyBgm;
|
|
|
|
// TODO : 타이쿤 오픈 연출 추가, 게임시간 흐름, 타이쿤 시작하면 상호작용 금지해야하는 것들
|
|
public Action OnTycoonOpenedEvent;
|
|
public Action OnTycoonClosedEvent;
|
|
|
|
protected override void OnAwake()
|
|
{
|
|
InitializeComponents();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
if (!string.IsNullOrEmpty(_dailyBgm))
|
|
{
|
|
AudioManager.Instance.PlayBgm(_dailyBgm);
|
|
}
|
|
}
|
|
|
|
[Button("컴포넌트 초기화")]
|
|
private void InitializeComponents()
|
|
{
|
|
CustomerTableController = GetComponent<CustomerTableController>();
|
|
TycoonStageController = GetComponent<TycoonStageController>();
|
|
}
|
|
}
|
|
} |