34 lines
961 B
C#
34 lines
961 B
C#
using EscapeRoomEngine.Engine.Runtime.Modules;
|
|
using NaughtyAttributes;
|
|
|
|
namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
|
{
|
|
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) {}
|
|
}
|
|
} |