public void UbicarEspacio(LectorDeTexto datos, int indice, float caracXReng, float caracInicio) { float x = 0, y = 0; float caracterSize = 0.2f, trimPercent = 0.3f; x = /*(3 / caracXReng)*/ 0.6f + (caracInicio * (caracterSize - (trimPercent * caracterSize))); switch (datos.rengs[indice]) { case 1: y = 0.0f; break; case 2: y = (datos.rengActual[indice] > 1) ? -0.25f : 0.4f; break; case 3: y = (datos.rengActual[indice] > 2) ? -0.45f : (datos.rengActual[indice] > 1) ? 0.0f : 0.6f; break; } //Debug.Log("Le X: " + x); espacio.UbicarEspacio(new Vector3((x) - 2.25f, y, 0)); }
public void Inicializar() { enabled = true; rimaEscogida = false; MatarLevelMng(); runTurn.Inicializar(); SelectThemeButton(false); runTurn.enabled = false; if (BasesManager.Instancia != null) { audioSource.clip = BasesManager.Instancia.Instrumental; } audioSource.Stop(); audioSource.time = 0; audioSource.Play(); _timeToSelectTheme = BasesManager.Instancia.TiempoParaEscogerTema; //timePerPrhase = timePerRhyme / prhaseCount; myTime = _timeToSelectTheme; timeSlider.maxValue = _timeToSelectTheme; timeSlider.value = _timeToSelectTheme; lector = GetComponent <LectorDeTexto>(); lector.Inicializar(); UI.Instance.RimasOn(true); LeerTemas(); startTimer = true; //DesactivarPatrones(); //StartTimer(); //SelectTheme(); }