small fixes
This commit is contained in:
39
Assets/Station46/Runtime/Puzzle A/Ball.cs
Normal file
39
Assets/Station46/Runtime/Puzzle A/Ball.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
using NaughtyAttributes;
|
||||
|
||||
namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
||||
{
|
||||
/// <summary>
|
||||
/// The main component for the symbol ball module.
|
||||
/// </summary>
|
||||
public class Ball : ModuleState
|
||||
{
|
||||
[BoxGroup("Internal")] [Required]
|
||||
public Emission statusLight;
|
||||
[BoxGroup("Internal")] [Required]
|
||||
public Ring ring;
|
||||
|
||||
public bool StatusLight
|
||||
{
|
||||
set => statusLight.active = value;
|
||||
}
|
||||
|
||||
public bool Active
|
||||
{
|
||||
set
|
||||
{
|
||||
statusLight.color = value ?
|
||||
Engine.Runtime.Engine.Theme.puzzleColor.hdr
|
||||
: Engine.Runtime.Engine.Theme.solvedColor.hdr;
|
||||
ring.rotating = value;
|
||||
if (!value)
|
||||
{
|
||||
ring.crystal.Active = false;
|
||||
ring.symbols.ForEach(symbol => symbol.Active = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetModule(Module module) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user