// Use this for initialization void Start() { cooldown = .1f; childStarCount = 0; GetChildStar(); instantiator = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> (); GetComponent <Rigidbody2D>().AddTorque(540); deleteJewels = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> (); touchHandler = GameObject.Find("Level Controller").GetComponent <RockLevelTouchHandler> (); fiveInARow = GameObject.Find("Level Controller").GetComponent <RockLevelFiveInARow> (); powerPercentageController = GameObject.Find("Level Controller").GetComponent <PowerPercentageController> (); soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> (); bombHandler = GameObject.Find("Level Controller").GetComponent <RockLevelBombHandler> (); if (GameObject.Find("Mountain Level Two ID") != null) { tutorialLevel = true; } tutorialNumber = 0; jewelList = new List <GameObject> (); jewelPicked = false; // targetX = Random.Range (-2f, 2f); // targetY = 4.5f; targetX = transform.position.x; targetY = transform.position.y; childStarArray = new List <GameObject> (); }
// Use this for initialization void Start() { coinTotalManager = GameObject.Find("Coin Handler").GetComponent <CoinTotalManager> (); currentStates = GameObject.Find("Power Up Button(Clone)").GetComponent <PowerButtonCurrentStates> (); if (currentStates.GetPlusFivePowerPressed()) { float totalCircleAngle = Mathf.Rad2Deg * (2 * (Mathf.Atan(((transform.position.x) / (transform.position.x * .8930232558f))))); float incrementalCircleAngle = totalCircleAngle / 6; instantiatedPressedPlusFivePowerButton = (GameObject)Instantiate(pressedPlusFivePowerButton, new Vector3(transform.position.x, transform.position.y, transform.position.z - 1), Quaternion.identity); instantiatedPressedPlusFivePowerButton.transform.Rotate(new Vector3(0, 0, incrementalCircleAngle)); instantiatedPressedPlusFivePowerButton.transform.parent = transform; } incrementalAngle = GameObject.Find("Power Up Button(Clone)").GetComponent <PowerButtonHandler> ().GetIncrementalCircleAngle(); circleObject = GameObject.Find("Plus Five Circle"); touchOn = true; soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> (); touchHandler = GameObject.Find("Level Controller").GetComponent <RockLevelTouchHandler> (); powerPercentageController = GameObject.Find("Level Controller").GetComponent <PowerPercentageController> (); }
// Use this for initialization void Start() { instantiator = gameObject.GetComponent <RockLevelInstantiator> (); checkForMatches = gameObject.GetComponent <RockLevelCheckForMatches> (); touchHandler = gameObject.GetComponent <RockLevelTouchHandler> (); controller = gameObject.GetComponent <RockLevelController> (); deleteJewels = gameObject.GetComponent <RockLevelDeleteJewels> (); scoreKeeper = gameObject.GetComponent <LevelTwoScoreKeeper> (); movementChecker = gameObject.GetComponent <RockLevelMovementChecker> (); bombHandler = gameObject.GetComponent <RockLevelBombHandler> (); powerPercentageController = gameObject.GetComponent <PowerPercentageController> (); homingStarList = new List <GameObject> (); targetJewels = new HashSet <GameObject> (); audioSources = GameObject.Find("SoundHandler").GetComponents <AudioSource> (); tutorialCount = 0; tutorial2Count = 0; if (GameObject.Find("Mountain Level Two ID") != null) { tutorialLevel2 = true; } }