示例#1
0
    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);
    }
示例#2
0
 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?
         }
     }
 }
示例#3
0
 public void SetAssociatedScoreLock(ScoreLock scoreLock)
 {
     SetAssociatedScoreLock(scoreLock.ID);
 }