OldBlueWater/BlueWater/Assets/02.Scripts/Tycoon/TycoonUi.cs

36 lines
865 B
C#
Raw Normal View History

2023-12-26 02:10:48 +00:00
using System;
using System.Collections;
using System.Collections.Generic;
using BlueWaterProject;
using Doozy.Runtime.UIManager.Containers;
using UnityEngine;
2024-05-07 17:32:50 +00:00
using UnityEngine.InputSystem;
2023-12-26 02:10:48 +00:00
public class TycoonUi : MonoBehaviour
{
2023-12-26 05:18:14 +00:00
public UIView BuildListPopup { get; set; }
2023-12-26 02:10:48 +00:00
2024-05-07 17:32:50 +00:00
public UIPopup PausePopup { get; set; }
private string pausePopup => "PausePopup";
2023-12-26 02:10:48 +00:00
private void Init()
{
UiManager.Inst.TycoonUi = this;
2023-12-26 05:18:14 +00:00
BuildListPopup = transform.Find("BuildListView").GetComponent<UIView>();
2024-05-07 17:32:50 +00:00
if (PausePopup == null) PausePopup = UIPopup.Get(pausePopup);
2023-12-26 02:10:48 +00:00
}
private void Awake()
{
Init();
}
2024-05-07 17:32:50 +00:00
private void OnEsc(InputValue value)
{
if (PausePopup == null) PausePopup = UIPopup.Get(pausePopup);
if (!PausePopup.isVisible) PausePopup.Show();
else PausePopup.Hide();
}
2023-12-26 02:10:48 +00:00
}