PuzzleMeasurement, add Realm, door ExitedFrom event

This commit is contained in:
2022-12-05 18:11:00 +01:00
parent 5449283e5d
commit b776e6744e
34 changed files with 344 additions and 63 deletions

View File

@@ -1,4 +1,5 @@
using System;
using EscapeRoomEngine.Engine.Runtime.Measurements;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using NaughtyAttributes;
using UnityEngine;
@@ -53,6 +54,14 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
protected virtual void Start()
{
OnPuzzleEvent(PuzzleEventType.Restarted);
PuzzleEvent += (_, type) =>
{
if (type == PuzzleEventType.Solved)
{
Measure.Solve((PuzzleModuleDescription)Module.description);
}
};
}
private void OnPuzzleEvent(PuzzleEventType type)