public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || GetType() != obj.GetType()) { return(false); } ScoreLock otherGate = (ScoreLock)obj; if (this.ID != otherGate.ID) { return(false); } if (this.ProjectIDToUnlock != otherGate.ProjectIDToUnlock) { return(false); } if (this.MinimumRequirements != otherGate.MinimumRequirements) { return(false); } return(true); }
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? } } }
public void SetAssociatedScoreLock(ScoreLock scoreLock) { SetAssociatedScoreLock(scoreLock.ID); }