diff options
| author | dereelatwit <54997325+dereelatwit@users.noreply.github.com> | 2023-08-03 14:05:08 -0400 |
|---|---|---|
| committer | dereelatwit <54997325+dereelatwit@users.noreply.github.com> | 2023-08-03 14:05:08 -0400 |
| commit | b8aa2e0935f309b112648f0352f35f5f33da946b (patch) | |
| tree | 9121ae1a65e483dddba8367cbbdd4991abfb3e26 /Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs | |
| parent | 374125ba34e0366afb062578906877cfdf229bb9 (diff) | |
started implementing UI
Diffstat (limited to 'Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs')
| -rw-r--r-- | Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs b/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs new file mode 100644 index 0000000..9ed4b90 --- /dev/null +++ b/Pathfinding Visualizer/Assets/UI Elements/UI/Scripts/Scroller.cs @@ -0,0 +1,15 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class Scroller : MonoBehaviour +{ + [SerializeField] private RawImage _img; + [SerializeField] private float _x, _y; + + void Update() + { + _img.uvRect = new Rect(_img.uvRect.position + new Vector2(_x, _y) * Time.deltaTime, _img.uvRect.size); + } +}
\ No newline at end of file |
