initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DoorController : MonoBehaviour
|
||||
{
|
||||
private Animator doorAnimator;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
doorAnimator = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
Debug.Log("Open the door");
|
||||
doorAnimator.SetTrigger("Door_Open");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user