예제 #1
0
 public void SetPokemonDataContract(PokemonDataContract pokemon)
 {
     this.AbilityResourceUriList = pokemon.AbilityResourceUriList;
     this.Attack    = pokemon.Attack;
     this.CatchRate = pokemon.CatchRate;
     this.Created   = pokemon.Created;
     this.Defense   = pokemon.Defense;
     this.DescriptionResourceUriList = pokemon.DescriptionResourceUriList;
     this.EggCycles = pokemon.EggCycles;
     this.EggGroupResourceUriList = pokemon.EggGroupResourceUriList;
     this.EvolutionList           = pokemon.EvolutionList;
     this.EvYield               = pokemon.EvYield;
     this.Exp                   = pokemon.Exp;
     this.GrowthRate            = pokemon.GrowthRate;
     this.Happiness             = pokemon.Happiness;
     this.Height                = pokemon.Height;
     this.Hp                    = pokemon.Hp;
     this.MaleFemaleRatio       = pokemon.MaleFemaleRatio;
     this.Modified              = pokemon.Modified;
     this.MoveResourceUriList   = pokemon.MoveResourceUriList;
     this.Name                  = pokemon.Name;
     this.NationalId            = pokemon.NationalId;
     this.PkdxId                = pokemon.PkdxId;
     this.PokemonResourceUri    = pokemon.PokemonResourceUri;
     this.SpAtk                 = pokemon.SpAtk;
     this.SpDef                 = pokemon.SpDef;
     this.Speed                 = pokemon.Speed;
     this.SpriteResourceUriList = pokemon.SpriteResourceUriList;
     this.Total                 = pokemon.Total;
     this.TypeResourceUriList   = pokemon.TypeResourceUriList;
     this.Weight                = pokemon.Weight;
 }
예제 #2
0
        public PokemonDataContract httpGetPokemon()
        {
            PokemonDataContract pokemon = new PokemonDataContract();
            string jsonStr = base.HttpGet(ResourceUri);

            pokemon = JsonConvert.DeserializeObject <PokemonDataContract>(jsonStr);

            Debug.WriteLine("Pokemon Id: " + pokemon.PkdxId + ", Pokemon Name: " + pokemon.Name);

            return(pokemon);
        }