37 lines
794 B
C#
37 lines
794 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class GameLoadingAnime : MonoBehaviour
|
|
{
|
|
|
|
void Start()
|
|
{
|
|
StartCoroutine(AnimeText());
|
|
}
|
|
|
|
IEnumerator AnimeText()
|
|
{
|
|
Text txtPoints = transform.Find("Bolinhas").GetComponent<Text>();
|
|
int valuePoints = 1, mult = 1;
|
|
while (true)
|
|
{
|
|
string pontos = "";
|
|
for (int i = 0; i < valuePoints; i++)
|
|
{
|
|
pontos += ".";
|
|
}
|
|
|
|
txtPoints.text = pontos;
|
|
|
|
valuePoints += (1 * mult);
|
|
|
|
if (valuePoints >= 7) { mult = -1; }
|
|
if (valuePoints <= 0) { mult = 1; }
|
|
|
|
yield return new WaitForSecondsRealtime(.25f);
|
|
}
|
|
}
|
|
}
|