GotNoPockets / MayhemJamGameThingy / Assets / Scripts / DoorPuzzleScript.cs
DoorPuzzleScript.cs
Raw
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DoorPuzzleScript : MonoBehaviour
{
	public GameObject KeyHeld;
	public GameObject Key;
	public GameObject Door;


	private void Update()
	{
		if (KeyHeld == Key)
		{
			// Opens Door
			Door.GetComponent<Animator>().SetTrigger("OpenDoor");
		}
	}
}