コード例 #1
0
 private void Setup()
 {
     GetComponent <QuestionsController>().QuestionCount = 5;
     PokemonAPIHelper.GetMaxRange();
     EggGroups   = PokemonAPIHelper.GetEggGroups();
     Generations = PokemonAPIHelper.GetGenerations();
     Questions   = new Queue <PokemonQuestion>();
 }
コード例 #2
0
    public void GeneratePokemonQuestions(string pokemonName)
    {
        PokemonSpeciesDataObject pokeDTO = PokemonAPIHelper.GetPokemon(pokemonName);

        if (pokeDTO != null)
        {
            Setup();
            QueueQuestion(pokeDTO, QuestionType.Name);
            QueueQuestion(pokeDTO, QuestionType.EggGroup);
            QueueQuestion(pokeDTO, QuestionType.FlavorText);
            QueueQuestion(pokeDTO, QuestionType.Generation);
            QueueQuestion(pokeDTO, QuestionType.PokedexNumber);
            GetComponent <QuestionsController>().SetSprite(pokeDTO.PokedexNumber);
            GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>().SetGameState(GameState.Playing);
            GetComponent <QuestionsController>().NextQuestion();
        }
    }
コード例 #3
0
 public void TestGet()
 {
     PokemonAPIHelper.GetPokemon("3");
 }