Files
Barrack-Unity/Assets/Scripts/MainMenu/MenuKey.cs
T

36 lines
704 B
C#
Raw Normal View History

2026-07-29 03:16:16 -04:00
using UnityEngine;
public class MenuKey : MonoBehaviour
{
public AudioClip keyTurnOpen;
public AudioClip keyTurnClose;
private AudioSource audioSource;
private Animator animator;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
audioSource = GetComponent<AudioSource>();
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
}
public void playKeyTurnOpen(int _)
{
audioSource.PlayOneShot(keyTurnOpen);
}
public void playKeyTurnClose(int _)
{
audioSource.PlayOneShot(keyTurnClose);
}
}