initial commit

This commit is contained in:
2026-06-04 00:55:54 +03:00
commit 89979b009f
1632 changed files with 880133 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using UnityEngine;
using UnityEngine.UI;
public class PlayerAmbientSound : MonoBehaviour
{
public AudioSource ambientSource; // åìᳺíò (ôîíîâà ìóçèêà)
public AudioSource cricketsSource; // ñâåð÷êè
public Slider volumeSlider;
void Start()
{
if (ambientSource != null)
{
ambientSource.loop = true;
ambientSource.Play();
}
if (cricketsSource != null)
{
cricketsSource.loop = true;
cricketsSource.Play();
}
if (volumeSlider != null)
{
volumeSlider.onValueChanged.AddListener(OnVolumeChange);
}
void OnVolumeChange(float value)
{
if (ambientSource != null)
ambientSource.volume = value;
if (cricketsSource != null)
cricketsSource.volume = value;
}
}
}