void Start() { upSc = GameObject.FindGameObjectWithTag("scripts").GetComponent <moleUp>(); hitSc = GameObject.FindGameObjectWithTag("scripts").GetComponent <moleHit>(); sScript = GameObject.FindGameObjectWithTag("ss").GetComponent <scoreSaver>(); moleTimeLimit = 10; }
void Start() { Application.targetFrameRate = 60; pauseCan = GameObject.FindGameObjectWithTag("pauseCan").GetComponent <Canvas>(); pauseCan.GetComponent <Canvas>().worldCamera = Camera.main; hitSc = GetComponent <moleHit>(); hornAudioS = GameObject.FindGameObjectWithTag("hornS").GetComponent <AudioSource>(); upSc = GetComponent <moleUp>(); if (SceneManager.GetActiveScene().buildIndex == 0 || SceneManager.GetActiveScene().name == "S 1 lvl 4" || SceneManager.GetActiveScene().name == "S 2 lvl 4" || SceneManager.GetActiveScene().name == "S 3 lvl 4" || SceneManager.GetActiveScene().name == "S 4 lvl 4") { startCan.SetActive(true); } else if (SceneManager.GetActiveScene().name == "S 1 lvl 1" || SceneManager.GetActiveScene().name == "S 2 lvl 1" || SceneManager.GetActiveScene().name == "S 3 lvl 1" || SceneManager.GetActiveScene().name == "S 4 lvl 1") { StartCoroutine(countDown()); } else { upSc.started = true; StartCoroutine(upSc.molePoper()); } }
void Start() { timer = 30; hitSc = GameObject.FindGameObjectWithTag("scripts").GetComponent <moleHit>(); upSc = GameObject.FindGameObjectWithTag("scripts").GetComponent <moleUp>(); }
void Start() { moleNum = -1; moleLimit = -1; //sScript = GameObject.FindGameObjectWithTag("ss").GetComponent<scoreSaver>(); hitSc = GetComponent <moleHit>(); outSpeed = new float[9]; inSpeed = new float[9]; if (SceneManager.GetActiveScene().buildIndex == 0) { //Time of moles popping out sequently outSpeed[0] = 0.35f; outSpeed[1] = 0.65f; outSpeed[2] = 0.1f; outSpeed[3] = 0.6f; outSpeed[4] = 1.05f; outSpeed[5] = 0.6f; outSpeed[6] = 0.35f; outSpeed[7] = 0.65f; outSpeed[8] = 0.1f; //Time of moles staying out sequently inSpeed[0] = 1.05f; inSpeed[1] = 0.75f; inSpeed[2] = 0.95f; inSpeed[3] = 1.25f; inSpeed[4] = 1.4f; inSpeed[5] = 0.8f; inSpeed[6] = 0.75f; inSpeed[7] = 1.05f; inSpeed[8] = 0.75f; } else if (SceneManager.GetActiveScene().buildIndex == 1) { //Time of moles popping out sequently outSpeed[0] = 0.25f; outSpeed[1] = 1f; outSpeed[2] = 0.05f; outSpeed[3] = 0.5f; outSpeed[4] = 1f; outSpeed[5] = 0.5f; outSpeed[6] = 0.25f; outSpeed[7] = 0.8f; outSpeed[8] = 0.05f; //Time of moles staying out sequently inSpeed[0] = 0.97f; inSpeed[1] = 0.7f; inSpeed[2] = 0.87f; inSpeed[3] = 1.17f; inSpeed[4] = 1.35f; inSpeed[5] = 0.75f; inSpeed[6] = 0.68f; inSpeed[7] = 0.97f; inSpeed[8] = 0.7f; } else if (SceneManager.GetActiveScene().buildIndex == 2) { //Time of moles popping out sequently outSpeed[0] = 0.2f; outSpeed[1] = 0.5f; outSpeed[2] = 0.05f; outSpeed[3] = 1f; outSpeed[4] = 0.8f; outSpeed[5] = 0.35f; outSpeed[6] = 0.2f; outSpeed[7] = 0.5f; outSpeed[8] = 0.65f; //Time of moles staying out sequently inSpeed[0] = 0.94f; inSpeed[1] = 0.69f; inSpeed[2] = 0.84f; inSpeed[3] = 1.1f; inSpeed[4] = 1.3f; inSpeed[5] = 0.7f; inSpeed[6] = 0.7f; inSpeed[7] = 0.94f; inSpeed[8] = 0.67f; } else if (SceneManager.GetActiveScene().buildIndex == 3) { //Time of moles popping out sequently outSpeed[0] = 0; outSpeed[1] = 0; outSpeed[2] = 0; outSpeed[3] = 0; outSpeed[4] = 0; outSpeed[5] = 0; outSpeed[6] = 0; outSpeed[7] = 0; outSpeed[8] = 0; //Time of moles staying out sequently inSpeed[0] = 0.9f; inSpeed[1] = 0.8f; inSpeed[2] = 0.8f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 0.8f; inSpeed[6] = 0.8f; inSpeed[7] = 0.94f; inSpeed[8] = 0.8f; } else { for (int a = 1; a <= 4; a++) { if (SceneManager.GetActiveScene().name == "S 2 lvl " + a) { if (SceneManager.GetActiveScene().name == "S 2 lvl 4") { //Time of moles popping out sequently outSpeed[0] = 0; outSpeed[1] = 0; outSpeed[2] = 0; outSpeed[3] = 0; outSpeed[4] = 0; outSpeed[5] = 0; outSpeed[6] = 0; outSpeed[7] = 0; outSpeed[8] = 0; //Time of moles staying out sequently inSpeed[0] = 0.94f; inSpeed[1] = 1.6f; inSpeed[2] = 0.8f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 0.8f; inSpeed[6] = 0.8f; inSpeed[7] = 1.25f; inSpeed[8] = 0.8f; } else { //Time of moles popping out sequently outSpeed[0] = 0.2f; outSpeed[1] = 1f; outSpeed[2] = 0.05f; outSpeed[3] = 1f; outSpeed[4] = 0.8f; outSpeed[5] = 0.35f; outSpeed[6] = 0.2f; outSpeed[7] = 0.5f; outSpeed[8] = 0.05f; //Time of moles staying out sequently inSpeed[0] = 0.94f; inSpeed[1] = 1.6f; inSpeed[2] = 0.8f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 0.68f; inSpeed[6] = 0.7f; inSpeed[7] = 1.25f; inSpeed[8] = 0.7f; } } else if (SceneManager.GetActiveScene().name == "S 3 lvl " + a) { if (SceneManager.GetActiveScene().name == "S 3 lvl 4") { //Time of moles popping out sequently outSpeed[0] = 0; outSpeed[1] = 0; outSpeed[2] = 0; outSpeed[3] = 0; outSpeed[4] = 0; outSpeed[5] = 0; outSpeed[6] = 0; outSpeed[7] = 0; outSpeed[8] = 0; //Time of moles staying out sequently inSpeed[0] = 1.2f; inSpeed[1] = 1.6f; inSpeed[2] = 0.8f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 1.65f; inSpeed[6] = 1.2f; inSpeed[7] = 1.25f; inSpeed[8] = 0.8f; } else { //Time of moles popping out sequently outSpeed[0] = 0.2f; outSpeed[1] = 1f; outSpeed[2] = 0.05f; outSpeed[3] = 1f; outSpeed[4] = 0.8f; outSpeed[5] = 0.35f; outSpeed[6] = 0.2f; outSpeed[7] = 0.5f; outSpeed[8] = 0.05f; //Time of moles staying out sequently inSpeed[0] = 1.2f; inSpeed[1] = 1.6f; inSpeed[2] = 0.75f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 1.65f; inSpeed[6] = 1.2f; inSpeed[7] = 1.25f; inSpeed[8] = 0.7f; } } else if (SceneManager.GetActiveScene().name == "S 4 lvl " + a) { if (SceneManager.GetActiveScene().name == "S 4 lvl 4") { //Time of moles popping out sequently outSpeed[0] = 0; outSpeed[1] = 0; outSpeed[2] = 0; outSpeed[3] = 0; outSpeed[4] = 0; outSpeed[5] = 0; outSpeed[6] = 0; outSpeed[7] = 0; outSpeed[8] = 0; //Time of moles staying out sequently inSpeed[0] = 1.2f; inSpeed[1] = 1.6f; inSpeed[2] = 0.8f; inSpeed[3] = 1.05f; inSpeed[4] = 1.3f; inSpeed[5] = 0.8f; inSpeed[6] = 1.2f; inSpeed[7] = 1.25f; inSpeed[8] = 1.3f; } else { //Time of moles popping out sequently outSpeed[0] = 0.2f; outSpeed[1] = 0.6f; outSpeed[2] = 0.05f; outSpeed[3] = 0.7f; outSpeed[4] = 0.3f; outSpeed[5] = 0.8f; outSpeed[6] = 0.2f; outSpeed[7] = 0.5f; outSpeed[8] = 0.3f; //Time of moles staying out sequently inSpeed[0] = 1.2f; inSpeed[1] = 1.15f; inSpeed[2] = 0.75f; inSpeed[3] = 1.05f; inSpeed[4] = 1.1f; inSpeed[5] = 1.35f; inSpeed[6] = 1f; inSpeed[7] = 1.15f; inSpeed[8] = 1.25f; } } } } }