Commit 757bd459 authored by Fuchsi*'s avatar Fuchsi*

unlocking the true ending

parent 83cd5287
This diff is collapsed.
fileFormatVersion: 2
guid: adf4bba33e2644447b016784b62e8654
DefaultImporter:
guid: 6eb97f6eb49d3544fbafd5d2a9472f0e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TrueEnding : MonoBehaviour
{
public BoxCollider[] checkDisabled;
List<GameObject> children = new List<GameObject>();
private void Awake() {
for (int i = 0; i<transform.childCount; ++i) {
children.Add(transform.GetChild(i).gameObject);
transform.GetChild(i).gameObject.SetActive(false);
}
}
void Update() {
bool enable = true;
foreach (var obj in checkDisabled) {
if (obj.enabled) {
enable = false;
break;
}
}
if (enable) {
foreach (GameObject obj in children) {
obj.SetActive(true);
}
this.enabled = false;
}
}
}
fileFormatVersion: 2
guid: 105758ea38dca4e42baba16a00477206
folderAsset: yes
DefaultImporter:
guid: 9b42185ccf3eec242b44e83ee3cc66cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment