public void OnProjectScoreUpdated(object sender, EventArgs e) { if (sender.GetType() == typeof(Score)) { Score score = (Score)sender; if (ScoreRequirementMet(score.AssociatedProfileID)) { ScoreLock scoreLock = ScoreLockDatabase.Instance.RetrieveEntity(AssociatedScoreLockID); scoreLock.UnlockProject(score.AssociatedProfileID);//Maybe use the currentProfile field in the PlayerProfileDatabase? } } }