示例#1
0
        public override void Update(GameUpdatedEventArgs args)
        {
            if (Input.GetKeyDown(Key.V) || ControllerManager.ControllerExists(0) && ControllerManager.GetController(0).GetButtonDown(Buttons.DPadDown))
            {
                Game.Instance.VSync = Game.Instance.VSync == VSyncMode.On ? VSyncMode.Off : VSyncMode.On;
            }

            GameObjectsText.UpdateText("GameObjects: " + Game.GetAllGameObjects().Count);
            FPSText.UpdateText("FPS: " + FrameRate.Get());
            ScenesText.UpdateText("Scenes: " + Game.Instance.SceneManager.scenes.Count);
        }
示例#2
0
        protected override void Execute(CodeActivityContext context)
        {
            Process ps = null;

            if (!DisableActivity.Get(context))
            {
                FFmpegArgument arguments = new FFmpegArgument();
                arguments.FFmpegFilePath    = FFmpegFilePath.Get(context);
                arguments.OutputFileName    = OutputFileName.Get(context);
                arguments.VideoCodec        = VideoCodec.Get(context);
                arguments.PixelFormat       = PixelFormat.Get(context);
                arguments.ExtraOptionString = ExtraOptionString.Get(context);
                arguments.MaxDuration       = MaxDuration.Get(context);
                arguments.MaxFileSize       = MaxFileSize.Get(context);
                arguments.FrameRate         = FrameRate.Get(context);

                ps = StartRecording.Start(arguments, DelayAfter.Get(context));
            }

            FFmpegProcess.Set(context, ps);
        }
示例#3
0
        protected override void Execute(NativeActivityContext context)
        {
            if (!IsActivityDisable.Get(context))
            {
                FFmpegArgument arguments = new FFmpegArgument();
                arguments.FFmpegFilePath    = FFmpegFilePath.Get(context);
                arguments.OutputFileName    = OutputFileName.Get(context);
                arguments.VideoCodec        = VideoCodec.Get(context);
                arguments.PixelFormat       = PixelFormat.Get(context);
                arguments.ExtraOptionString = ExtraOptionString.Get(context);
                arguments.MaxDuration       = MaxDuration.Get(context);
                arguments.MaxFileSize       = MaxFileSize.Get(context);
                arguments.FrameRate         = FrameRate.Get(context);


                ps = StartRecording.Start(arguments, DelayAfter.Get(context));
            }

            if (Body != null)
            {
                context.ScheduleAction(Body, OnCompleted, OnFaulted);
            }
        }
示例#4
0
 private void DebugScreenTexts()
 {
     text1.GetComponent <Text>().UpdateText("FPS: " + FrameRate.Get().ToString());
     text2.GetComponent <Text>().UpdateText("GameObjects: " + Game.GetAllGameObjects().Count);
     //text2.GetComponent<Text>().UpdateText(string.Format("Memory: {0}mb", MathF.Round(Process.GetCurrentProcess().PrivateMemorySize64 / 1024f / 1024f)));
 }
示例#5
0
 private void DebugScreenTexts()
 {
     text1.GetComponent <Text>().UpdateText("FPS: " + FrameRate.Get().ToString());
     text2.GetComponent <Text>().UpdateText("GameObjects: " + GetAllGameObjects().Count);
 }