Tanoda
StartCanvas.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
UnityEngine
;
4
using
UnityEngine
.
Events
;
5
using
UnityEngine
.
UI
;
6
7
public
class
StartCanvas
: MonoBehaviour
8
{
9
public
UnityEvent
OnStart
;
10
public
Text
text
;
11
public
GameObject
canvas
;
12
// Start is called before the first frame update
13
void
Start()
14
{
15
if
(
SavedUser
.
instance
.isEditor)
16
{
17
canvas
.SetActive(
false
);
18
}
19
20
if
(
SavedUser
.
instance
.levelName !=
null
&&
text
)
21
{
22
if
(
LanguageSelector
.
Instance
!=
null
&&
LanguageSelector
.
Instance
.selectedLang == 0)
23
{
24
text
.text =
"Üdvözöljük! Ön a "
+
SavedUser
.
instance
.levelName +
" jelenetet választotta. Kezdéshez nyomja meg a Start gombot"
;
25
}
26
else
27
{
28
text
.text =
"Welcome! You have chosen the "
+
SavedUser
.
instance
.levelName +
" scene. To start, press the start button!"
;
29
}
30
31
}
32
}
33
public
void
start
()
34
{
35
OnStart
.Invoke();
36
}
37
}
GILES.pb_MonoBehaviourSingleton.instance
static T instance
Definition:
pb_MonoBehaviourSingleton.cs:28
LanguageSelector
Definition:
LanguageSelector.cs:6
LanguageSelector.Instance
static LanguageSelector Instance
Definition:
LanguageSelector.cs:7
SavedUser
Definition:
SavedUser.cs:14
StartCanvas
Definition:
StartCanvas.cs:8
StartCanvas.text
Text text
Definition:
StartCanvas.cs:10
StartCanvas.canvas
GameObject canvas
Definition:
StartCanvas.cs:11
StartCanvas.start
void start()
Definition:
StartCanvas.cs:33
StartCanvas.OnStart
UnityEvent OnStart
Definition:
StartCanvas.cs:9
UnityEngine.Events
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
StartCanvas.cs
Generated by
1.9.3