From 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sat, 25 Nov 2023 18:39:02 +0800 Subject: + init --- Assembly_Firstpass/Steamworks/RTime32.cs | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Assembly_Firstpass/Steamworks/RTime32.cs (limited to 'Assembly_Firstpass/Steamworks/RTime32.cs') diff --git a/Assembly_Firstpass/Steamworks/RTime32.cs b/Assembly_Firstpass/Steamworks/RTime32.cs new file mode 100644 index 0000000..9a99665 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RTime32.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct RTime32 : IEquatable, IComparable +{ + public uint m_RTime32; + + public RTime32(uint value) + { + m_RTime32 = value; + } + + public override string ToString() + { + return m_RTime32.ToString(); + } + + public override bool Equals(object other) + { + if (other is RTime32) + { + return this == (RTime32)other; + } + return false; + } + + public override int GetHashCode() + { + return m_RTime32.GetHashCode(); + } + + public static bool operator ==(RTime32 x, RTime32 y) + { + return x.m_RTime32 == y.m_RTime32; + } + + public static bool operator !=(RTime32 x, RTime32 y) + { + return !(x == y); + } + + public static explicit operator RTime32(uint value) + { + return new RTime32(value); + } + + public static explicit operator uint(RTime32 that) + { + return that.m_RTime32; + } + + public bool Equals(RTime32 other) + { + return m_RTime32 == other.m_RTime32; + } + + public int CompareTo(RTime32 other) + { + return m_RTime32.CompareTo(other.m_RTime32); + } +} -- cgit v1.1-26-g67d0