2024-07-08 06:02:12 +00:00
|
|
|
using System;
|
2024-09-09 09:50:37 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
2024-07-16 16:05:53 +00:00
|
|
|
using BlueWater.Audios;
|
2024-06-18 18:16:19 +00:00
|
|
|
using UnityEngine;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
2024-09-12 04:17:34 +00:00
|
|
|
|
2024-07-02 18:27:56 +00:00
|
|
|
namespace BlueWater.Tycoons
|
2024-06-18 18:16:19 +00:00
|
|
|
{
|
2024-07-02 18:27:56 +00:00
|
|
|
public class TycoonManager : Singleton<TycoonManager>
|
2024-06-18 18:16:19 +00:00
|
|
|
{
|
2024-07-16 16:05:53 +00:00
|
|
|
[field: Title("컴포넌트")]
|
2024-06-18 18:16:19 +00:00
|
|
|
[field: SerializeField]
|
2024-07-08 20:06:22 +00:00
|
|
|
public CustomerTableController CustomerTableController { get; private set; }
|
|
|
|
|
|
|
|
[field: SerializeField]
|
|
|
|
public TycoonStageController TycoonStageController { get; private set; }
|
2024-06-18 18:16:19 +00:00
|
|
|
|
2024-07-08 06:02:12 +00:00
|
|
|
[SerializeField]
|
2024-07-16 16:05:53 +00:00
|
|
|
private string _dailyBgm;
|
2024-07-22 00:44:38 +00:00
|
|
|
|
2024-09-12 07:36:24 +00:00
|
|
|
[field: SerializeField, Required]
|
|
|
|
public LevelDataSo LevelDataSo { get; private set; }
|
2024-09-09 09:50:37 +00:00
|
|
|
|
2024-09-12 07:36:24 +00:00
|
|
|
[field: SerializeField, Required]
|
|
|
|
public CardDataSo CardDataSo { get; private set; }
|
2024-09-12 04:17:34 +00:00
|
|
|
|
2024-07-08 20:06:22 +00:00
|
|
|
public Action OnTycoonOpenedEvent;
|
|
|
|
public Action OnTycoonClosedEvent;
|
|
|
|
|
2024-09-12 04:17:34 +00:00
|
|
|
|
|
|
|
|
2024-06-18 18:16:19 +00:00
|
|
|
protected override void OnAwake()
|
|
|
|
{
|
|
|
|
InitializeComponents();
|
|
|
|
}
|
2024-07-16 16:05:53 +00:00
|
|
|
|
|
|
|
private void Start()
|
|
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(_dailyBgm))
|
|
|
|
{
|
|
|
|
AudioManager.Instance.PlayBgm(_dailyBgm);
|
|
|
|
}
|
|
|
|
}
|
2024-06-18 18:16:19 +00:00
|
|
|
|
|
|
|
[Button("컴포넌트 초기화")]
|
|
|
|
private void InitializeComponents()
|
|
|
|
{
|
2024-07-08 20:06:22 +00:00
|
|
|
CustomerTableController = GetComponent<CustomerTableController>();
|
|
|
|
TycoonStageController = GetComponent<TycoonStageController>();
|
2024-06-18 18:16:19 +00:00
|
|
|
}
|
2024-09-09 09:50:37 +00:00
|
|
|
|
2024-06-18 18:16:19 +00:00
|
|
|
}
|
|
|
|
}
|