comment pass

This commit is contained in:
2022-12-29 16:16:49 +01:00
parent 643e03192a
commit ff01a700bd
75 changed files with 634 additions and 65 deletions

View File

@@ -1,5 +1,6 @@
using System;
using EscapeRoomEngine.Engine.Runtime.Utilities;
using JetBrains.Annotations;
using NaughtyAttributes;
using UnityEngine;
using Logger = EscapeRoomEngine.Engine.Runtime.Utilities.Logger;
@@ -28,11 +29,20 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
public delegate void PuzzleEventHandler(PuzzleModule source, PuzzleEventType e);
/// <summary>
/// The <see cref="ModuleState"/> of a <see cref="PuzzleModule"/>. Handles all events that can occur for a door.
/// </summary>
[SelectionBase]
public class PuzzleState : ModuleState
{
/// <summary>
/// Add event handlers to this hook to receive all events concerning this puzzle.
/// </summary>
public event PuzzleEventHandler PuzzleEvent;
/// <summary>
/// The puzzle module this state belongs to.
/// </summary>
protected PuzzleModule Module { get; private set; }
public bool Solved
{
@@ -69,8 +79,11 @@ namespace EscapeRoomEngine.Engine.Runtime.Modules
#region Debug Buttons
[Button(enabledMode: EButtonEnableMode.Playmode)] public void Solve() => Solved = true;
[Button(enabledMode: EButtonEnableMode.Playmode)] public void Restart() => Solved = false;
[Button(enabledMode: EButtonEnableMode.Playmode)]
public void Solve() => Solved = true;
[UsedImplicitly]
[Button(enabledMode: EButtonEnableMode.Playmode)]
public void Restart() => Solved = false;
[Button("Trigger Wrong Input", EButtonEnableMode.Playmode)]
public void WrongInput()
{