Esempio n. 1
0
 private void addToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (isStarted)
     {
         CharacterCreator form = new CharacterCreator();
         form.CompletionEvent += EnemyCharacterCreatorAddition_CompletionEvent;
         form.Show();
     }
 }
Esempio n. 2
0
        // Allows editing of a selected enemy
        private void editToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            if (isStarted)
            {
                CharacterCreator form = new CharacterCreator(game.Enemies[enemyListBox.SelectedIndex]); // Passes in the selected enemy object.

                // Removes that enemy object from the lists
                game.Enemies.RemoveAt(enemyListBox.SelectedIndex);
                enemyListBox.Items.RemoveAt(enemyListBox.SelectedIndex);

                form.CompletionEvent += EnemyCharacterCreatorAddition_CompletionEvent;
                form.Show();
            }
        }
Esempio n. 3
0
        // Allows editing of a selected npc
        private void editToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (isStarted)
            {
                CharacterCreator form = new CharacterCreator(game.Npcs[npcListBox.SelectedIndex]);  // Passes in the selected npc object.

                // Removes that npc object from the lists
                game.Npcs.RemoveAt(npcListBox.SelectedIndex);
                npcListBox.Items.RemoveAt(npcListBox.SelectedIndex);

                form.CompletionEvent += NPCCharacterCreatorAddition_CompletionEvent;
                form.Show();
            }
        }