Tanoda
StartCanvas.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
5using UnityEngine.UI;
6
7public 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}
static LanguageSelector Instance
GameObject canvas
Definition: StartCanvas.cs:11
void start()
Definition: StartCanvas.cs:33
UnityEvent OnStart
Definition: StartCanvas.cs:9