Example #1
0
	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.");
		}
	}
Example #2
0
 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.");
     }
 }