コード例 #1
0
 ///  API asynchronous call results
 ///  can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)
 public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed)
 {
     pbFailed = false;
     return(false);
 }
コード例 #2
0
 /// <summary>
 /// <para> API asynchronous call results</para>
 /// <para> can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)</para>
 /// </summary>
 public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerUtils_IsAPICallCompleted(hSteamAPICall, out pbFailed));
 }
コード例 #3
0
 public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerUtils_GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed));
 }
コード例 #4
0
ファイル: isteamutils.cs プロジェクト: BruceNUAA/InputSystem
 /// <summary>
 /// <para> API asynchronous call results</para>
 /// <para> can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)</para>
 /// </summary>
 public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_IsAPICallCompleted(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, out pbFailed));
 }
コード例 #5
0
ファイル: isteamutils.cs プロジェクト: BruceNUAA/InputSystem
 public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetAPICallResult(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed));
 }
コード例 #6
0
 private static extern bool _FileReadAsyncComplete(IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead);
コード例 #7
0
 internal bool FileReadAsyncComplete(SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead)
 {
     return(_FileReadAsyncComplete(Self, hReadCall, pvBuffer, cubToRead));
 }
コード例 #8
0
        internal SteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall)
        {
            var returnValue = _GetAPICallFailureReason(Self, hSteamAPICall);

            return(returnValue);
        }
コード例 #9
0
 private static extern bool _GetAPICallResult(IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed);
コード例 #10
0
        internal bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed)
        {
            var returnValue = _IsAPICallCompleted(Self, hSteamAPICall, ref pbFailed);

            return(returnValue);
        }
コード例 #11
0
 private static extern SteamAPICallFailure _GetAPICallFailureReason(IntPtr self, SteamAPICall_t hSteamAPICall);
コード例 #12
0
 private static extern bool _IsAPICallCompleted(IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed);
コード例 #13
0
 public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed)
 {
     pbFailed = false;
     return(false);
 }
コード例 #14
0
 public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall)
 {
     return((ESteamAPICallFailure)0);
 }
コード例 #15
0
 public void Set(SteamAPICall_t hAPICall)
 {
 }
コード例 #16
0
        internal bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed)
        {
            var returnValue = _GetAPICallResult(Self, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, ref pbFailed);

            return(returnValue);
        }
コード例 #17
0
    private IEnumerator UpdateLeaderboard(int timeInMilliseconds, string leaderboardName)
    {
        Debug.Log("updating leaderboard");
        if (!SteamManager.Initialized)
        {
            Debug.Log("steammanager not initialized");
            yield break;
        }

        bool findLeaderboardCallCompleted = false;
        bool error = false;
        bool uploadedScoreCallCompleted = false;

        Steamworks.SteamLeaderboard_t         speedrunLeaderboard = new Steamworks.SteamLeaderboard_t();
        Steamworks.LeaderboardScoreUploaded_t leaderboardScore    = new Steamworks.LeaderboardScoreUploaded_t();

        Steamworks.SteamAPICall_t speedrunLeaderboardSearch = Steamworks.SteamUserStats.FindLeaderboard(leaderboardName);
        Steamworks.CallResult <Steamworks.LeaderboardFindResult_t> findLeaderboardCallResult = Steamworks.CallResult <Steamworks.LeaderboardFindResult_t> .Create();

        findLeaderboardCallResult.Set(speedrunLeaderboardSearch, (leaderboardFindResult, failure) =>
        {
            if (!failure && leaderboardFindResult.m_bLeaderboardFound == 1)
            {
                speedrunLeaderboard = leaderboardFindResult.m_hSteamLeaderboard;
                Debug.Log("speedrunLeaderboard found");
            }
            else
            {
                error = true;
            }

            findLeaderboardCallCompleted = true;
        });

        while (!findLeaderboardCallCompleted)
        {
            yield return(null);
        }

        if (error)
        {
            Debug.Log("Error finding High Score leaderboard.");
            yield break;
        }

        Steamworks.SteamAPICall_t uploadedScoreCall = Steamworks.SteamUserStats.UploadLeaderboardScore(speedrunLeaderboard, Steamworks.ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodKeepBest, timeInMilliseconds, new int[0], 0);
        Steamworks.CallResult <Steamworks.LeaderboardScoreUploaded_t> leaderboardScoreUploadedCallResult = Steamworks.CallResult <Steamworks.LeaderboardScoreUploaded_t> .Create();

        leaderboardScoreUploadedCallResult.Set(uploadedScoreCall, (scoreUploadedResult, failure) =>
        {
            if (!failure && scoreUploadedResult.m_bSuccess == 1)
            {
                leaderboardScore = scoreUploadedResult;
                Debug.Log("leaderboardScore found");
            }
            else
            {
                error = true;
            }

            uploadedScoreCallCompleted = true;
        });

        while (!uploadedScoreCallCompleted)
        {
            yield return(null);
        }

        if (error)
        {
            Debug.Log("Error uploading to High Score leaderboard.");
            yield break;
        }

        if (leaderboardScore.m_bScoreChanged == 1)
        {
            Debug.Log(String.Format("New high score! Global rank #{0}.", leaderboardScore.m_nGlobalRankNew));
        }
        else
        {
            Debug.Log(String.Format("A previous score was better. Global rank #{0}.", leaderboardScore.m_nGlobalRankNew));
        }
    }
