using System.Collections; using System.Collections.Generic; using UnityEngine; namespace InfallibleCode { public class BedHideBehaviourInteraction : MonoBehaviour, IInteractable { public BedHideBehaviourBase bedHideBehaviourBase; public bool rightSide; public void Interact() { if (!HideManager.GetInstance().UnderBed/* && HideManager.GetInstance().CanPressKey*/) { if (HideManager.GetInstance().CanPressKey) { if (rightSide) { bedHideBehaviourBase.HideInRightSide(); } else { bedHideBehaviourBase.HideInLeftSide(); } HideManager.GetInstance().CanPressKey = false; } } else { if (HideManager.GetInstance().CanPressKey) { if (rightSide) { bedHideBehaviourBase.ComeOutRightSide(); } else { bedHideBehaviourBase.ComeOutLeftSide(); } HideManager.GetInstance().CanPressKey = false; } } } } }