2023-06-22 16:08:30 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
2023-06-24 13:58:21 +02:00
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
2023-06-22 16:08:30 +02:00
|
|
|
|
|
|
|
public class Amboss : MonoBehaviour
|
|
|
|
{
|
|
|
|
private GameObject anvil;
|
|
|
|
public bool one;
|
|
|
|
public bool two;
|
|
|
|
public bool three;
|
|
|
|
public bool four;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
anvil = GameObject.Find("ambos");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void FixedUpdate()
|
|
|
|
{
|
|
|
|
|
|
|
|
if(one&&two&&three&&four)
|
|
|
|
{
|
|
|
|
anvil.GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.None;
|
2023-06-24 13:58:21 +02:00
|
|
|
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex+1);
|
|
|
|
|
2023-06-22 16:08:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|