Files
Gnome-s-Bounty/Assets/Scripts/DoorController.cs
T
2023-06-22 10:42:56 +03:00

16 lines
339 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorController : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.tag == "Player")
{
//if player have key, door will open
//else player can't pass
}
}
}