コード例 #18
0
 internal static void RunStub(IntPtr self, IntPtr param, bool failure, SteamAPICall_t call)
 {
     throw new Exception("Something changed in the Steam API and now CCallbackBack is calling the CallResult function [Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )]");
 }
コード例 #19
0
        internal bool FileReadAsyncComplete(SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead)
        {
            var returnValue = _FileReadAsyncComplete(Self, hReadCall, pvBuffer, cubToRead);

            return(returnValue);
        }
コード例 #20
0
 public static bool FileReadAsyncComplete(SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead)
 {
     return(false);
 }
コード例 #21
0
 public static bool FileReadAsyncComplete(SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamRemoteStorage_FileReadAsyncComplete(hReadCall, pvBuffer, cubToRead));
 }
コード例 #22
0
ファイル: isteamhttp.cs プロジェクト: tuita520/City-Builder
 /// <summary>
 /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para>
 /// <para> asynchronous response via callback.</para>
 /// <para> Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control</para>
 /// <para> header and only do a local cache lookup rather than sending any actual remote request.</para>
 /// </summary>
 public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SendHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest, out pCallHandle));
 }
コード例 #23
0
ファイル: isteamutils.cs プロジェクト: BruceNUAA/InputSystem
 public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamUtils_GetAPICallFailureReason(CSteamAPIContext.GetSteamUtils(), hSteamAPICall));
 }
コード例 #24
0
        public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) => default; // 0x0000000180954E70-0x0000000180955030

        public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
        {
            pCallHandle = default;
            return(default);
コード例 #25
0
 /// <summary>
 /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para>
 /// <para> asynchronous response via callback.</para>
 /// <para> Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control</para>
 /// <para> header and only do a local cache lookup rather than sending any actual remote request.</para>
 /// </summary>
 public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerHTTP_SendHTTPRequest(hRequest, out pCallHandle));
 }
コード例 #26
0
ファイル: SteamHTTP.cs プロジェクト: radiomonter/Tanki_X
 public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(hRequest, out pCallHandle));
 }
コード例 #27
0
 public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerUtils_GetAPICallFailureReason(hSteamAPICall));
 }
コード例 #28
0
 public void Set(SteamAPICall_t hAPICall, APIDispatchDelegate func = null)
 {
 }
コード例 #29
0
 /// <summary>
 /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para>
 /// <para> asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and</para>
 /// <para> HTTPRequestDataReceived_t callbacks while streaming.</para>
 /// </summary>
 public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServerHTTP_SendHTTPRequestAndStreamResponse(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pCallHandle));
 }
コード例 #30
0
        public bool SendHTTPRequest(HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle)
        {
            var returnValue = _SendHTTPRequest(Self, hRequest, ref pCallHandle);

            return(returnValue);
        }