コード例 #1
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();
            }
        }
コード例 #2
0
        internal Networking(BaseSteamworks steamworks, SteamNative.SteamNetworking networking)
        {
            this.networking = networking;

            steamworks.RegisterCallback <SteamNative.P2PSessionRequest_t>(onP2PConnectionRequest);
            steamworks.RegisterCallback <SteamNative.P2PSessionConnectFail_t>(onP2PConnectionFailed);
        }
コード例 #3
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);
        }