mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-04 01:49:07 +00:00
PAIN
I hate portals. This is just here for refelection.
This commit is contained in:
25
Assets/Scripts/RoomEnterance.cs
Normal file
25
Assets/Scripts/RoomEnterance.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user