H_SafeExperienceDrivingSystem/U3D_DrivingSystem/Assets/Script/Objective/AddMainScenes.cs

54 lines
1.2 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class AddMainScenes : MonoBehaviour
{
public float num = 0f;
public Text AddScence;
string str0 = "场 景 加 载 中";
string str1 = "场 景 加 载 中 。";
string str2 = "场 景 加 载 中 。。";
string str3 = "场 景 加 载 中 。。。";
int ScenceNum = 0;
void Start()
{
AddScence.text = str0;
InvokeRepeating("AddScences", 0.1f, 0.3f);
}
void Update()
{
}
public void AddScences()
{
switch (ScenceNum)
{
case 0:
AddScence.text = str0;
ScenceNum++;
break;
case 1:
AddScence.text = str1;
ScenceNum++;
break;
case 2:
AddScence.text = str2;
ScenceNum++;
break;
case 3:
AddScence.text = str3;
ScenceNum = 0;
break;
default:
break;
}
}
}