54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using Doozy.Runtime.UIManager.Containers;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace BlueWaterProject
|
|
{
|
|
public class UiManager : Singleton<UiManager>
|
|
{
|
|
[Title("Mouse")]
|
|
private Texture2D cursorTexture;
|
|
|
|
[Title("Ocean")]
|
|
public OceanUi OceanUi { get; set; }
|
|
|
|
[Title("Tycoon")]
|
|
public TycoonUi TycoonUi { get; set; }
|
|
|
|
[Title("Combat")]
|
|
public CombatUi CombatUi { get; set; }
|
|
|
|
public ItemInventoryUi CurrentItemInventoryUi { get; set; }
|
|
public DiscardPopupUi CurrentDiscardPopupUi { get; set; }
|
|
|
|
private void Start()
|
|
{
|
|
CursorTextureChange();
|
|
|
|
//RadarTargetInit();
|
|
|
|
if (SceneManager.GetActiveScene().name == "02.Ocean")
|
|
{
|
|
CurrentItemInventoryUi = OceanUi.OceanItemInventoryUi;
|
|
CurrentDiscardPopupUi = OceanUi.DiscardPopupUi;
|
|
}
|
|
else if (SceneManager.GetActiveScene().name == "02.Combat_2D")
|
|
{
|
|
CurrentItemInventoryUi = CombatUi.CombatItemInventoryUi;
|
|
CurrentDiscardPopupUi = CombatUi.DiscardPopupUi;
|
|
}
|
|
}
|
|
|
|
private void CursorTextureChange()
|
|
{
|
|
cursorTexture = DataManager.Inst.cursorTexture;
|
|
//var hotSpot = new Vector2(cursorTexture.width / 2f, cursorTexture.height / 2f);
|
|
var hotSpot = Vector2.zero;
|
|
Cursor.SetCursor(cursorTexture, hotSpot, CursorMode.Auto);
|
|
}
|
|
}
|
|
}
|