private void Start() { _door = GetComponentInChildren <SlideDoor>(); _pieces = GetComponentsInChildren <IPuzzlePiece>(); foreach (IPuzzlePiece piece in _pieces) { piece.PuzzleMaster = this; } _door.isInteractable = _pieces.Length == 0; }
// Start is called before the first frame update void Start() { slideDoorScript = door.GetComponent <SlideDoor>(); }