private void GetAllComponents() { PuzzleBoardController = GetComponentInChildren<PuzzleBoardController>() as PuzzleBoardController; if (PuzzleBoardController == null) { throw new UnityException("PuzzleGameController must have a PuzzleBoardController component as a child."); } PuzzlePresentationController = GetComponentInChildren<PuzzlePresentationController>() as PuzzlePresentationController; if (PuzzlePresentationController == null) { throw new UnityException("PuzzleGameController must have a PuzzlePresentationController component as a child."); } GemSwapper = GetComponentInChildren<GemSwapper>() as GemSwapper; if (GemSwapper == null) { throw new UnityException("PuzzleGameController must have a GemSwapper component as a child."); } }
private void GetAllComponents() { PuzzleBoardController = GetComponentInChildren <PuzzleBoardController>() as PuzzleBoardController; if (PuzzleBoardController == null) { throw new UnityException("PuzzleGameController must have a PuzzleBoardController component as a child."); } PuzzlePresentationController = GetComponentInChildren <PuzzlePresentationController>() as PuzzlePresentationController; if (PuzzlePresentationController == null) { throw new UnityException("PuzzleGameController must have a PuzzlePresentationController component as a child."); } GemSwapper = GetComponentInChildren <GemSwapper>() as GemSwapper; if (GemSwapper == null) { throw new UnityException("PuzzleGameController must have a GemSwapper component as a child."); } }