Ejemplo n.º 1
0
        public void StartFireBolt()
        {
            InputSet input = new InputSet();

            if (!string.IsNullOrEmpty(storyField.text))
            {
                input.StoryPlanPath = storyField.text;
            }

            if (!string.IsNullOrEmpty(modelField.text))
            {
                input.CinematicModelPath = modelField.text;
            }

            if (!string.IsNullOrEmpty(cameraField.text))
            {
                input.CameraPlanPath = cameraField.text;
            }

            if (!string.IsNullOrEmpty(actorField.text))
            {
                input.ActorsAndAnimationsBundlePath = actorField.text;
            }

            if (!string.IsNullOrEmpty(terrainField.text))
            {
                input.TerrainBundlePath = terrainField.text;
            }
            ElPresidente.Instance.Init(false, input);
        }
Ejemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            bool          logDebug      = false;
            bool          logStatistics = false;
            string        statFile      = "stats.txt";
            InputSet      inputFiles    = new InputSet();
            VideoInputSet videoInputSet = null;

#if !UNITY_EDITOR
            var args = Environment.GetCommandLineArgs();
            for (int i = 0; i < args.Length; i++)
            {
                switch (args[i])
                {
                case "-d":
                    switch (args[i + 1])
                    {
                    case "debug":
                        logDebug = true;
                        break;
                    }
                    break;

                case "-stats":
                    logStatistics = true;
                    statFile      = args[i + 1];
                    break;

                case "-v":     //video generation
                    QualitySettings.vSyncCount = 0;
                    videoInputSet = new VideoInputSet();
                    if (i + 1 < args.Length)
                    {
                        foreach (var encoding in args[i + 1].Split(new char[] { encodingDelimiter }))
                        {
                            videoInputSet.AddEncoding(encoding);
                        }
                    }
                    break;

                case "-fr":     //framerate
                    if (videoInputSet == null)
                    {
                        Console.WriteLine("-fr framerate option only valid for video mode; must follow -v");
                        Debug.LogError("-fr framerate option only valid for video mode; must follow -v");
                        break;
                    }
                    videoInputSet.FrameRate = uint.Parse(args[i + 1]);
                    break;

                case "-ffmpeg":    //ffmpeg location
                    if (videoInputSet == null)
                    {
                        Console.WriteLine("-ffmpeg ffmpeg path only valid for video mode; must follow -v");
                        Debug.LogError("-ffmpeg ffmpeg path only valid for video mode; must follow -v");
                        break;
                    }
                    videoInputSet.FFMPEGPath = args[i + 1];
                    break;

                case "-vo":     //output file
                    if (videoInputSet == null)
                    {
                        Console.WriteLine("-vo video output path only valid for video mode; must follow -v");
                        Debug.LogError("-vo video output path only valid for video mode; must follow -v");
                        break;
                    }
                    videoInputSet.OutputPath = args[i + 1];
                    break;

                case "-story":
                    inputFiles.StoryPlanPath = args[i + 1];
                    break;

                case "-model":
                    inputFiles.CinematicModelPath = args[i + 1];
                    break;

                case "-camera":
                    inputFiles.CameraPlanPath = args[i + 1];
                    break;

                default:
                    break;
                }
            }
            ElPresidente.Instance.Init(logDebug, inputFiles, videoInputSet, false, false, false, logStatistics, statFile);
#else
            Profiler.maxNumberOfSamplesPerFrame = -1;
            inputFiles.CameraPlanPath           = "tests/1v1/1v1Camera.xml";
            //inputFiles.CinematicModelPath = "tests/lowAngle/defaultModel.xml";
            inputFiles.CinematicModelPath = "cinematicModels/defaultModel.xml";
            inputFiles.StoryPlanPath      = "tests/1v1/1v1Story.xml";

            ElPresidente.Instance.Init(logDebug, inputFiles, videoInputSet, false, false, false, false, "statfile.txt");
#endif
        }