sfx
This commit is contained in:
16
Assets/soundScript.cs
Normal file
16
Assets/soundScript.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class soundScript : MonoBehaviour
|
||||
{
|
||||
public AudioSource sFx;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
sFx.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user