feat: add Unity project (Assets, ProjectSettings)

This commit is contained in:
2026-05-15 09:13:39 +02:00
parent 19f5d70752
commit c322793b0d
253 changed files with 86009 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
using UnityEngine;
/// <summary>
/// Attach to each checkpoint GameObject (which must have a trigger Collider).
/// Set the checkpointIndex in the Inspector to match the checkpoint's position in the sequence.
/// </summary>
public class CheckpointTrigger : MonoBehaviour
{
[Tooltip("Index in the CheckpointSystem.checkpoints array (0-based)")]
public int checkpointIndex = 0;
void OnTriggerEnter(Collider other)
{
// Only trigger for the local player (has PlayerController)
if (other.GetComponent<PlayerController>() == null) return;
CheckpointSystem.Instance?.OnLocalPlayerHitCheckpoint(checkpointIndex);
}
}