dronkowitz

TriggerActivator.cs

Jan 27th, 2021 (edited)
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Events;
  5. public class TriggerActivator : MonoBehaviour
  6. {
  7.     public UnityEvent triggerEvent;
  8.     private void OnTriggerEnter(Collider other)
  9.     {
  10.         if (!other.GetComponent<NewPlayerMovement>())
  11.         {
  12.             return;
  13.         }
  14.         triggerEvent.Invoke();
  15.  
  16.     }
  17. }
  18.  
Add Comment
Please, Sign In to add comment