19 lines
444 B
C#
Raw Normal View History

2024-02-19 21:00:36 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ScifiOfficeLite {
public class DemoDoor : MonoBehaviour {
Animator anim;
private void Start() {
anim = GetComponent<Animator>();
}
private void OnTriggerEnter(Collider other) {
if(other.gameObject.name == "Player") {
anim.SetTrigger("Open");
}
}
}
}