26 lines
661 B
C#
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");
|
|
}
|
|
}
|
|
}
|