small fixes in portal clones and Terminal B

This commit is contained in:
2022-11-28 20:52:00 +01:00
parent 8a708e27b8
commit efe3cceba1
8 changed files with 131 additions and 40 deletions

View File

@@ -7,7 +7,6 @@ using UnityEngine;
namespace EscapeRoomEngine.Portal.Runtime
{
[RequireComponent(typeof(Collider))]
public class Portal : DoorState
{
public static readonly Matrix4x4 HalfRotation = Matrix4x4.Rotate(Quaternion.Euler(0, 180, 0));
@@ -31,9 +30,6 @@ namespace EscapeRoomEngine.Portal.Runtime
private void Awake()
{
// check whether the collider is set up correctly
if (!GetComponent<Collider>().isTrigger) throw new Exception("Collider must be a trigger.");
DoorEvent += (_, type) =>
{
if (type == DoorEventType.Connected)