void Update() { mesh = transform.GetChild(0).gameObject; if (!mesh) { return; } CollectionBin bin = FindObjectOfType <CollectionBin>(); if (!bin) { return; } mesh.SetActive(bin.keys == 3 && bin.present == 1 ? true : false); }
void Update() { if (!active) { return; } if (!bin) { bin = GetComponentInChildren <CollectionBin>(); } if (keysCreated < 3) { CreateKeys(3); } if (StopWatch.isRunning) { StopWatch.execute(); } }