-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathInputMap.cs
44 lines (38 loc) · 1023 Bytes
/
InputMap.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
namespace Hacknet
{
public struct InputMap
{
private static readonly InputMap e = new InputMap();
public InputStates now;
public InputStates last;
public static InputMap Empty
{
get
{
var inputMap = e;
return e;
}
}
public InputMap(InputStates last, InputStates now)
{
this.last = last;
this.now = now;
}
public static bool operator ==(InputMap self, InputMap other)
{
return self.now == other.now && self.last == other.last;
}
public static bool operator !=(InputMap self, InputMap other)
{
return !(self.now == other.now) || !(self.last == other.last);
}
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}