// Use this for initialization void Start() { //Utiliza el script de AreaDamage para hacer daño a todos los enemigos en el área de explosión y reproduce una animación areaDmg = GetComponent <AreaDamage>(); areaDmg.PushArea(); areaDmg.DealDamage(); }
public void ColossusSmash() { if (!smashed) { AD.DealDamage(); AD.PushArea(); smashed = true; Invoke("ResetSmash", knockCoolDown); } }
private void Explosion() { if (areaDamage) { areaDamage.PushArea(); areaDamage.DealDamage(); } GameObject newExplosion = Instantiate <GameObject>(explosion, transform.position, Quaternion.identity, bulletPool); Destroy(this.gameObject); }
private void OnTriggerEnter2D(Collider2D collision) { if (areaDmg) { areaDmg.PushArea(); areaDmg.DealDamage(); } GameObject newExplosion = Instantiate <GameObject>(explosion, transform.position, Quaternion.identity, bulletPool); Destroy(this.gameObject); }
private void Attack() { if (areaDmg) { areaDmg.DealDamage(); areaDmg.PushArea(); } else { Debug.Log("Te falta el componente de daño, melón"); } }