-
Notifications
You must be signed in to change notification settings - Fork 0
/
HowToPlayManager.cs
53 lines (48 loc) · 1.1 KB
/
HowToPlayManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using UnityEngine;
using UnityEngine.UI;
public class HowToPlayManager : MonoBehaviour
{
public GameObject slide1;
public GameObject slide2;
private int currentSlide = 1;
// Start is called before the first frame update
void Start()
{
slide1.SetActive(false);
slide2.SetActive(false);
}
public void OnHowToPlayButtonPressed()
{
if (currentSlide == 1)
{
slide1.SetActive(true);
slide2.SetActive(false);
}
else if (currentSlide == 2)
{
slide1.SetActive(false);
slide2.SetActive(true);
}
}
public void OnNextButtonPressed()
{
if (currentSlide == 1)
{
currentSlide = 2;
slide1.SetActive(false);
slide2.SetActive(true);
}
else
{
currentSlide = 1;
slide1.SetActive(true);
slide2.SetActive(false);
}
}
public void OnCloseButtonPressed()
{
slide1.SetActive(false);
slide2.SetActive(false);
currentSlide = 1;
}
}