static void Main() { var scene = new EditorGame(new XnaMouse(), new XnaKeyboard()); using (var game = new EnigmaGame(scene)) game.Run(); }
void LevelProperties_Loaded(object sender, RoutedEventArgs e) { if (!isLoaded) { mainWindow = this.TryFindParent<MainWindow>(); Game = mainWindow.editor.Game; Game.LevelManager.LevelLoaded += new LevelLoadedEventHandler(Level_Loaded); isLoaded = true; } }
void Dialogue_Edit_Loaded(object sender, RoutedEventArgs e) { if (!isLoaded) { var mainWindow = this.TryFindParent<MainWindow>(); Game = mainWindow.editor.Game; isLoaded = true; } }
void Editor_Loaded(object sender, RoutedEventArgs e) { if (!isLoaded) { Game = new EditorGame(xnaControl.Handle, (int)xnaControl.ActualWidth, (int)xnaControl.ActualHeight); isLoaded = true; } }
void Dialogue_Loaded(object sender, RoutedEventArgs e) { if (!isLoaded) { var mainWindow = this.TryFindParent<MainWindow>(); Game = mainWindow.editor.Game; //mainWindow.editor.EntityAdded += new EntityAddedEventHandler(Dialogue_Added); mainWindow.LevelChanged += new LevelChangedEventHandler(Level_Changed); prompts = new List<NPCPrompt>(); DialogueIds = new ObservableCollection<string>(prompts.Select(x => x.Id.ToString())); dialogueIds.ItemsSource = DialogueIds; dialogueEdit.Game = Game; isLoaded = true; } }