init
This commit is contained in:
commit
bd5b1556ff
269 changed files with 6249829 additions and 0 deletions
35
Assets/Scripts/Menu.cs
Normal file
35
Assets/Scripts/Menu.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Cinemachine;
|
||||
|
||||
public class Menu : MonoBehaviour{
|
||||
|
||||
public CinemachineVirtualCamera cam;
|
||||
public GameObject canvas;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake(){
|
||||
Time.timeScale = 0;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
|
||||
}
|
||||
|
||||
public void Play(){
|
||||
Time.timeScale = 1;
|
||||
cam.gameObject.SetActive(false);
|
||||
StartCoroutine(DisableCanvas());
|
||||
}
|
||||
|
||||
public void Quit(){
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
IEnumerator DisableCanvas(){
|
||||
yield return new WaitForSeconds(1f);
|
||||
canvas.SetActive(false);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue