コード例 #1
0
 public void RemovePlacedPokemon(Pokemon pokemon)
 {
     pokemonUIManager.RemovePokemonUI(pokemon);
     placedPokemons.Remove(pokemon);
     foreach (PokemonType type in pokemon.types)
     {
         List <Pokemon> pokemonList = placedPokemonTypeDictionary[type];
         pokemonList.Remove(pokemon);
         //Debug.Log((type, pokemonList.Count));
     }
 }
コード例 #2
0
    private IEnumerator HitAction()
    {
        spriteRenderer.color = new Color(spriteRenderer.color.r, 0, 0);

        for (float time = 0; time < 0.5f; time += 0.1f)
        {
            spriteRenderer.color = new Color(spriteRenderer.color.r, spriteRenderer.color.g + 0.2f, spriteRenderer.color.b + 0.2f);
            yield return(new WaitForSeconds(0.1f));
        }
        if (currentHp <= 0)
        {
            pokemonUIManager.RemovePokemonUI(this);
            gameObject.SetActive(false);
        }
    }