示例#1
0
        public void EnterCutsceneEditor(SerializableCutscene cutscene)
        {
            Markers = new List <TimeMarker>();

            Editor.Editor.CameraClampMax = 30f;
            CurrentCutscene    = cutscene;
            IsInCutsceneEditor = true;

            if (cutscene.Cameras != null)
            {
                foreach (var camera in cutscene.Cameras)
                {
                    Markers.Add(new CameraMarker()
                    {
                        Time          = camera.PositionInTime,
                        CameraPos     = camera.Position,
                        CameraRot     = camera.Rotation,
                        Interpolation = camera.InterpolationStyle,
                    });
                }
            }

            if (cutscene.Subtitles != null)
            {
                foreach (var subtitle in cutscene.Subtitles)
                {
                    Markers.Add(new SubtitleMarker()
                    {
                        Content  = subtitle.Content,
                        Duration = subtitle.DurationInMs,
                        Time     = subtitle.PositionInTime,
                    });
                }
            }

            CurrentTimestamp   = 0;
            MarkerMenu         = new TimelineMarkerMenu(this);
            MarkerMenu.Visible = true;
            MarkerMenu.BuildFor(Markers.FirstOrDefault(m => m.Time == CurrentTimestamp));
            MarkerMenu.OnMenuClose += sender =>
            {
                LeaveCutsceneEditor();
            };
        }
示例#2
0
        public CutsceneUi()
        {
            #region NativeUI Init
            {
                CutsceneMenus = new UIMenu("Cutscene Creator", "CUTSCENES");
                CutsceneMenus.MouseControlsEnabled = false;
                CutsceneMenus.ResetKey(Common.MenuControls.Up);
                CutsceneMenus.ResetKey(Common.MenuControls.Down);
                CutsceneMenus.SetKey(Common.MenuControls.Up, GameControl.CellphoneUp, 0);
                CutsceneMenus.SetKey(Common.MenuControls.Down, GameControl.CellphoneDown, 0);

                MarkerMenu = new TimelineMarkerMenu(this);
                
                EditCutsceneMenu = new EditCutsceneMenu(this);
                EditCutsceneMenu.ParentMenu = CutsceneMenus;
            }
            #endregion

            _children = new List<UIMenu>();
        }
示例#3
0
        public CutsceneUi()
        {
            #region NativeUI Init
            {
                CutsceneMenus = new UIMenu("Cutscene Creator", "CUTSCENES");
                CutsceneMenus.MouseControlsEnabled = false;
                CutsceneMenus.ResetKey(Common.MenuControls.Up);
                CutsceneMenus.ResetKey(Common.MenuControls.Down);
                CutsceneMenus.SetKey(Common.MenuControls.Up, GameControl.CellphoneUp, 0);
                CutsceneMenus.SetKey(Common.MenuControls.Down, GameControl.CellphoneDown, 0);

                MarkerMenu = new TimelineMarkerMenu(this);

                EditCutsceneMenu            = new EditCutsceneMenu(this);
                EditCutsceneMenu.ParentMenu = CutsceneMenus;
            }
            #endregion

            _children = new List <UIMenu>();
        }
示例#4
0
        public void EnterCutsceneEditor(SerializableCutscene cutscene)
        {
            Markers = new List<TimeMarker>();

            Editor.Editor.CameraClampMax = 30f;
            CurrentCutscene = cutscene;
            IsInCutsceneEditor = true;

            if(cutscene.Cameras != null)
            foreach (var camera in cutscene.Cameras)
            {
                Markers.Add(new CameraMarker()
                {
                    Time = camera.PositionInTime,
                    CameraPos = camera.Position,
                    CameraRot = camera.Rotation,
                    Interpolation = camera.InterpolationStyle,
                });
            }

            if(cutscene.Subtitles != null)
            foreach (var subtitle in cutscene.Subtitles)
            {
                Markers.Add(new SubtitleMarker()
                {
                    Content = subtitle.Content,
                    Duration = subtitle.DurationInMs,
                    Time = subtitle.PositionInTime,
                });
            }

            CurrentTimestamp = 0;
            MarkerMenu = new TimelineMarkerMenu(this);
            MarkerMenu.Visible = true;
            MarkerMenu.BuildFor(Markers.FirstOrDefault(m => m.Time == CurrentTimestamp));
            MarkerMenu.OnMenuClose += sender =>
            {
                LeaveCutsceneEditor();
            };
        }