/// <summary>
        ///     This method must be called before doing anything else.
        /// </summary>
        /// <returns>True if initialized successfully.</returns>
        public static bool Initialize(int appId = -1)
        {
            // Write app id to file if set.
            if (appId > 0)
            {
                var currentLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);

                File.WriteAllText(Path.Combine(currentLocation, "steam_appid.txt"), $"{appId}", Encoding.ASCII);
            }

            // Initialize native library.
            return(SteamAPIInterop.SteamAPI_Init());
        }
 public static void Uninitialize()
 {
     SteamAPIInterop.SteamAPI_Shutdown();
 }
Beispiel #3
0
 public static void UnregisterCallback(IntPtr pCallback)
 {
     SteamAPIInterop.SteamAPI_UnregisterCallback(pCallback);
 }
Beispiel #4
0
 public static void RegisterCallback(IntPtr pCallback, int iCallback)
 {
     SteamAPIInterop.SteamAPI_RegisterCallback(pCallback, iCallback);
 }
Beispiel #5
0
 public static void RunCallbacks()
 {
     SteamAPIInterop.SteamAPI_RunCallbacks();
 }
Beispiel #6
0
 public static void RestartAppIfNecessary(uint appId)
 {
     SteamAPIInterop.SteamAPI_RestartAppIfNecessary(appId);
 }