void Awake()
 {
     instantiator = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     deleteJewels = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     startingLeftJewelPosition = -2.45f;
     horizontalMultiplier      = .6125f;
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     soundHandler          = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     jewel1                = null;
     jewel2                = null;
     startSwap             = false;
     swapJewelsBack        = false;
     instantiator          = gameObject.GetComponent <RockLevelInstantiator> ();
     checkForMatches       = gameObject.GetComponent <RockLevelCheckForMatches> ();
     bombHandler           = gameObject.GetComponent <RockLevelBombHandler> ();
     stoppedMoving         = gameObject.GetComponent <RockLevelMovementChecker> ();
     deleteJewels          = gameObject.GetComponent <RockLevelDeleteJewels> ();
     touchHandler          = gameObject.GetComponent <RockLevelTouchHandler> ();
     timeBombLevel         = (GameObject.Find("Time Bomb Identification") != null);
     translationMultiplier = .35f;
     distanceToTarget      = .01f;
     firstSwapPerformed    = false;
     if (GameObject.Find("Mountain Level Two ID") != null)
     {
         tutorialLevel2 = true;
     }
     if (GameObject.Find("Jewel Collection Level ID") != null)
     {
         jewelCollectorLevel = true;
         moveNumberHandler   = GameObject.Find("Jewel Collector").GetComponent <MoveNumberHandler> ();
     }
 }
 // Use this for initialization
 void Start()
 {
     GetComponent <Rigidbody2D>().AddTorque(-540);
     deleteList     = new HashSet <GameObject> ();
     deleteJewels   = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     instantiator   = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     fourInARow     = GameObject.Find("Level Controller").GetComponent <RockLevelFourInARow> ();
     scoreKeeper    = GameObject.Find("Level Controller").GetComponent <RockLevelScoreKeeper> ();
     jewelToDestroy = instantiator.GetJewelGridGameObject(targetJewelRow, targetJewelCol);
     controller     = GameObject.Find("Level Controller").GetComponent <RockLevelController> ();
     audioSources   = GameObject.Find("SoundHandler").GetComponents <AudioSource>();
     soundHandler   = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     swapJewel      = GameObject.Find("Level Controller").GetComponent <RockLevelSwapJewel> ();
     if (tag != "End Star")
     {
         instantiatedCrosshairs = (GameObject)Instantiate(crosshairs, new Vector3(-2.45f + (targetJewelCol * .6125f), 2.591252f - (targetJewelRow * .6097268f), -90), Quaternion.identity);
         targetPosition         = instantiatedCrosshairs.transform.position;
     }
     else
     {
         targetPosition = new Vector3(-2.45f + (targetJewelCol * .6125f), 2.591252f - (targetJewelRow * .6097268f), -90);
     }
     timeStamp = Time.time;
     cooldown1 = .25f;
     cooldown2 = .15f;
     if (transform.position.y > -.5)
     {
         oppositeY = Random.Range(4f, 4.5f);
     }
     else
     {
         oppositeY = Random.Range(-4f, -4.65f);
     }
     oppositeX = Random.Range(-2.5f, 2.5f);
 }
 // 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()
 {
     instantiator    = gameObject.GetComponent <RockLevelInstantiator> ();
     deleteJewels    = gameObject.GetComponent <RockLevelDeleteJewels> ();
     controller      = gameObject.GetComponent <RockLevelController> ();
     swapJewel       = gameObject.GetComponent <RockLevelSwapJewel> ();
     checkForMatches = gameObject.GetComponent <RockLevelCheckForMatches> ();
 }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     scoreKeeper          = gameObject.GetComponent <LevelTwoScoreKeeper> ();
     instantiator         = gameObject.GetComponent <RockLevelInstantiator> ();
     touchHandler         = gameObject.GetComponent <RockLevelTouchHandler> ();
     deleteJewels         = gameObject.GetComponent <RockLevelDeleteJewels> ();
     cornerJewelDestroyed = false;
     cornerStarList       = new List <GameObject> ();
 }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     instantiator = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     deleteJewels = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     fiveInARow   = GameObject.Find("Level Controller").GetComponent <RockLevelFiveInARow> ();
     swapJewel    = GameObject.Find("Level Controller").GetComponent <RockLevelSwapJewel> ();
     deleteList   = new HashSet <GameObject> ();
     GetComponent <Rigidbody2D>().AddTorque(540);
 }
 // Use this for initialization
 void Start()
 {
     touchHandler          = gameObject.GetComponent <RockLevelTouchHandler> ();
     levelThreeController  = gameObject.GetComponent <RockLevelController> ();
     stoppedMoving         = gameObject.GetComponent <RockLevelMovementChecker> ();
     scoreKeeper           = gameObject.GetComponent <LevelTwoScoreKeeper> ();
     deleteJewels          = gameObject.GetComponent <RockLevelDeleteJewels> ();
     soundHandler          = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     motherStarList        = new List <GameObject> ();
     childStarList         = new List <GameObject> ();
     tutorialChildStarList = new List <GameObject> ();
 }
 // Use this for initialization
 void Start()
 {
     GetComponent <Rigidbody2D>().AddForce(new Vector2(0, 2500));
     if (tag != "Bomb")
     {
         GetComponent <Rigidbody2D>().AddTorque(-540f);
     }
     instantiator = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     deleteJewels = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     targetRow    = Random.Range(0, 9);
     targetCol    = Random.Range(0, 9);
 }
 // Use this for initialization
 void Start()
 {
     instantiator    = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     deleteJewels    = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     row             = Random.Range(1, 8);
     col             = Random.Range(1, 8);
     targetJewel     = instantiator.GetJewelGridGameObject(row, col);
     targetPositon   = new Vector3(startingLeftJewelPosition + (horizontalMultiplier * col), 2.591258f - (.61f * row), (-1 * row) - 2);
     targetXPosition = targetPositon.x;
     targetYPosition = targetPositon.y;
     rigidBody       = GetComponent <Rigidbody2D> ();
     rigidBody.AddForce(new Vector2(0, 1000));
     rigidBody.AddTorque(Random.Range(-10000, 10000));
 }
 // Use this for initialization
 void Start()
 {
     starShotCount           = 0;
     timeStamp               = Time.time;
     cooldown                = .125f;
     endOfLevelCooldown      = .75f;
     bombRemainderController = gameObject.GetComponent <LevelTwoBombRemainderController> ();
     instantiator            = gameObject.GetComponent <RockLevelInstantiator> ();
     starStartingPosition    = new Vector3(-2.25f, -2.9f, -19);
     stoppedMoving           = gameObject.GetComponent <RockLevelMovementChecker> ();
     deleteJewels            = gameObject.GetComponent <RockLevelDeleteJewels> ();
     scoreKeeper             = gameObject.GetComponent <RockLevelScoreKeeper> ();
     soundHandler            = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     checkForMatches         = gameObject.GetComponent <RockLevelCheckForMatches> ();
     starLaunchCount         = 0;
 }
