private void OnTriggerEnter(Collider other) { Debug.Log("collision"); PokemonBehaviour pokemonAcertado = other.GetComponent <PokemonBehaviour>(); if (pokemonAcertado != null) { move.Move(this, pokemonAcertado); } UpdateScale(); }
public override void Move(PokemonBehaviour attackingPokemon, PokemonBehaviour defendingPokemon) { if (Random.Range(0f, 100f) > (100 - accuracy)) { Debug.Log($"{attackingPokemon.name} acertou o ataque {name}"); float damage = power * attackingPokemon.especie.baseATk.Value; defendingPokemon.TakeDamage(damage, type); } else { Debug.Log($"{attackingPokemon.name} errou"); } }
public abstract void Move(PokemonBehaviour attackingPokemon, PokemonBehaviour defendingPokemon);