Exemple #1
0
    public void MostrarDatosPantallaInicio()
    {
        PlayerDAO player = new PlayerDAO();

        labelOro.GetComponent <UILabel> ().text    = "Oro: " + player.GetPlayer().Gold;
        labelNombre.GetComponent <UILabel> ().text = "Nombre: " + player.GetPlayer().Name;
        PokemonOwnedDAO pokemon = new PokemonOwnedDAO();

        labelPokemon.GetComponent <UILabel>().text = "Pokemon: " + pokemon.GetOwnedPokemon().ToList().Count();
    }
Exemple #2
0
    void Update()
    {
        PlayerDAO       player = new PlayerDAO();
        PokemonOwnedDAO pk     = new PokemonOwnedDAO();
        EggOwnedDAO     egg    = new EggOwnedDAO();
        Player          p      = player.GetPlayer();

        labelNombre.GetComponent <UILabel>().text   = "Perfil de " + p.Name;
        labelOro.GetComponent <UILabel>().text      = "Oro: " + p.Gold;
        labelPokemon.GetComponent <UILabel> ().text = "Pokemon: " + pk.GetOwnedPokemon().ToList().Count();
        labelHuevos.GetComponent <UILabel> ().text  = "Huevos: " + egg.GetNotEquippedEggs().ToList().Count();
    }
Exemple #3
0
    public void CreatePokemonOwned(int basicId)
    {
        PokemonBasic pokemonBasic = DataService.instance._connection.Table <PokemonBasic> ().Where(x => x.Id == basicId).First();
        PokemonOwned pokemonOwned = new PokemonOwned();

        pokemonOwned.IdBasic           = basicId;
        pokemonOwned.Hp                = pokemonBasic.BasicHp;
        pokemonOwned.HpTotal           = pokemonBasic.BasicHp;
        pokemonOwned.Attack            = pokemonBasic.BasicAttack;
        pokemonOwned.Defense           = pokemonBasic.BasicDefense;
        pokemonOwned.SpecialAttack     = pokemonBasic.BasicSpecialAttack;
        pokemonOwned.SpecialDefense    = pokemonBasic.BasicSpecialDefense;
        pokemonOwned.Speed             = pokemonBasic.BasicSpeed;
        pokemonOwned.Happyness         = 100;
        pokemonOwned.CurrentExperience = 0;
        pokemonOwned.Level             = 5;
        pokemonOwned.ExperienceNeeded  = GameController.instance.CalcularExperienciaNecesaria(pokemonOwned);
        pokemonOwned.InTeam            = false;
        PokemonOwnedDAO pkmdao = new PokemonOwnedDAO();

        pokemonOwned.Id = pkmdao.GetOwnedPokemon().ToList().Count() + 1;
        DataService.instance._connection.Insert(pokemonOwned);
    }