Global Game Jam 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
351 B

2 years ago
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Variables;
  5. public class KillPlayer : MonoBehaviour
  6. {
  7. [SerializeField]
  8. private Reference<bool> m_isDead;
  9. private void OnTriggerEnter2D(Collider2D collision)
  10. {
  11. if (collision.CompareTag("Player"))
  12. m_isDead.Value = true;
  13. }
  14. }