コード例 #1
0
ファイル: Main.cs プロジェクト: HegarGarcia/softmon
        private void Change_Pokemon_Click(object sender, EventArgs e) //EventHandler de Mouse
        {
            var form = new Change_Pokemon(Player);

            form.ShowDialog();
            if (form.current != null)
            {
                Player.currentPokemon = form.current;
                LoadPokemon(Player.currentPokemon, false);
            }
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: HegarGarcia/softmon
        private void ChangePokemon() //Maneja los cambios de personaje
        {
            if (Player.currentPokemon.Health == 0)
            {
                var form = new Change_Pokemon(Player);
                form.ShowDialog();
                Player.currentPokemon = form.current;
                LoadPokemon(Player.currentPokemon, false);
            }

            if (PC.currentPokemon.Health == 0)
            {
                PC.Pokemons.RemoveAt(0);
                if (PC.Pokemons.Count >= 1)
                {
                    PC.currentPokemon = PC.Pokemons[0];
                    LoadPokemon(PC.currentPokemon, true);
                }
                else
                {
                    this.PC = this.battle.CreatePC(Pokedex);
                }
            }
        }