|
楼主 |
发表于 2023-9-2 09:27:06
|
显示全部楼层
void proximityFuse() {
this.engine.applyDamage(this.target, this.target.getLocation(), this.missile.getDamageAmount(), DamageType.FRAGMENTATION, 0.0f, false, false, (Object)this.missile.getSource());
DamagingExplosionSpec boom = new DamagingExplosionSpec(0.1f, this.missile.getSpec().getExplosionRadius() * 1.5f, this.missile.getSpec().getExplosionRadius(), this.missile.getDamageAmount(), 50.0f, CollisionClass.PROJECTILE_NO_FF, CollisionClass.PROJECTILE_FIGHTER, 2.0f, 5.0f, 5.0f, 25, new Color(225, 100, 0), new Color(200, 100, 25));
boom.setDamageType(DamageType.FRAGMENTATION);
boom.setShowGraphic(false);
boom.setSoundSetId("explosion_flak");
this.engine.spawnDamagingExplosion(boom, this.missile.getSource(), this.missile.getLocation());
if (MagicRender.screenCheck(0.1f, this.missile.getLocation())) {
this.engine.addHitParticle(this.missile.getLocation(), new Vector2f(), 100.0f, 1.0f, 0.25f, this.EXPLOSION_COLOR);
for (int i = 0; i < 20; ++i) {
final float axis = (float)Math.random() * 360.0f;
final float range = (float)Math.random() * 100.0f;
this.engine.addHitParticle(MathUtils.getPointOnCircumference(this.missile.getLocation(), range / 5.0f, axis), MathUtils.getPointOnCircumference(new Vector2f(), range, axis), 2.0f + (float)Math.random() * 2.0f, 1.0f, 1.0f + (float)Math.random(), this.PARTICLE_COLOR);
}
this.engine.applyDamage((CombatEntityAPI)this.missile, this.missile.getLocation(), this.missile.getHitpoints() * 2.0f, DamageType.FRAGMENTATION, 0.0f, false, false, (Object)this.missile);
}
else {
this.engine.removeEntity((CombatEntityAPI)this.missile);
}
} |
|