1
0

initial commit

This commit is contained in:
LupiNexMedia
2026-04-28 09:32:03 +02:00
commit f84f5c592b
2173 changed files with 376140 additions and 0 deletions
@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlaySoundAtRandomIntervals : MonoBehaviour
{
public float minSeconds = 5f; // Minimum interval to wait before playing sound.
public float maxSeconds = 15f; // Maximum interval to wait before playing sound.
private AudioSource audioSource;
private void Start()
{
audioSource = GetComponent<AudioSource>();
StartCoroutine(PlaySound());
}
private IEnumerator PlaySound()
{
while (true)
{
float waitTime = Random.Range(minSeconds, maxSeconds);
yield return new WaitForSeconds(waitTime);
audioSource.Play();
}
}
}