Implement all levels.

This commit is contained in:
Emil Shanaty
2025-04-28 00:42:18 +03:00
parent bf8b7c5457
commit 2540fd9800
9 changed files with 549 additions and 119 deletions
+36
View File
@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
public class Circuit_puzzle : MonoBehaviour
{
public List<Circuit> battaries;
public LevelManager levelManager;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
bool allOn = true;
foreach (var battery in battaries)
{
if (!battery.isOn)
{
allOn = false;
break;
}
}
if (allOn)
{
levelManager.LevelFinishEvent();
}
}
}