public override bool Equals(System.Object obj) { //Check for null and compare run-time types. if ((obj == null) || !this.GetType().Equals(obj.GetType())) { return(false); } else { InputSaverEntry B = (InputSaverEntry)obj; foreach (KeyValuePair <String, InputSaverInput> Value in Inputs) { if (!B.Inputs[Value.Key].Equals(Value.Value)) { return(false); } } if (isDpadDownPressed != B.isDpadDownPressed || isDpadLeftPressed != B.isDpadLeftPressed || isDpadRightPressed != B.isDpadRightPressed || isDpadUpPressed != B.isDpadUpPressed) { return(false); } return(true); } }
public void Record(InputSaverEntry Entry) { if (InputsFrame.Count > 0 && Entry.Equals(InputsFrame[InputsFrame.Count - 1])) { InputsFrame[InputsFrame.Count - 1].NumberOfFramesIsSame += 1; } else { InputsFrame.Add(Entry); } }