dronkowitz

TrickZone.cs

Feb 10th, 2021 (edited)
853
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class TrickZone : MonoBehaviour
  6. {
  7.     private void OnTriggerEnter(Collider other)
  8.     {
  9.         UltimatePlayerMovement player = other.GetComponent<UltimatePlayerMovement>();
  10.         if (player)
  11.         {
  12.             player.TrickZone = true;
  13.         }
  14.     }
  15.  
  16.     private void OnTriggerExit(Collider other)
  17.     {
  18.         UltimatePlayerMovement player = other.GetComponent<UltimatePlayerMovement>();
  19.         if (player)
  20.         {
  21.             player.TrickZone = false;
  22.         }
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment