Cat Flynn 85fe992fa1 use events to link plate and door
also removed unnecessary prefabs and moved animations to animation
folder
2021-04-15 15:11:02 +01:00

21 lines
415 B
C#

using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
public class Door : MonoBehaviour
{
[SerializeField] private Animator _animator;
private bool _opened;
public void Open()
{
if (_opened) return;
// move door
_animator.Play("DoorUp", 0, 0);
_opened = true;
}
}