示例#1
0
    public static void RunBuild(GameLoopMode mode)
    {
        var buildPath = GetBuildPath();
        var buildExe  = GetBuildExe(mode);

        Debug.Log("Starting " + buildPath + "/" + buildExe);
        var process = new System.Diagnostics.Process();

        process.StartInfo.FileName         = Application.dataPath + "/../" + buildPath + "/" + buildExe;
        process.StartInfo.WorkingDirectory = buildPath;
        process.Start();
    }
示例#2
0
    static DateTime TimeLastBuildGame(GameLoopMode mode)
    {
        string buildPath = GetBuildPath();

        if (mode == GameLoopMode.Server)
        {
            buildPath += "/Server";
        }
        else if (mode == GameLoopMode.Client)
        {
            buildPath += "/Client";
        }
        else if (mode == GameLoopMode.AI)
        {
            buildPath += "/AI";
        }

        return(Directory.GetLastWriteTime(buildPath));
    }
示例#3
0
 static string GetBuildExe(GameLoopMode mode)
 {
     if (mode == GameLoopMode.Server)
     {
         return("Server/Server.exe");
     }
     else if (mode == GameLoopMode.Client)
     {
         return("Client/Client.exe");
     }
     else if (mode == GameLoopMode.AI)
     {
         return("AI/AI.exe");
     }
     else
     {
         return("");
     }
 }