Cleaned up SteamClientClass/SteamServerClass

This commit is contained in:
Garry Newman 2020-02-26 13:49:31 +00:00
parent b0d23eff22
commit 8b2a888feb

View File

@ -92,8 +92,7 @@ namespace Steamworks
public class SteamClientClass<T> : SteamClass public class SteamClientClass<T> : SteamClass
{ {
internal static SteamInterface Interface => InterfaceClient; internal static SteamInterface Interface;
internal static SteamInterface InterfaceClient;
internal override void InitializeInterface( bool server ) internal override void InitializeInterface( bool server )
{ {
@ -105,19 +104,18 @@ namespace Steamworks
if ( server ) if ( server )
throw new System.NotSupportedException(); throw new System.NotSupportedException();
InterfaceClient = iface; Interface = iface;
} }
internal override void DestroyInterface( bool server ) internal override void DestroyInterface( bool server )
{ {
InterfaceClient = null; Interface = null;
} }
} }
public class SteamServerClass<T> : SteamClass public class SteamServerClass<T> : SteamClass
{ {
internal static SteamInterface Interface => InterfaceServer; internal static SteamInterface Interface;
internal static SteamInterface InterfaceServer;
internal override void InitializeInterface( bool server ) internal override void InitializeInterface( bool server )
{ {
@ -129,12 +127,12 @@ namespace Steamworks
if ( !server ) if ( !server )
throw new System.NotSupportedException(); throw new System.NotSupportedException();
InterfaceServer = iface; Interface = iface;
} }
internal override void DestroyInterface( bool server ) internal override void DestroyInterface( bool server )
{ {
InterfaceServer = null; Interface = null;
} }
} }