/// <summary> /// Update the score and level text on scene. /// </summary> private void UpdateScoreAndLevelText() { OverallScoreStorage scoreAndLevel = new OverallScoreStorage(); // Get the overallScoreStorage based on the curently active ability result scene switch (currentSceneName) { case SceneName.INHIBITION_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.INHIBITION); break; case SceneName.OBJECT_RECOGNITION_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.OBJECT_RECOGNITION); break; case SceneName.POINTING_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.POINTING); break; case SceneName.SELECTIVE_VISUAL_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.SELECTIVE_VISUAL); break; case SceneName.TIME_TO_CONTACT_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.TIME_TO_CONTACT); break; case SceneName.VISUOSPATIAL_SKETCHPAD_RESULT_SCENE: scoreAndLevel = GetOverallScoreStorageForOneAbility(AbilityName.VISUOSPATIAL_SKETCHPAD); break; } // Set Text scoreValue.text = scoreAndLevel.Score.ToString(); levelValue.text = scoreAndLevel.Level.ToString(); RadialScoreRing radialScoreRing = GameObject.Find("RadialScoreRing").GetComponent <RadialScoreRing>(); radialScoreRing.GetComponent <RadialScoreRing>().Score = scoreAndLevel.Score; radialScoreRing.BeginAnimation(); }