Tanoda
TutorialCanvas.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
5using UnityEngine.UI;
6
7public class TutorialCanvas : 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
21 // Update is called once per frame
22 void Update()
23 {
24 if (SavedUser.instance.levelName != null)
25 {
26 text.text = "Tutorial kezdése";
27 }
28 }
29
30 public void start()
31 {
32 OnStart.Invoke();
33 }
34}
GameObject canvas
UnityEvent OnStart