starOfWords/Assets/Scripts/3.5/SoundManager.cs
portakal ecb1c9edea Initial commit: Star of Words Unity project
Snapshot of the existing Unity 6 language-learning word game before any
refactoring. Adds Unity .gitignore and .gitattributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 15:31:20 +03:00

19 lines
No EOL
359 B
C#

using UnityEngine;
public class SoundManager : MonoBehaviour
{
public static SoundManager instance;
public AudioSource audioSource;
public AudioClip clickSound;
void Awake()
{
instance = this;
}
public void PlayClick()
{
if (audioSource && clickSound)
audioSource.PlayOneShot(clickSound);
}
}