24 lines
619 B
C#
24 lines
619 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Escape_Room_Engine.Portal
|
|
{
|
|
public class Portal : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// The portal that is connected with this one.
|
|
/// </summary>
|
|
public Portal other;
|
|
/// <summary>
|
|
/// The camera that will draw the view for this portal.
|
|
/// </summary>
|
|
public PortalCamera portalCamera;
|
|
|
|
private void Awake()
|
|
{
|
|
// check whether the other portal is set up
|
|
if (!other || other.other != this) throw new Exception("Other portal not set up correctly.");
|
|
}
|
|
}
|
|
}
|