Example #1
0
 // 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();
 }
Example #2
0
 public void ColossusSmash()
 {
     if (!smashed)
     {
         AD.DealDamage();
         AD.PushArea();
         smashed = true;
         Invoke("ResetSmash", knockCoolDown);
     }
 }
Example #3
0
    private void Explosion()
    {
        if (areaDamage)
        {
            areaDamage.PushArea();
            areaDamage.DealDamage();
        }
        GameObject newExplosion = Instantiate <GameObject>(explosion, transform.position, Quaternion.identity, bulletPool);

        Destroy(this.gameObject);
    }
Example #4
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (areaDmg)
        {
            areaDmg.PushArea();
            areaDmg.DealDamage();
        }
        GameObject newExplosion = Instantiate <GameObject>(explosion, transform.position, Quaternion.identity, bulletPool);

        Destroy(this.gameObject);
    }
Example #5
0
 private void Attack()
 {
     if (areaDmg)
     {
         areaDmg.DealDamage();
         areaDmg.PushArea();
     }
     else
     {
         Debug.Log("Te falta el componente de daño, melón");
     }
 }