I hate portals. This is just here for refelection.
This commit is contained in:
Pasha Bibko
2025-04-07 09:47:36 +01:00
parent 5091d6789a
commit 0498d30771
17 changed files with 1589 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
public class RoomEnterance : MonoBehaviour
{
[Header("Triggers")]
[SerializeField] TriggerTracker m_TriggerA;
[SerializeField] TriggerTracker m_TriggerB;
bool m_PlayerIsLeaving = false;
public bool IsLeaving() => m_PlayerIsLeaving;
private void Update()
{
if (m_TriggerB.State() == true && m_TriggerA.State() == false)
{
m_PlayerIsLeaving = true;
}
else
{
m_PlayerIsLeaving = false;
}
}
}