45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace BlueWaterProject
|
|
{
|
|
public class UiManager : Singleton<UiManager>
|
|
{
|
|
[Title("Mouse")]
|
|
private Texture2D cursorTexture;
|
|
|
|
[Title("InteractionUI")]
|
|
private Transform defaultInteraction;
|
|
public Transform InShipInteraction { get; set; }
|
|
|
|
|
|
private void Init()
|
|
{
|
|
defaultInteraction = transform.Find("DefaultInteraction");
|
|
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);
|
|
}
|
|
}
|
|
}
|