Initial commit

This commit is contained in:
2026-05-11 20:48:41 +03:00
commit e35e9a07d5
229 changed files with 82642 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
using UnityEngine;
public class AudioManager : MonoBehaviour
{
[SerializeField] private AudioSource[] _grassBlockDestroySound;
private int _grassSoundIndex = 0;
public void PlayBlockDestroySound(BlockScript block)
{
switch (block.Type)
{
case BlockScript.BlockType.Grass:
case BlockScript.BlockType.PathFinish:
if (_grassBlockDestroySound == null)
return;
_grassBlockDestroySound[_grassSoundIndex].Play();
_grassSoundIndex = (_grassSoundIndex + 1) % _grassBlockDestroySound.Length;
break;
}
}
}