35 lines
709 B
C#
35 lines
709 B
C#
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);
|
|
}
|
|
}
|