Files
BABA_YAGA/Assets/Scripts/Interactables/LampInteractable.cs

25 lines
635 B
C#
Raw Normal View History

2026-04-01 02:41:07 +07:00
using UnityEngine;
namespace OnlyScove.Scripts
{
public class LampInteractable : BaseInteractable
{
[SerializeField] private Light targetLight;
[SerializeField] private bool isOn = true;
private void Start()
{
if (targetLight != null)
targetLight.enabled = isOn;
}
protected override void PerformInteraction(PlayerStateMachine player)
{
isOn = !isOn;
if (targetLight != null)
targetLight.enabled = isOn;
Debug.Log($"[Lamp] Toggled {(isOn ? "ON" : "OFF")}");
}
}
}