Isoulated/Assets/Scripts/Menu/BackButton.cs
Gerard Gascón 001bb14f16 init
2025-04-24 17:19:36 +02:00

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);
}
}
}