-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartMenu.cs
35 lines (31 loc) · 1.02 KB
/
startMenu.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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class startMenu : MonoBehaviour
{
public GameObject startMenuCanvas;
public bool showTutorial = false;
// Start is called before the first frame update
void Start()
{
GetComponent<moveWithController>().enabled = false;
}
// Update is called once per frame
void Update()
{
if (OVRInput.Get(OVRInput.Button.One, OVRInput.Controller.RTouch)
|| OVRInput.Get(OVRInput.Button.Two, OVRInput.Controller.RTouch)
|| OVRInput.Get(OVRInput.Button.One, OVRInput.Controller.LTouch)
|| OVRInput.Get(OVRInput.Button.Two, OVRInput.Controller.RTouch)
)
{
GetComponent<moveWithController>().enabled = true;
GetComponent<startMenu>().enabled = false;
startMenuCanvas.SetActive(false);
if (showTutorial)
{
StartCoroutine(GetComponent<tutorial>().PlayPage());
}
}
}
}