コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        Debug.Log("collision");
        PokemonBehaviour pokemonAcertado = other.GetComponent <PokemonBehaviour>();

        if (pokemonAcertado != null)
        {
            move.Move(this, pokemonAcertado);
        }
        UpdateScale();
    }
コード例 #2
0
 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");
     }
 }
コード例 #3
0
 public abstract void Move(PokemonBehaviour attackingPokemon, PokemonBehaviour defendingPokemon);