reconnect, 30% fixes from test feedback
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(TMP_Text))]
|
||||
public class LoadingTextTMP : MonoBehaviour
|
||||
{
|
||||
public string baseText = "Loading";
|
||||
public char dotChar = '.';
|
||||
public int dotCount =3;
|
||||
public float interval = 1f;
|
||||
TMP_Text txt;
|
||||
void Start()
|
||||
{
|
||||
txt = GetComponent<TMP_Text>();
|
||||
}
|
||||
|
||||
|
||||
float timer = 0;
|
||||
void Update(){
|
||||
timer += Time.deltaTime;
|
||||
if(timer > interval * dotCount){
|
||||
timer =0;
|
||||
}
|
||||
|
||||
int dots = (int)(timer / interval);
|
||||
|
||||
txt.text = baseText + new string(dotChar, dots);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 093b12f4aa5fb0446a9c1aa544025970
|
||||
Reference in New Issue
Block a user