giganciprogramowania

AreaScript l16

Jun 16th, 2023
189
0
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 AreaScript : MonoBehaviour
  6. {
  7.     public FleetScript fleet;
  8.  
  9.     private void OnTriggerEnter2D(Collider2D collision)
  10.     {
  11.         if (collision.gameObject.tag == "Alien" || collision.gameObject.tag == "AlienBullet")
  12.         {
  13.             fleet.StopGame(false);
  14.         }
  15.     }
  16. }
Add Comment
Please, Sign In to add comment