public void SetPlacedPokemon(Vector2Int at, Pokemon pokemon) { pokemonUIManager.AddPokemonUI(pokemon); pokemon.currentHp = pokemon.actualHp; pokemon.currentPp = pokemon.initialPp; placedPokemons[pokemon] = at; foreach (PokemonType type in pokemon.types) { if (!placedPokemonTypeDictionary.ContainsKey(type)) { placedPokemonTypeDictionary[type] = new List <Pokemon>(); } List <Pokemon> pokemonList = placedPokemonTypeDictionary[type]; foreach (Pokemon sameTypePokemon in pokemonList) { if (sameTypePokemon.name == pokemon.name) { return; } } pokemonList.Add(pokemon); //Debug.Log((type, pokemonList.Count)); } }
public void Reset() { UnsetStatus(); StartAnimation(); moveJobHandle.Complete(); isOnAttack = false; currentState = PokemonState.Idle; StopAllCoroutines(); if (skill != null) { skill.StopAllCoroutines(); } pokemonUIManager.AddPokemonUI(this); currentHp = actualHp; currentPp = initialPp; isAlive = false; gameObject.SetActive(true); spriteRenderer.color = new Color(1, 1, 1); spriteRenderer.flipX = false; initRank(); animator.speed = 1f; spriteRenderer.material = defulatMaterial; }