// Use this for initialization void Start() { instantiator = gameObject.GetComponent <RockLevelInstantiator> (); shuffle = gameObject.GetComponent <RockLevelShuffleGameBoard> (); bombHandler = gameObject.GetComponent <RockLevelBombHandler> (); noMatchesSlider = GameObject.Find("No Matches Banner").GetComponent <NoMatchesSlider> (); matchList = new HashSet <GameObject> (); if (GameObject.Find("Jewel Collector") != null) { jewelCollectorLevel = true; } }
// Use this for initialization void Start() { rockLevelController = gameObject.GetComponent <RockLevelController> (); instantiator = gameObject.GetComponent <RockLevelInstantiator> (); checkForMatches = rockLevelController.GetComponent <RockLevelCheckForMatches> (); instantiator = rockLevelController.GetComponent <RockLevelInstantiator> (); bombHandler = rockLevelController.GetComponent <RockLevelBombHandler> (); starShooter = gameObject.GetComponent <RockLevelStarShooter> (); // remainderController = levelThreeController.GetComponent<LevelThreeBombRemainderController> (); touchHandler = rockLevelController.GetComponent <RockLevelTouchHandler> (); fourInARow = gameObject.GetComponent <RockLevelFourInARow> (); fiveInARow = gameObject.GetComponent <RockLevelFiveInARow> (); corners = gameObject.GetComponent <RockLevelCorners> (); noMatchChecker = gameObject.GetComponent <RockLevelNoMatchChecker> (); shuffle = gameObject.GetComponent <RockLevelShuffleGameBoard> (); soundController = gameObject.GetComponent <SoundController> (); deleteJewels = gameObject.GetComponent <RockLevelDeleteJewels> (); if (GameObject.Find("Mountain Level One ID") != null) { tutorialLevel = true; } }
void Awake() { bounceForce = new Vector2(0, 300); cooldown = .01f; floatingJewelCooldown = 5; floatingJewelTimestamp = Time.time; moving = true; SetDestroyNumber(); rocksToBeDestroyed = new HashSet <GameObject> (); controller = GameObject.Find("Level Controller").GetComponent <RockLevelController> (); // movementChecker = GameObject.Find ("Level Three Controller").GetComponent<LevelThreeJewelsStoppedMoving> (); checkForMatch = controller.GetComponent <RockLevelCheckForMatches> (); touchHandler = controller.GetComponent <RockLevelTouchHandler> (); soundController = controller.GetComponent <SoundController> (); instantiator = controller.GetComponent <RockLevelInstantiator> (); deleteJewels = controller.GetComponent <RockLevelDeleteJewels> (); starShooter = controller.GetComponent <RockLevelStarShooter> (); bounceNumber = 0; firstBounce = true; gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerScript> (); shuffleGameboard = controller.GetComponent <RockLevelShuffleGameBoard> (); swapJewel = controller.GetComponent <RockLevelSwapJewel> (); }