Shamba

Trigger

Mar 2nd, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class animatedobjects : MonoBehaviour {
  6.  
  7.     public Animator anim;
  8.  
  9.     private void OnTriggerEnter(Collider other)
  10.     {
  11.         if(other.tag == "Player")
  12.         {
  13.             anim.SetBool("down", true);
  14.         }
  15.     }
  16. }
Add Comment
Please, Sign In to add comment