2023-09-11 01:55:36 +00:00
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
using UnityEngine;
|
2023-12-11 12:56:43 +00:00
|
|
|
|
2023-09-11 01:55:36 +00:00
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
namespace BlueWaterProject
|
|
|
|
{
|
|
|
|
public class UiManager : Singleton<UiManager>
|
|
|
|
{
|
2023-12-11 12:56:43 +00:00
|
|
|
[Title("Mouse")]
|
2023-09-11 01:55:36 +00:00
|
|
|
private Texture2D cursorTexture;
|
2023-09-19 16:58:52 +00:00
|
|
|
|
|
|
|
[Title("InteractionUI")]
|
|
|
|
private Transform defaultInteraction;
|
2023-10-24 02:29:50 +00:00
|
|
|
public Transform InShipInteraction { get; set; }
|
2023-12-13 07:14:31 +00:00
|
|
|
|
|
|
|
public OceanUi OceanUi { get; set; }
|
2023-09-11 01:55:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
private void Init()
|
|
|
|
{
|
2023-09-19 16:58:52 +00:00
|
|
|
defaultInteraction = transform.Find("DefaultInteraction");
|
2023-10-24 02:29:50 +00:00
|
|
|
InShipInteraction = transform.Find("InShipPlayerInteractionUI");
|
2023-09-11 01:55:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override void OnAwake()
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
{
|
|
|
|
CursorTextureChange();
|
2023-09-12 05:37:15 +00:00
|
|
|
|
|
|
|
//RadarTargetInit();
|
2023-09-11 01:55:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|