// Use this for initialization void Start() { instantiator = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> (); deleteJewels = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> (); moveJewelsDown = GameObject.Find("Level Controller").GetComponent <RockLevelMoveJewelsDown> (); corners = GameObject.Find("Level Controller").GetComponent <RockLevelCorners> (); touchHandler = GameObject.Find("Level Controller").GetComponent <RockLevelTouchHandler> (); levelOneController = GameObject.Find("Level Controller").GetComponent <RockLevelController> (); soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> (); if (horizontalPositive) { oppositeX = transform.position.x - 1; oppositeY = transform.position.y; } else if (horizontalNegative) { oppositeX = transform.position.x + 1; oppositeY = transform.position.y; } else if (verticalPositive) { oppositeY = transform.position.y - 1; oppositeX = transform.position.x; } else if (verticalNegative) { oppositeY = transform.position.y + 1; oppositeX = transform.position.x; } jewelDeletedCounter = 0; arrayCount = 0; soundNumber = 0; GetComponent <Rigidbody2D>().AddTorque(540); deleteList = new HashSet <GameObject> (); timeForDelete = true; cooldown = .5f; }
// Use this for initialization void Start() { deleteAgain = false; fourInARow = false; explosionsOn = true; bombNumber = 8; deleteCount = 0; zPosition = -30; deleteListCopy = new HashSet <GameObject> (); boulderDeleteList = new HashSet <GameObject> (); floatingJewelList = new HashSet <GameObject> (); moveJewelsDown = gameObject.GetComponent <RockLevelMoveJewelsDown> (); instantiator = gameObject.GetComponent <RockLevelInstantiator> (); controller = gameObject.GetComponent <RockLevelController> (); touchHandler = gameObject.GetComponent <RockLevelTouchHandler> (); // tutorialTouchHandler = gameObject.GetComponent<LevelTwoTutorialTouchHandler> (); checkForMatches = gameObject.GetComponent <RockLevelCheckForMatches> (); bombHandler = gameObject.GetComponent <RockLevelBombHandler> (); matchAssistant = gameObject.GetComponent <RockLevelMatchAssistant> (); fourInARowScript = gameObject.GetComponent <RockLevelFourInARow> (); // corners = GameObject.Find ("Level One Controller").GetComponent<LevelOneCorners> (); scoreKeeper = gameObject.GetComponent <RockLevelScoreKeeper> (); movementChecker = gameObject.GetComponent <RockLevelMovementChecker> (); noMatchChecker = gameObject.GetComponent <RockLevelNoMatchChecker> (); starShooter = gameObject.GetComponent <RockLevelStarShooter> (); if (GameObject.Find("Jewel Collector") != null) { endOfLevelJewelSprayer = GameObject.Find("Jewel Collector").GetComponent <EndOfLevelCollectionJewelShooter> (); } soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> (); boulderHolder = new List <PositionHolder> (); targetStaticBlueJewel = GameObject.Find("Static Jewel Four"); targetStaticGreenJewel = GameObject.Find("Static Jewel Three"); targetStaticOrangeJewel = GameObject.Find("Static Jewel Six"); targetStaticPurpleJewel = GameObject.Find("Static Jewel Five"); targetStaticRedJewel = GameObject.Find("Static Jewel Two"); targetStaticWhiteJewel = GameObject.Find("Static Jewel One"); // if (GameObject.Find ("Time Bomb ID") != null) // decreaseBombs = GameObject.Find ("Time Bomb ID").GetComponent<DecreaseBombs> (); timeStamp = Time.time; assistanceTimeStamp = Time.time; testTimeStamp = Time.time; swapMadeTimestamp = Time.time; swapMadeCoodown = .1f; // okayToMoveTimeStamp = Time.time; // okayToMoveCooldown = .1f; assistanceCooldown = 7f; powerTrackerTimestamp = Time.time; powerTrackerCooldown = 5; cooldown = 1.5f; shadeCount = 0; noMatchCount = 0; deletedPositions = new List <PositionHolder> (); if (GameObject.Find("Mountain Level One ID") != null) { tutorialLevel1 = true; } else if (GameObject.Find("Mountain Level Two ID") != null) { tutorialLevel2 = true; } else if (GameObject.Find("Mountain Level Three ID") != null) { tutorialLevel3 = true; } else if (GameObject.Find("Cabin Level Two ID") != null) { tutorialLevel4 = true; } startingLeftJewelPosition = -2.415f; horizontalMultiplier = .6125f; }