fix session being stopped before puzzle measured
This commit is contained in:
@@ -54,14 +54,6 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
|
|||||||
protected virtual void Start()
|
protected virtual void Start()
|
||||||
{
|
{
|
||||||
OnPuzzleEvent(PuzzleEventType.Restarted);
|
OnPuzzleEvent(PuzzleEventType.Restarted);
|
||||||
|
|
||||||
PuzzleEvent += (_, type) =>
|
|
||||||
{
|
|
||||||
if (type == PuzzleEventType.Solved)
|
|
||||||
{
|
|
||||||
Measure.Solve((PuzzleModuleDescription)Module.description);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPuzzleEvent(PuzzleEventType type)
|
private void OnPuzzleEvent(PuzzleEventType type)
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ namespace EscapeRoomEngine.Engine.Runtime
|
|||||||
{
|
{
|
||||||
if (type == PuzzleEventType.Solved)
|
if (type == PuzzleEventType.Solved)
|
||||||
{
|
{
|
||||||
|
Measure.Solve((PuzzleModuleDescription)puzzle.description);
|
||||||
|
|
||||||
if (LastRoom)
|
if (LastRoom)
|
||||||
{
|
{
|
||||||
GameControl.Instance.StopGame();
|
GameControl.Instance.StopGame();
|
||||||
|
|||||||
Reference in New Issue
Block a user