init
This commit is contained in:
commit
001bb14f16
951 changed files with 270074 additions and 0 deletions
21
Assets/Scripts/Menu/BackButton.cs
Normal file
21
Assets/Scripts/Menu/BackButton.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BackButton : MonoBehaviour{
|
||||
|
||||
public GameObject activate;
|
||||
public GameObject desactivate;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
if (Input.GetButtonDown("Cancel")){
|
||||
if (desactivate.activeSelf){
|
||||
AudioManager.instance.Play("Back");
|
||||
}
|
||||
activate.SetActive(true);
|
||||
desactivate.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue