public Dictionary <string, bool> GetResults() { Dictionary <string, bool> results = new Dictionary <string, bool>(); foreach (var group in selectableGroups) { ClickableSprite cs = group.GetSelectedSprite(); results[cs.name] = group.SelectedCorrect; } return(results); }
private void Selected(ClickableSprite cs) { if (toggled) { activated = !activated; if (correctIndex == -1) // Means selecting single item is incorrect { SelectedCorrect = !activated; } else { SelectedCorrect = activated; } if (activated) { cs.TransformToDest(); } else { cs.TransformToHome(); } } else { if (anySelected) { clickableSprites[SelectedIndex].TransformToHome(); } else { anySelected = true; } SelectedIndex = cs.AllocatedIndex; clickableSprites[SelectedIndex].TransformToDest(); if (cs.AllocatedIndex == correctIndex) { SelectedCorrect = true; } else { SelectedCorrect = false; } } }