/// <summary> /// Recibe el drag y drop interactuados,y los agrega a un diccionario con su estado de respuesta /// </summary> /// <param name="drag"></param> /// <param name="drop"></param> public void ImmediatelyValidation(M7A119_drag drag, M7A119_drop drop) { answers.Add(drag.gameObject, drag._DropRight.Contains(drop)); answers.Add(drop.gameObject, drop._drag.GetComponent <M7A119_drag>()._DropRight.Contains(drop)); evaluated++; SetTypeCalification(); }
/// <summary> /// Obtiene las respuestas correstas e instancia el audio y puntaje correspondiente /// </summary> public void SetPuntaje() { rights = 0; foreach (var answer in answers) { M7A119_drag temp = answer.Key.GetComponent <M7A119_drag>(); if (temp) { temp.enabled = false; if (answer.Value) { rights++; } } } if (_TypeValidation == TypeValidation.Inmediata) { _controlAudio.PlayAudio((rights == 1) ? 1 : 2); _controlPuntaje.IncreaseScore(); answers.Clear(); rights = 0; if (evaluated == _drags.Count) { } _controlNavegacion.Forward(2); } else { if (_customValidar == 0) { _controlAudio.PlayAudio((rights == _drags.Count) ? 1 : 2); } else { _controlAudio.PlayAudio((rights == _customValidar) ? 1 : 2); } _controlPuntaje.IncreaseScore(rights); //_controlNavegacion.Forward(2); StartCoroutine(general.NextExcersiseDrag()); } }