sound stuff

This commit is contained in:
orsolya-st
2026-06-07 10:31:58 +02:00
parent 5f0f1d94d5
commit 043e0cb021
5 changed files with 131 additions and 1 deletions
+7
View File
@@ -15,6 +15,10 @@ public class LeafDissolve : MonoBehaviour
private float disolveTime;
private BoxCollider2D collider;
//audio stuff
public AudioSource speaker;
public AudioClip leafesound;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
@@ -58,6 +62,9 @@ public class LeafDissolve : MonoBehaviour
if (!isDissolving && standingTime >= maxStandingTime / 2)
{
isDissolving = true;
//audio
speaker.PlayOneShot(leafesound);
}
}