Files
HauntedBloodlines/Assets/Scripts/Lights/DoActionBreakAllLightsWithDelay.cs
2025-05-29 22:31:40 +03:00

26 lines
661 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoActionBreakAllLightsWithDelay : MonoBehaviour
{
BreakLightsWithDelay breakAllLightsWithDelay;
bool ActionPerformed;
private void Awake()
{
breakAllLightsWithDelay = GetComponent<BreakLightsWithDelay>();
}
// Update is called once per frame
void Update()
{
if (breakAllLightsWithDelay.AllLightsAreBroken() && !ActionPerformed)
{
GameManagerEarly.GetInstance().DoAction = true;
ActionPerformed = true;
print("Action Performed in BreakLightsWithDelay");
}
}
}