PJ/Assets/scripts/Functions.cs

28 lines
536 B
C#
Raw Permalink Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Functions : MonoBehaviour
{
private AudioSource m_AudioSource;
// Start is called before the first frame update
void Start()
{
m_AudioSource = GetComponent<AudioSource>();
}
public void PlaySoud()
{
if (m_AudioSource != null)
{
m_AudioSource.Play();
}
}
// Update is called once per frame
void Update()
{
}
}