Exemplo n.º 1
0
        public static (Result result, List <S2VXStory> loadedStories) Load(string[] inputs)
        {
            var loadedStories = new List <S2VXStory>();

            foreach (var input in inputs)
            {
                var story = new S2VXStory();
                try {
                    story.Open(input, true);
                } catch (Exception e) {
                    return(
                        new Result {
                        IsSuccessful = false,
                        Message = $"Input file failed to load: \"{input}\"\n{e.Message}"
                    },
                        loadedStories
                        );
                }
                loadedStories.Add(story);
            }

            return(new Result {
                IsSuccessful = true
            }, loadedStories);
        }
Exemplo n.º 2
0
        private void Load(AudioManager audio)
        {
            var storyPath = Path.Combine("VisualTests", "EditorScreenTests", "ValidStory.s2ry");

            Story = new S2VXStory();
            Story.Open(storyPath, true);
            var audioPath = Path.Combine("TestTracks", "10-seconds-of-silence.mp3");

            Track = S2VXTrack.Open(audioPath, audio);

            Add(new ScreenStack(Editor = new EditorScreen(Story, Track)));
        }
Exemplo n.º 3
0
            public void SetUp()
            {
                var story    = new S2VXStory();
                var holdNote = new EditorHoldNote {
                    HitTime        = 100,
                    EndTime        = 400,
                    Coordinates    = new(1, 1),
                    EndCoordinates = new(4, 4),
                };

                holdNote.MidCoordinates.Add(new(2, 2));
                holdNote.MidCoordinates.Add(new(3, 3));
                story.AddNote(holdNote);

                var filePath = "HoldNoteLoadingTests_Open_HoldNote_SetUp.s2ry";

                story.Save(filePath);

                var newStory = new S2VXStory();

                newStory.Open(filePath, true);
                LoadedHoldNote = newStory.Notes.GetHoldNotes().First();
            }