Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
LabelHandle.cs
Go to the documentation of this file.
2
4
5public readonly struct LabelHandle : IEquatable<LabelHandle>
6{
7 public int Id { get; }
8
9 public bool IsNil => Id == 0;
10
11 internal LabelHandle(int id)
12 {
13 Id = id;
14 }
15
17 {
18 return Id == other.Id;
19 }
20
21 public override bool Equals([NotNullWhen(true)] object? obj)
22 {
23 if (obj is LabelHandle other)
24 {
25 return Equals(other);
26 }
27 return false;
28 }
29
30 public override int GetHashCode()
31 {
32 return Id.GetHashCode();
33 }
34
35 public static bool operator ==(LabelHandle left, LabelHandle right)
36 {
37 return left.Equals(right);
38 }
39
40 public static bool operator !=(LabelHandle left, LabelHandle right)
41 {
42 return !left.Equals(right);
43 }
44}
static bool operator!=(LabelHandle left, LabelHandle right)
override bool Equals([NotNullWhen(true)] object? obj)
static bool operator==(LabelHandle left, LabelHandle right)