correctly delete old rooms

This commit is contained in:
2022-12-07 15:41:00 +01:00
parent 4f886fc0b1
commit d36d33ca96
23 changed files with 222 additions and 242 deletions

View File

@@ -3,6 +3,7 @@
"rootNamespace": "EscapeRoomEngine",
"references": [
"GUID:2d68e204354e44f2a2ecf3cfa9213c5f",
"GUID:ba4c7dba98ca4c31818cc46276b5dea1",
"GUID:776d03a35f1b52c4a9aed9f56d7b4229"
],
"includePlatforms": [],

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 788a501fd6ac4d74bc34a49c99b02fc2
timeCreated: 1670792890

View File

@@ -0,0 +1,34 @@
using EscapeRoomEngine.Engine.Runtime.Modules;
using UnityEngine;
namespace EscapeRoomEngine.Desert.Runtime.Portal
{
[RequireComponent(typeof(Emission))]
public class DesertPortal : EscapeRoomEngine.Portal.Runtime.Portal
{
private Emission _emission;
protected override void Awake()
{
base.Awake();
_emission = GetComponent<Emission>();
DoorEvent += (_, type) =>
{
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault ConvertSwitchStatementToSwitchExpression
switch (type)
{
case DoorEventType.Unlocked:
_emission.color = Engine.Runtime.Engine.DefaultEngine.theme.solvedColor.hdr;
break;
case DoorEventType.Locked:
_emission.color = Engine.Runtime.Engine.DefaultEngine.theme.puzzleColor.hdr;
break;
}
};
_emission.active = true;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 20837d5efd544d3eb07657f581cb76d2
timeCreated: 1670792901