Пример #1
0
    /// <summary>
    /// Changes the pokemon stats and attacks to the one that is currently out
    /// </summary>
    /// <param name="index">index number in the team</param>
    private void OnChangePokemon(int index)
    {
        if (!InitPokemonData)
        {
            //saves the current pokemon data if we have a team already
            SaveStats(playerTeam[curPlayerPokemonIndex]);
        }
        //update our current index after saving the data
        curPlayerPokemonIndex = index;
        //update the stats first so that the ID and Name are right before calling
        //to change the sprite
        UpdateStats(playerTeam[curPlayerPokemonIndex]);
        GifID = PokemonID + 1;
        gif.ChangeSprite(PokemonName, GifID);
        gui.UpdatePlayerInfo();
        tc.setPlayerHealthBar();

        InitPokemonData = false;
    }