split into multiple assemblies
This commit is contained in:
33
Assets/Desert/Runtime/Puzzle A/Crystal.cs
Normal file
33
Assets/Desert/Runtime/Puzzle A/Crystal.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user