36 lines
704 B
C#
36 lines
704 B
C#
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);
|
|
}
|
|
}
|