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:
38
Assets/Scripts/RoomController.cs
Normal file
38
Assets/Scripts/RoomController.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable] public struct RoomEnteranceInfo
|
||||
{
|
||||
[SerializeField] GameObject m_ExitRoom;
|
||||
[SerializeField] RoomEnterance m_RoomExit;
|
||||
[SerializeField] uint m_ExitID;
|
||||
|
||||
public uint ID => m_ExitID;
|
||||
public bool PlayerIsLeaving() => m_RoomExit.IsLeaving();
|
||||
}
|
||||
|
||||
public class RoomController : MonoBehaviour
|
||||
{
|
||||
[Header("")]
|
||||
[SerializeField] RoomEnteranceInfo[] m_Enterances;
|
||||
|
||||
bool m_IsMainRoom = false;
|
||||
|
||||
public void SetAsMainRoom()
|
||||
{
|
||||
m_IsMainRoom = true;
|
||||
|
||||
// Spawn all the rooms
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
foreach (RoomEnteranceInfo info in m_Enterances)
|
||||
{
|
||||
if (info.PlayerIsLeaving())
|
||||
{
|
||||
Debug.Log("KDJHSKGJDFHSKGJhk");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user