Beispiel #12
0
 // Use this for initialization
 void Start()
 {
     deleteList     = new HashSet <GameObject> ();
     deleteRowArray = new GameObject[9];
     //Debug.Log ("deleteRowArray.Length = " + deleteRowArray.Length);
     GetComponent <Rigidbody2D>().AddTorque(-540);
     instantiator   = GameObject.Find("Level Controller").GetComponent <RockLevelInstantiator> ();
     deleteJewels   = GameObject.Find("Level Controller").GetComponent <RockLevelDeleteJewels> ();
     soundHandler   = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     directionInt   = Random.Range(0, 4);
     targetJewelRow = Random.Range(0, 9);
     targetJewelCol = Random.Range(0, 9);
     while (instantiator.GetJewelGridGameObject(targetJewelRow, targetJewelCol).GetComponent <RockLevelJewelMovement> ().GetMoving())
     {
         targetJewelRow = Random.Range(0, 9);
         targetJewelCol = Random.Range(0, 9);
     }
     GetInitialPosition();
     moveToInitialPosition = true;
 }
Beispiel #13
0
 // 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;
     }
 }
Beispiel #14
0
 // Use this for initialization
 void Start()
 {
     instantiator               = gameObject.GetComponent <RockLevelInstantiator> ();
     deleteList                 = new HashSet <GameObject> ();
     horizontalDeleteList       = new HashSet <GameObject> ();
     verticalDeleteList         = new HashSet <GameObject> ();
     horizontalSetArray         = new HashSet <GameObject> [4];
     verticalSetArray           = new HashSet <GameObject> [4];
     jewelsThatActivatedCorners = new List <GameObject> ();
     dontDelete                 = false;
     exitMatchCheck             = false;
     powersActivated            = false;
     deleteJewels               = gameObject.GetComponent <RockLevelDeleteJewels> ();
     //		moveJewelsDown = GameObject.Find ("Level One Controller").GetComponent<MoveJewelsDown> ();
     corners      = gameObject.GetComponent <RockLevelCorners> ();
     fiveInARow   = gameObject.GetComponent <RockLevelFiveInARow> ();
     scoreKeeper  = gameObject.GetComponent <LevelTwoScoreKeeper> ();
     soundHandler = GameObject.Find("Game Manager").GetComponent <SoundHandler> ();
     swapJewel    = gameObject.GetComponent <RockLevelSwapJewel> ();
     gameStarted  = false;
 }
 // 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;
     }
 }
Beispiel #16
0
 // Use this for initialization
 void Start()
 {
     firstPressed    = null;
     secondPressed   = null;
     tutorial        = true;
     gameStarted     = false;
     cooldown        = 1;
     swapJewels      = gameObject.GetComponent <RockLevelSwapJewel> ();
     checkForMatches = gameObject.GetComponent <RockLevelCheckForMatches> ();
     bombHandler     = gameObject.GetComponent <RockLevelBombHandler> ();
     fiveInARow      = gameObject.GetComponent <RockLevelFiveInARow> ();
     fourInARow      = gameObject.GetComponent <RockLevelFourInARow> ();
     corners         = gameObject.GetComponent <RockLevelCorners> ();
     deleteJewels    = gameObject.GetComponent <RockLevelDeleteJewels> ();
     initialTime     = System.DateTime.Now;
     timeStamp       = Time.time;
     cooldown        = .625f;
     if (GameObject.Find("Mountain Level Two ID") != null)
     {
         tutorialLevel2 = true;
     }
 }
Beispiel #17
0
    // 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;
    }
 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> ();
 }