Abdula_2314124

Untitled

Jul 20th, 2024
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Trigger : MonoBehaviour
  6. {
  7.     public MoveGrany Granny;
  8.     private void Start()
  9.     {
  10.         Granny.enabled = false;
  11.     }
  12.     private void OnTriggerEnter(Collider other)
  13.     {
  14.         Granny.enabled = true;
  15.     }
  16.     private void OnTriggerExit(Collider other)
  17.     {
  18.         Granny.enabled = false;
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment