public void DestroyQuixel() { if (quixelController != null) { Destroy(alienHolderAnimator.gameObject, 1); quixelController = null; alienHolderAnimator = null; } }
public void TrySpawnQuixel() { if (player.FtuePassed || player.MainPuzzleIndex == 5) { GameObject boardQuixel = Instantiate(quixel, canvasRoot.transform, false); alienHolderAnimator = boardQuixel.GetComponent <Animator>(); quixelController = boardQuixel.GetComponentInChildren <GameAlienController>(); quixelController.shouldShowCharacter = true; quixelController.ShowHideCharacter(true); } }