/// <summary> /// Adds a new spawn point /// </summary> /// <param name="sender">not used</param> /// <param name="e">not used</param> private void addButton_Click(object sender, RoutedEventArgs e) { SpawnPoint spawn = new SpawnPoint(); if (wave.spawns.Count == 0) spawnBox.Items.Remove("None"); spawnBox.Items.Add("Spawn" + (spawnBox.Items.Count + 1)); wave.spawns.Add(spawn); SpawnEditor editor = new SpawnEditor(spawn); editor.Owner = this; editor.ShowDialog(); }
/// <summary> /// Edits the selected enemy /// </summary> /// <param name="sender">not used</param> /// <param name="e">not used</param> private void editButton_Click(object sender, RoutedEventArgs e) { if (wave.spawns.Count == 0) { MessageBox.Show("There are no enemies to edit."); return; } SpawnPoint spawn = wave.spawns[spawnBox.SelectedIndex]; SpawnEditor editor = new SpawnEditor(spawn); editor.Owner = this; editor.ShowDialog(); }