21 lines
522 B
C#
21 lines
522 B
C#
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);
|
|
}
|
|
}
|
|
}
|