コード例 #1
0
        public static void InternalInit()
        {
            TxtEditor.MakeTextFile("steam_appid");
            TxtEditor.WriteAllLines("steam_appid", new string[] { appID.ToString() });
            TxtEditor.MakeTextFile("Logs", "SteamLog");

            if (!Packsize.Test())
            {
                throw new Exception("[Steamworks.NET] Packsize Test returned false, the wrong version of Steamworks.NET is being run in this platform.");
            }
            if (!DllCheck.Test())
            {
                throw new Exception("[Steamworks.NET] DllCheck Test returned false, One or more of the Steamworks binaries seems to be the wrong version.");
            }


            try
            {
                if (SteamAPI.RestartAppIfNecessary((AppId_t)appID))
                {
                    Game1.GameExit = true;
                }
            }
            catch (System.DllNotFoundException e)
            {
                Game1.GameExit = true;
                throw new Exception("[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.\n" + e);
            }
            SteamAPI.Init();
        }
コード例 #2
0
 public void EnterScript(string ScriptName, Action afterAction)
 {
     Scripts = TxtEditor.ReadAllLines("Scripts", ScriptName);
     Projectors.Projector.Clear();
     Projectors.Projector.Load(scn);
     AfterAction = afterAction;
 }
コード例 #3
0
 public void ReadTxt(string DirName, string FileName) // 특정 텍스트파일 전체의 내용을 읽어 명령을 실행합니다.
 {
     string[] s = TxtEditor.ReadAllLines(DirName, FileName);
     for (int i = 0; i < s.Length; i++)
     {
         ReadLine(s[i]);
     }
 }
コード例 #4
0
        private static void SaveLog() //로그를 저장합니다.
        {
            if (DebugMode != BluePrintMode.NULL)
            {
                TxtEditor.AppendLinesToTop("Logs", "DebugLog", new string[] { LogNameWriter.TypeLine + "=" + CurrentLog });
            }
            else
            {
                TxtEditor.AppendLinesToTop("Logs", "DebugLog", new string[] { LogNameWriter.TypeLine });
            }

            SavedTimer = 30;
        }
コード例 #5
0
 private static void SteamAPIDebugTextHook(int nSeverity, System.Text.StringBuilder pchDebugText)
 {
     TxtEditor.AppendLinesToTop("Debug", "SteamLog", new string[] { pchDebugText.ToString() });
 }