number portals
This commit is contained in:
@@ -13,6 +13,8 @@ namespace EscapeRoomEngine.Portal.Runtime
|
||||
public class Portal : DoorState
|
||||
{
|
||||
public static readonly Matrix4x4 HalfRotation = Matrix4x4.Rotate(Quaternion.Euler(0, 180, 0));
|
||||
|
||||
private static int _portalCounter;
|
||||
|
||||
/// <summary>
|
||||
/// The portal that is connected with this one.
|
||||
@@ -31,10 +33,14 @@ namespace EscapeRoomEngine.Portal.Runtime
|
||||
/// Whether this portal is connected is determined by whether the reference to its linked portal is set.
|
||||
/// </summary>
|
||||
internal bool Connected => linkedPortal != null;
|
||||
[ShowNativeProperty] internal int PortalNumber { get; private set; }
|
||||
|
||||
internal readonly List<PortalDriver> closePortalDrivers = new();
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
PortalNumber = _portalCounter++;
|
||||
|
||||
DoorEvent += (_, type) =>
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
|
||||
|
||||
Reference in New Issue
Block a user