57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class Ma2 : MonoBehaviour
|
|
{
|
|
public box[] _box;
|
|
public bool box;
|
|
public AudioSource _Audio;
|
|
public GameObject[] _Game;
|
|
|
|
public gas11 _Gas11;
|
|
public gas22 _Gas22;
|
|
public gas33 _Gas33;
|
|
public bool _gass;
|
|
|
|
public GameObject[] _Gam;
|
|
|
|
public mesh[] _Mess;
|
|
private void Update()
|
|
{
|
|
if (box == false&&_box[0]._bo&&_box[1]._bo&&_box[2]._bo&&_box[3]._bo&&_box[4]._bo
|
|
&&_box[5]._bo&&_box[6]._bo&&_box[7]._bo&&_box[8]._bo)
|
|
{
|
|
_Audio.Play();
|
|
_Game[0].SetActive(true);
|
|
_Game[1].SetActive(true);
|
|
_Game[2].SetActive(true);
|
|
box = true;
|
|
}
|
|
|
|
if (_gass==false&&_Gas11._bo&&_Gas22._bo&&_Gas33._bo)
|
|
{
|
|
_Gam[0].SetActive(true);
|
|
_Gam[1].SetActive(true);
|
|
_Gam[2].SetActive(true);
|
|
_Gam[3].SetActive(true);
|
|
_Gam[4].SetActive(true);
|
|
_Gam[5].SetActive(true);
|
|
_Gam[6].SetActive(true);
|
|
_Gam[7].SetActive(true);
|
|
_Gam[8].SetActive(true);
|
|
_gass = true;
|
|
}
|
|
|
|
if (_Mess[0]._b&&_Mess[1]._b&&_Mess[2]._b&&_Mess[3]._b
|
|
&&_Mess[4]._b&&_Mess[5]._b&&_Mess[6]._b)
|
|
{
|
|
SceneManager.LoadScene(3);
|
|
}
|
|
}
|
|
|
|
|
|
}
|