HoloLens 2 Gait Training
The purpose of this project is to create gait training application.
Loading...
Searching...
No Matches
StartingMessage.cs
Go to the documentation of this file.
1using System.Collections;
2using UnityEngine;
3
7public class StartingMessage : MonoBehaviour
8{
9
10
12 [SerializeField] private GameObject m_Load;
13
15 [SerializeField] private GameObject m_StartMessage;
16
18 [SerializeField] private GameObject m_ThankMessage;
19
24 void Awake()
25 {
26 m_ThankMessage.SetActive(false);
27 m_StartMessage.SetActive(true);
28 StartCoroutine(ShowStartingMessage());
29 }
30
36 private IEnumerator ShowStartingMessage()
37 {
38 yield return new WaitForSeconds(4f);
39
40 m_StartMessage.SetActive(false);
41 m_ThankMessage.SetActive(true);
42
43 yield return new WaitForSeconds(3f);
44
45 Destroy(m_StartMessage);
46 Destroy(m_ThankMessage);
47 Destroy(m_Load);
48 }
49}
Display a message when starting the app and then destroy it.
IEnumerator ShowStartingMessage()
Show the starting message and thank you message. Then destroy the entire object because we no longer ...
GameObject m_Load
Reference to the panel.
void Awake()
Gets called when object is loaded Activate the start message coroutine
GameObject m_ThankMessage
Reference to the thenk you message.
GameObject m_StartMessage
Reference to the starting message.