private void OnDisable() { if (activeTouchyBall) { activeTouchyBall.gameObject.SetActive(false); } if (activePuzzleIndex >= 0) { expPuzzles [activePuzzleIndex].Disable(); } foreach (PuzzleWall puzzleWall in extraPuzzleWallArray) { puzzleWall.gameObject.SetActive(false); } activePuzzle = null; cancelSelected = false; cancelButton.image.color = cancelButton.colors.normalColor; resImage.gameObject.SetActive(false); if (!GameManager.inPuzzleScene) { GameManager.HumanPlayer.userInput.enabled = true; if (selectedLab) { selectedLab.StartExperimentCoolDown(); } } }
private void InitiateExperiment() { puzzleActive = true; lastActivePuzzleIndex = activePuzzleIndex; activePuzzle = expPuzzles [activePuzzleIndex]; expPuzzles [activePuzzleIndex].Enable(); if (activePuzzle as PathPuzzle) { activeTouchyBall = touchyBalls[1]; } else { activeTouchyBall = touchyBalls[0]; } activeTouchyBall.SetActivePuzzle(); }
public virtual void SetActivePuzzle() { expPuzzle = ExperimentPanel.activePuzzle; }