Added new Scenes and gave em an order

This commit is contained in:
Dominik
2023-06-18 13:37:19 +02:00
parent 05ec330f08
commit 60928ee0ef
185 changed files with 192309 additions and 72 deletions

View File

@@ -5,23 +5,30 @@ using UnityEngine;
public class keyWhenPressed : MonoBehaviour
{
public GameObject objectToActivate;
public ButtonDOne ButtonDOne;
public ButtonDOne ButtonDTwo;
public ButtonDOne ButtonDThree;
public GameObject _LevelManager1;
private ButtonDOne script1;
public GameObject _LevelManager2;
private ButtonDTwo script2;
public GameObject _LevelManager3;
private ButtonDThree script3;
private bool isActivated;
public bool isActivated;
private void Awake()
{
// Disable the object by default
objectToActivate.SetActive(false);
}
private void Update()
{
bool eins = ButtonDOne.einsAn;
bool zwei = ButtonDTwo.zweiAn;
bool drei = ButtonDThree.dreiAn;
script1 = _LevelManager1.GetComponent<ButtonDOne>();
script2= _LevelManager2.GetComponent<ButtonDTwo>();
script3 = _LevelManager3.GetComponent<ButtonDThree>();
bool eins = script1.einsAn;
bool zwei = script2.zweiAn;
bool drei = script3.dreiAn;
// Check if all three conditions are true and the object is not yet activated
if (eins && zwei && drei && !isActivated)
{