Beispiel #1
0
        //
        // Constructor decides which implementation to use based on current platform
        //
        public SteamMatchmakingServers(Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer)
        {
            this.steamworks = steamworks;

            if (Platform.IsWindows64)
            {
                platform = new Platform.Win64(pointer);
            }
            else if (Platform.IsWindows32)
            {
                platform = new Platform.Win32(pointer);
            }
            else if (Platform.IsLinux32)
            {
                platform = new Platform.Linux32(pointer);
            }
            else if (Platform.IsLinux64)
            {
                platform = new Platform.Linux64(pointer);
            }
            else if (Platform.IsOsx)
            {
                platform = new Platform.Mac(pointer);
            }
        }
Beispiel #2
0
        //
        // Constructor decides which implementation to use based on current platform
        //
        internal SteamUserStats(Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer)
        {
            this.steamworks = steamworks;

            if (Platform.IsWindows64)
            {
                platform = new Platform.Win64(pointer);
            }
            else if (Platform.IsWindows32)
            {
                platform = new Platform.Win32(pointer);
            }
            else if (Platform.IsLinux32)
            {
                platform = new Platform.Linux32(pointer);
            }
            else if (Platform.IsLinux64)
            {
                platform = new Platform.Linux64(pointer);
            }
            else if (Platform.IsOsx)
            {
                platform = new Platform.Mac(pointer);
            }
        }
Beispiel #3
0
 //
 // When shutting down clear all the internals to avoid accidental use
 //
 public virtual void Dispose()
 {
     if (platform != null)
     {
         platform.Dispose();
         platform = null;
     }
 }
 //
 // Constructor decides which implementation to use based on current platform
 //
 internal SteamApi()
 {
     if (Platform.IsWindows64)
     {
         platform = new Platform.Win64(((IntPtr)1));
     }
     else if (Platform.IsWindows32)
     {
         platform = new Platform.Win32(((IntPtr)1));
     }
     else if (Platform.IsLinux32)
     {
         platform = new Platform.Linux32(((IntPtr)1));
     }
     else if (Platform.IsLinux64)
     {
         platform = new Platform.Linux64(((IntPtr)1));
     }
     else if (Platform.IsOsx)
     {
         platform = new Platform.Mac(((IntPtr)1));
     }
 }