timed button stand puzzle
This commit is contained in:
@@ -1,23 +1,30 @@
|
||||
using Station46.Modules.Holes.Scripts;
|
||||
using System;
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules.State;
|
||||
using Station46.Modules.Holes.Scripts;
|
||||
using Station46.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Station46.Modules.Hoop.Scripts
|
||||
{
|
||||
[RequireComponent(typeof(Animator))]
|
||||
public class ButtonHoop : Hole
|
||||
[RequireComponent(typeof(Animator), typeof(Hole))]
|
||||
public class ButtonHoop : ModuleState
|
||||
{
|
||||
private static readonly int PressedHash = Animator.StringToHash("Pressed");
|
||||
|
||||
|
||||
public Hole Button { get; private set; }
|
||||
|
||||
private Animator _animator;
|
||||
|
||||
protected override void Start()
|
||||
private void Awake()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
_animator = GetComponent<Animator>();
|
||||
Button = GetComponent<Hole>();
|
||||
}
|
||||
|
||||
ButtonEvent += (_, type) =>
|
||||
private void Start()
|
||||
{
|
||||
Button.ButtonEvent += (_, type) =>
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
|
||||
switch (type)
|
||||
@@ -31,5 +38,7 @@ namespace Station46.Modules.Hoop.Scripts
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public override void SetModule(Module module) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user