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,33 @@
using UnityEngine;
public class HoleGoalTrigger : MonoBehaviour
{
[Tooltip("Optional: assign the ball rigidbody or leave empty to accept any Rigidbody with tag Ball.")]
public Rigidbody ballRigidbody;
[Tooltip("If true, checks tag 'Ball' when ballRigidbody not assigned.")]
public bool requireBallTag = true;
public System.Action OnBallScored;
private void OnTriggerEnter(Collider other)
{
if (ballRigidbody != null)
{
if (other.attachedRigidbody == ballRigidbody)
{
OnBallScored?.Invoke();
}
return;
}
if (other.attachedRigidbody == null) return;
if (requireBallTag)
{
if (!other.CompareTag("Ball")) return;
}
OnBallScored?.Invoke();
}
}