18 lines
398 B
C#
18 lines
398 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TextAutoscroll : MonoBehaviour
|
|
{
|
|
[SerializeField] private Scrollbar _scrollbar;
|
|
|
|
public void Scroll(float time)
|
|
{
|
|
LeanTween.value(1, 0, time).setDelay(1).setOnUpdate((float x) =>
|
|
{
|
|
_scrollbar.value = x;
|
|
}).setEaseInOutCubic();
|
|
}
|
|
}
|