projectEli/Assets/Standard Assets/Asset Store Downloads/FirstPersion AIO Pack/DemoScene/MiscScripts/Doors.cs

14 lines
257 B
C#
Raw Normal View History

2022-10-08 02:26:09 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Doors : MonoBehaviour {
void OnTriggerEnter(Collider coll){
if(coll.tag=="Player"){
GetComponent<Animator>().Play("Door_open");
this.enabled=false;
}
}
}