예제 #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");
 }