16 lines
339 B
C#
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
|
|
}
|
|
}
|
|
}
|