33 lines
674 B
C#
33 lines
674 B
C#
using NaughtyAttributes;
|
|
using UnityEngine;
|
|
|
|
namespace EscapeRoomEngine.Desert.Runtime.Puzzle_A
|
|
{
|
|
[RequireComponent(typeof(Emission))]
|
|
public class Crystal : MonoBehaviour
|
|
{
|
|
[Required] public Light crystalLight;
|
|
|
|
public bool Active
|
|
{
|
|
get => _emission.active;
|
|
set
|
|
{
|
|
_emission.active = value;
|
|
crystalLight.enabled = value;
|
|
}
|
|
}
|
|
|
|
private Emission _emission;
|
|
|
|
private void Awake()
|
|
{
|
|
_emission = GetComponent<Emission>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
Active = false;
|
|
}
|
|
}
|
|
} |