-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLastScore.cs
64 lines (56 loc) · 1.83 KB
/
LastScore.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace EchoVRAPI
{
/// <summary>
/// Object Containing basic relavant information on who scored last.
/// 🥅 🥅 🥅 🥅
/// </summary>
public class LastScore
{
public float disc_speed { get; set; }
public string team { get; set; }
public string goal_type { get; set; }
public int point_amount { get; set; }
public float distance_thrown { get; set; }
/// <summary>
/// Name of person who scored last.
/// </summary>
public string person_scored { get; set; }
/// <summary>
/// Name of person who assisted in the resulting goal.
/// </summary>
public string assist_scored { get; set; }
#region Equality comparison
protected bool Equals(LastScore other)
{
return disc_speed.Equals(other.disc_speed) &&
team == other.team &&
goal_type == other.goal_type &&
point_amount == other.point_amount &&
distance_thrown.Equals(other.distance_thrown) &&
person_scored == other.person_scored &&
assist_scored == other.assist_scored;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((LastScore)obj);
}
public override int GetHashCode()
{
unchecked
{
int hashCode = disc_speed.GetHashCode();
hashCode = (hashCode * 397) ^ (team != null ? team.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (goal_type != null ? goal_type.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ point_amount;
hashCode = (hashCode * 397) ^ distance_thrown.GetHashCode();
hashCode = (hashCode * 397) ^ (person_scored != null ? person_scored.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (assist_scored != null ? assist_scored.GetHashCode() : 0);
return hashCode;
}
}
#endregion
}
}