OldBlueWater/BlueWater/Assets/02.Scripts/Ui/UiManager.cs

45 lines
1.1 KiB
C#
Raw Normal View History

using Sirenix.OdinInspector;
using UnityEngine;
2023-12-11 12:56:43 +00:00
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
public class UiManager : Singleton<UiManager>
{
2023-12-11 12:56:43 +00:00
[Title("Mouse")]
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; }
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");
}
protected override void OnAwake()
{
Init();
}
private void Start()
{
CursorTextureChange();
//RadarTargetInit();
}
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);
}
}
}