private void PlayButtonClicked(object sender, RoutedEventArgs e) { // sets base path file location (root directory) MainResources.SetRootDirectory(_path); // confirm the scenario, loads the settings into mainresources MainResources.SetHP(_settings.StartingHP); MainResources.SetBranch(_settings.StartingBranch); MainResources.SetPathPosition(_settings.StartingPathPosition); MainResources.SetPoints(_settings.StartingPoints); // sets the folder path where we store all the ending videos MainResources.SetEndingPathRoot(Path.Combine(_path, "endings")); ButtonSchema buttonData = new ButtonSchema() { VideoFilename = new List <string>() { Path.Combine(_path, _introVideo) }, Endings = new List <Ending>() }; GameMenu gameMenu = new GameMenu(buttonData); MainResources.MainWindow.MainPanel.Children.Add(gameMenu); MainResources.MainWindow.MainPanel.Children.Remove(this); MainResources.MainWindow.RemoveBackground(); }
private void ButtonClicked(ButtonSchema buttonSchema) { DebugFunctions.DEBUG_output_list_of_videos("ButtonClicked", buttonSchema); // disable UI IsEnabled = false; if (buttonSchema.Path.Branch != MainResources.GetBranch()) { MainResources.SetBranch(buttonSchema.Path.Branch); MainResources.SetPathPosition(buttonSchema.Path.StartPosition - 1); } _prevButtonSchema = buttonSchema; _fadeInStoryboards.Stop(); _fadeOutStoryboards.Begin(); }