using UnityEngine; namespace KirbyAdventures { public class FallKillPlane : MonoBehaviour { public float KillY = -10f; Transform _player; CharacterController _cc; public void Bind(Transform player) { _player = player; _cc = player != null ? player.GetComponent() : null; } void Update() { if (_player == null) return; if (_player.position.y < KillY) CheckpointSystem.Respawn(_player, _cc); } } }