-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathButtonManager.cs
36 lines (36 loc) · 966 Bytes
/
ButtonManager.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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.Video;
public class ButtonManager : MonoBehaviour
{
public GameObject sphere;
public VideoClip clip01;
public VideoClip clip02;
public GameObject button01;
public GameObject button02;
public GameObject button03;
public void toVideoScene()
{
SceneManager.LoadScene("360LondonPlay");
}
public void goToPark()
{
button01.SetActive(false);
button02.SetActive(true);
sphere.GetComponent<VideoPlayer>().clip = clip02;
}
public void goBacktoTower()
{
button01.SetActive(true);
button02.SetActive(false);
sphere.GetComponent<VideoPlayer>().clip = clip01;
Finish();
}
public void Finish()
{
button03.SetActive(true);
SceneManager.LoadScene("360Menu");
}
}