Bug Fix in Text Animation Script
This commit is contained in:
parent
68d2750ff1
commit
79eaa64ccf
@ -6,25 +6,26 @@ using UnityEngine.UI;
|
||||
|
||||
public class FetchingScoresAnimation : MonoBehaviour
|
||||
{
|
||||
private Text textComponent;
|
||||
|
||||
void Update()
|
||||
void Start()
|
||||
{
|
||||
textComponent = GetComponent<Text>();
|
||||
AnimateText();
|
||||
}
|
||||
|
||||
private async void AnimateText()
|
||||
{
|
||||
Text text = GetComponent<Text>();
|
||||
while (true)
|
||||
{
|
||||
await Task.Run(async () => {
|
||||
text.text = "Fetching Scores.";
|
||||
await Task.Delay(1000);
|
||||
text.text = "Fetching Scores..";
|
||||
await Task.Delay(1000);
|
||||
text.text = "Fetching Scores...";
|
||||
await Task.Delay(1000);
|
||||
});
|
||||
textComponent.text = "Fetching Scores";
|
||||
await Task.Delay(1000);
|
||||
textComponent.text = "Fetching Scores.";
|
||||
await Task.Delay(1000);
|
||||
textComponent.text = "Fetching Scores..";
|
||||
await Task.Delay(1000);
|
||||
textComponent.text = "Fetching Scores...";
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user