nejlepsi minihra, velmi dobre funguje, nepouzil jsem chatbota nai jednoud a vsechno jsem programoval pomoci libraries a moc me to bavilo, esing neni nejaky skvely ale funguje to na iphone, takze se to mozna rozbije pokud to zkusite runnout na androidu

This commit is contained in:
gravitrax-bublina
2026-03-28 10:18:32 +01:00
parent 9f71b6a84a
commit c11ca05ea8
112 changed files with 7180 additions and 98 deletions

View File

@@ -0,0 +1,30 @@
using UnityEngine;
public class PlayAudioOnCamera : MonoBehaviour
{
public AudioClip clip; // assign your audio file in the Inspector
private AudioSource audioSource;
void Start()
{
// Get or add an AudioSource to this GameObject
audioSource = gameObject.GetComponent<AudioSource>();
if (audioSource == null)
{
audioSource = gameObject.AddComponent<AudioSource>();
}
// Assign the audio clip
if (clip != null)
{
audioSource.clip = clip;
audioSource.playOnAwake = false;
audioSource.loop = false; // change to true if you want looping
audioSource.Play();
}
else
{
Debug.LogWarning("PlayAudioOnCamera: No audio clip assigned!");
}
}
}