-
Notifications
You must be signed in to change notification settings - Fork 0
/
DelayTimer.cs
54 lines (46 loc) · 1.15 KB
/
DelayTimer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DelayTimer : MonoBehaviour
{
public GameObject text2;
public GameObject text3;
public GameObject text4;
public GameObject buttonFight;
// Start is called before the first frame update
void Start()
{
text2.SetActive(false);
text3.SetActive(false);
text4.SetActive(false);
buttonFight.SetActive(false);
}
// Update is called once per frame
void Update()
{
StartCoroutine(PlayText2());
StartCoroutine(PlayText3());
StartCoroutine(PlayText4());
StartCoroutine(PlayButton());
}
IEnumerator PlayText2()
{
yield return new WaitForSeconds(2.0f);
text2.SetActive(true);
}
IEnumerator PlayText3()
{
yield return new WaitForSeconds(4.0f);
text3.SetActive(true);
}
IEnumerator PlayText4()
{
yield return new WaitForSeconds(6.0f);
text4.SetActive(true);
}
IEnumerator PlayButton()
{
yield return new WaitForSeconds(8.0f);
buttonFight.SetActive(true);
}
}