Scriptum/Assets/Scripts/REFACTORING/Story/WizardHouse/DoorBlocking.cs

27 lines
728 B
C#
Raw Normal View History

2023-01-10 23:55:41 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorBlocking : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
if (InventoryUIManager.Instance.FindItemInWarehouseByName("ScrollOfDarkness").Count > 0)
{
if (gameObject.GetComponent<DoorBehaviour>())
gameObject.GetComponent<DoorBehaviour>().isEnabled = false;
2023-01-14 10:58:04 +01:00
if (gameObject.GetComponent<AnimatedDoorBehaviour>())
2023-01-10 23:55:41 +01:00
gameObject.GetComponent<AnimatedDoorBehaviour>().isEnabled = false;
}
}
// Update is called once per frame
void Update()
{
}
}