/// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. void Start() { loadPuzzleGame = GameObject.Find("Puzzle Game Controller").GetComponent <LoadPuzzleGame>(); puzzleGameManager = GameObject.Find("Puzzle Game Controller").GetComponent <PuzzleGameManager>(); levelLocker = GetComponent <LevelLocker>(); selectPuzzleMenuAnimator = selectPuzzleMenuPanel.GetComponent <Animator>(); selectPuzzleLevelAnimator = selectPuzzleLevelPanel.GetComponent <Animator>(); }
void Awake() { puzzleGameManager = GetComponent <PuzzleGameManager>(); candyPuzzleSprites = Resources.LoadAll <Sprite> ("Sprites/Game Assets/Candy"); transportPuzzleSprites = Resources.LoadAll <Sprite> ("Sprites/Game Assets/Transport"); fruitPuzzleSprites = Resources.LoadAll <Sprite> ("Sprites/Game Assets/Fruits"); }
/// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. void Start() { settingsController = GameObject.Find("Puzzle Menu Controller").GetComponent <SettingsController>(); puzzleGameManager = GameObject.Find("Puzzle Game Controller").GetComponent <PuzzleGameManager>(); selectLevelScript = GameObject.Find("Puzzle Level Controller").GetComponent <SelectLevelScript>(); levelLocker = GameObject.Find("Puzzle Level Controller").GetComponent <LevelLocker>(); starsLocker = GameObject.Find("Puzzle Level Controller").GetComponent <StarsLocker>(); selectPuzzleMenuAnimator = selectPuzzleMenuPanel.GetComponent <Animator>(); selectPuzzleLevelAnimator = selectPuzzleLevelPanel.GetComponent <Animator>(); }
/// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. void Start() { puzzleGameManager = GetComponent <PuzzleGameManager>(); layoutPuzzleButtons = GetComponent <LayoutPuzzleButtons>(); levelLocker = GameObject.Find("Puzzle Level Controller").GetComponent <LevelLocker>(); puzzleLevelSelectAnimator = puzzleLevelSelectPanel.GetComponent <Animator>(); puzzleGamePanelAnimator1 = puzzleGamePanel1.GetComponent <Animator>(); puzzleGamePanelAnimator2 = puzzleGamePanel2.GetComponent <Animator>(); puzzleGamePanelAnimator3 = puzzleGamePanel3.GetComponent <Animator>(); puzzleGamePanelAnimator4 = puzzleGamePanel4.GetComponent <Animator>(); puzzleGamePanelAnimator5 = puzzleGamePanel5.GetComponent <Animator>(); }
void OnCollisionEnter(Collision collision) { Debug.Log(collision.gameObject.name); if (collision.gameObject.name == gameObject.name) { collision.gameObject.GetComponent <MeshRenderer>().enabled = true; gameObject.SetActive(false); PuzzleGameManager.puzzleCount++; if (PuzzleGameManager.puzzleCount == 9) { PuzzleGameManager.End(); } } }
// Use this for initialization void Start() { puzzleGameManager = GameObject.FindGameObjectWithTag(HashTag.QUIZ_ENTITY).GetComponent <PuzzleGameManager> (); }