コード例 #1
0
        internal Networking(BaseSteamworks steamworks, SteamNative.SteamNetworking networking)
        {
            this.networking = networking;

            SteamNative.P2PSessionRequest_t.RegisterCallback(steamworks, onP2PConnectionRequest);
            SteamNative.P2PSessionConnectFail_t.RegisterCallback(steamworks, onP2PConnectionFailed);
        }
コード例 #2
0
        internal Inventory(BaseSteamworks steamworks, SteamNative.SteamInventory c, bool server)
        {
            IsServer  = server;
            inventory = c;

            steamworks.RegisterCallback <SteamNative.SteamInventoryDefinitionUpdate_t>(onDefinitionsUpdated);

            Result.Pending = new Dictionary <int, Result>();

            FetchItemDefinitions();
            LoadDefinitions();
            UpdatePrices();

            if (!server)
            {
                steamworks.RegisterCallback <SteamNative.SteamInventoryResultReady_t>(onResultReady);
                steamworks.RegisterCallback <SteamNative.SteamInventoryFullUpdate_t>(onFullUpdate);


                //
                // Get a list of our items immediately
                //
                Refresh();
            }
        }
コード例 #3
0
        //
        // Constructor decides which implementation to use based on current platform
        //
        internal SteamScreenshots(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);
            }
        }
コード例 #4
0
        internal Workshop(BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage)
        {
            this.ugc           = ugc;
            this.steamworks    = steamworks;
            this.remoteStorage = remoteStorage;

            steamworks.RegisterCallback <SteamNative.DownloadItemResult_t>(onDownloadResult);
            steamworks.RegisterCallback <SteamNative.ItemInstalled_t>(onItemInstalled);
        }
コード例 #5
0
        /// <summary>
        /// You should never have to call this manually
        /// </summary>
        public void Dispose()
        {
            ugc           = null;
            steamworks    = null;
            remoteStorage = null;
            friends       = null;

            OnFileDownloaded = null;
            OnItemInstalled  = null;
        }
		//
		// Constructor decides which implementation to use based on current platform
		//
		internal 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 );
		}
コード例 #7
0
        internal Workshop(BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage)
        {
            this.ugc           = ugc;
            this.steamworks    = steamworks;
            this.remoteStorage = remoteStorage;

            SteamNative.DownloadItemResult_t.RegisterCallback(steamworks, onDownloadResult);
            SteamNative.ItemInstalled_t.RegisterCallback(steamworks, onItemInstalled);
            //  SteamNative.SteamUGCQueryCompleted_t.RegisterCallback( steamworks, onQueryComplete );

            // steamworks.AddCallback<ItemInstalled, ItemInstalled.Small>( onItemInstalled, ItemInstalled.CallbackId );
        }
コード例 #8
0
 internal CallbackHandle(Facepunch.Steamworks.BaseSteamworks steamworks)
 {
     Steamworks = steamworks;
 }
コード例 #9
0
 internal CallResult(Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call) : base(steamworks)
 {
     Call = call;
 }