public void Explosion(bool fromGround) { Dictionary <HealthClass, Attack> damageables = new Dictionary <HealthClass, Attack>(); damageables = ValkyDetection.GetDamageablesInRangeTwoSections(owner, this.transform.position, minRange, maxRange, projectileDirection, fromGround, damage, yKnockbackOffset, knockbackForce, uniformKnockback); if (damageables != null) { foreach (KeyValuePair <HealthClass, Attack> entry in damageables) { entry.Key.TakeDamage(entry.Value); } damageables.Clear(); } }
public void Explosion(bool fromGround) { rb.constraints = RigidbodyConstraints.FreezeAll; // GFX explosion.gameObject.SetActive(true); exploded = true; rocket.SetActive(false); fire.gameObject.SetActive(false); Dictionary <HealthClass, Attack> damageables = new Dictionary <HealthClass, Attack>(); damageables = ValkyDetection.GetDamageablesInRangeTwoSections(owner, this.transform.position, minRange, maxRange, projectileDirection, fromGround, damage, yKnockbackOffset, knockbackForce, uniformKnockback); if (damageables != null) { foreach (KeyValuePair <HealthClass, Attack> entry in damageables) { entry.Key.TakeDamage(entry.Value); } damageables.Clear(); } }