Tanoda
VRPopupManager.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections;
3
using
System.Collections.Generic;
4
using
GILES
;
5
using
UnityEngine
;
6
using
UnityEngine
.
UI
;
7
8
public
class
VRPopupManager
:
pb_MonoBehaviourSingleton
<VRPopupManager>
9
{
10
[SerializeField]
private
GameObject popupWindow;
11
[SerializeField]
private
GameObject popupWindow2;
12
[SerializeField]
private
Text popupText;
13
[SerializeField]
private
Text popUpTitle;
14
[SerializeField]
private
Text popupTextCurrent;
15
[SerializeField]
private
Text popupTextPBest;
16
[SerializeField]
private
Text popupTextBest;
17
[SerializeField]
private
Text popupTextAvg;
18
[SerializeField]
private
Text popupTextAcc;
19
[SerializeField]
private
Text popupTextFoc;
20
[SerializeField]
private
Text popupTextOVT;
21
[SerializeField]
private
Text popupUser;
22
23
public
void
ShowPopup
()
24
{
25
popupWindow.SetActive(
true
);
26
popupWindow2.SetActive(
true
);
27
}
28
29
public
void
HideAfter
(
float
seconds)
30
{
31
StartCoroutine(
DelayAction
(
HidePopup
, seconds));
32
}
33
34
public
void
HidePopup
()
35
{
36
popupWindow.SetActive(
false
);
37
popupWindow2.SetActive(
false
);
38
}
39
#if DANA
40
public
void
SetText
(
string
title,
string
current,
string
acc,
string
foc ,
string
ovt)
41
{
42
popUpTitle.text = title;
43
popupTextCurrent.text = current;
44
popupTextAcc.text = acc;
45
popupTextFoc.text = foc;
46
popupTextOVT.text = ovt;
47
popupUser.text =
SavedUser
.
instance
.currentUser.Value.Username.ToUpper() +
"!"
;
48
}
49
#else
50
public
void
SetText
(
string
value)
51
{
52
popupText.text = value;
53
}
54
#endif
55
56
private
IEnumerator
DelayAction
(Action a,
float
t)
57
{
58
yield
return
new
WaitForSeconds(t);
59
a();
60
}
61
62
}
DelayAction
Definition:
DelayAction.cs:8
GILES.pb_MonoBehaviourSingleton
Definition:
pb_MonoBehaviourSingleton.cs:9
GILES.pb_MonoBehaviourSingleton.instance
static T instance
Definition:
pb_MonoBehaviourSingleton.cs:28
SavedUser
Definition:
SavedUser.cs:14
VRPopupManager
Definition:
VRPopupManager.cs:9
VRPopupManager.SetText
void SetText(string value)
Definition:
VRPopupManager.cs:50
VRPopupManager.ShowPopup
void ShowPopup()
Definition:
VRPopupManager.cs:23
VRPopupManager.HideAfter
void HideAfter(float seconds)
Definition:
VRPopupManager.cs:29
VRPopupManager.HidePopup
void HidePopup()
Definition:
VRPopupManager.cs:34
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
VRPopupManager.cs
Generated by
1.9.3