Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Checkpoint : MonoBehaviour
- {
- public BoxCollider2D trigger;
- private void OnTriggerEnter2D(Collider2D collision)
- {
- if (collision.CompareTag("Player"))
- {
- RespawnController.Instance.respawnPoint = transform;
- trigger.enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment