| | 1 | | using DCL; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.UI; |
| | 4 | |
|
| | 5 | | public class CursorController : MonoBehaviour |
| | 6 | | { |
| 0 | 7 | | public static CursorController i { get; private set; } |
| | 8 | | public Image cursorImage; |
| | 9 | | public Sprite normalCursor; |
| | 10 | | public Sprite hoverCursor; |
| | 11 | |
|
| 248 | 12 | | void Awake() { i = this; } |
| | 13 | |
|
| | 14 | | public void SetNormalCursor() |
| | 15 | | { |
| 5 | 16 | | cursorImage.sprite = normalCursor; |
| 5 | 17 | | cursorImage.SetNativeSize(); |
| 5 | 18 | | } |
| | 19 | |
|
| | 20 | | public void SetHoverCursor() |
| | 21 | | { |
| 15 | 22 | | cursorImage.sprite = hoverCursor; |
| 15 | 23 | | cursorImage.SetNativeSize(); |
| 15 | 24 | | } |
| | 25 | | } |