Advertisement
Znimatorr

KillObject

May 27th, 2022
711
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class KillObject : MonoBehaviour
  6. {
  7.    
  8.     void Start()
  9.     {
  10.        
  11.     }
  12.    
  13.     private void OnTriggerEnter2D(Collider2D other) {
  14.         BirbController birb = other.gameObject.GetComponent<BirbController>();
  15.         if (birb != null)
  16.         {
  17.             birb.IsDead = true;
  18.         }
  19.     }
  20. }
  21.  
Advertisement
RAW Paste Data Copied
Advertisement