public void instanciarPlanValNumGolp(Vector3 point, int valGolpe) { addValAlPatronCombo(valGolpe); ArrayList result = combosScript.hayCombo(patronComboDado); if ((int)result [0] == 1) { planeUltraCombo.renderer.enabled = true; planeUltraCombo.SendMessage("setMomentoAparicion", Time.time); planeUltraCombo.renderer.material.mainTextureOffset = new Vector2(0, 0); audio.clip = arrayClipAudio [3]; audio.Play(); valGolpe = (int)result [1]; Instantiate(particulasCombo, point, Quaternion.identity); addValAlPatronUltra(valGolpe); ArrayList resultUltra = combosScript.hayUltra(patronUltraDado); if ((int)resultUltra [0] == 1) { efectoUltra(point); valGolpe = (int)resultUltra [1]; planeUltraCombo.renderer.enabled = true; planeUltraCombo.SendMessage("setMomentoAparicion", Time.time); planeUltraCombo.renderer.material.mainTextureOffset = new Vector2(0.5f, 0f); Camera.main.GetComponent <GUI_Play>().tiempoFinal += 2; } } List <ArmaSelected> listTempArmSelect = Camera.main.GetComponent <GUI_Play>().listArmaSelec; if (listTempArmSelect.Count != 0) { bool efectoEjecutado = false; int i = 0; while (!efectoEjecutado && i <= listTempArmSelect.Count - 1) { //aplica golpe y efecto si es el martillo if (listTempArmSelect [i].nombreArma == "martillo" && listTempArmSelect [i].seleccionada == true) { efectoUltra(point); valGolpe = 150; Camera.main.GetComponent <GUI_Play>().listArmaSelec [i].seleccionada = false; efectoEjecutado = true; } //aplica golpe y efecto si es el palogolf if (listTempArmSelect [i].nombreArma == "palogolf" && listTempArmSelect [i].seleccionada == true) { efectoUltra(point); valGolpe = 120; Camera.main.GetComponent <GUI_Play>().listArmaSelec [i].seleccionada = false; efectoEjecutado = true; } //aplicar rayo if (listTempArmSelect [i].nombreArma == "rayo" && listTempArmSelect [i].seleccionada == true) { efectoRayo(point); valGolpe = 150; Camera.main.GetComponent <GUI_Play>().listArmaSelec [i].seleccionada = false; efectoEjecutado = true; audio.clip = arrayClipAudio [5]; audio.Play(); } //aplicar congelacion if (listTempArmSelect [i].nombreArma == "hielo" && listTempArmSelect [i].seleccionada == true) { efectoCongelacion(point); valGolpe = 150; Camera.main.GetComponent <GUI_Play>().listArmaSelec [i].seleccionada = false; efectoEjecutado = true; } i++; } } point.z -= 0.4f; Instantiate(particulasGolpestandart, point, Quaternion.identity); GameObject planoVal = (GameObject)Instantiate(planoValGolpe, point, Quaternion.AngleAxis(180, new Vector3(0, 1, 0))); planoVal.transform.renderer.material.mainTextureOffset = aplicarGolpeSegunVal(valGolpe); timeDestrucPlano = Time.time + 1; }