Update BulletType.java

This commit is contained in:
Leonwang4234
2020-10-02 19:33:11 -07:00
parent ca70b9c705
commit 74c0d0d0fd

View File

@@ -145,7 +145,10 @@ public abstract class BulletType extends Content{
public void hitTile(Bullet b, Building tile, float initialHealth){
if(status == StatusEffects.burning) {
Damage.createIncend(b.x, b.y, damage / 10f, (int)damage / 10);
Tile buildTile = world.tileWorld(tile.x, tile.y);
if(buildTile != null){
Fires.create(buildTile);
}
}
hit(b);
}
@@ -192,7 +195,10 @@ public abstract class BulletType extends Content{
if(status == StatusEffects.burning) {
indexer.eachBlock(null, x, y, splashDamageRadius, other -> other.team != b.team, other -> {
Damage.createIncend(x, y, damage / 10f, (int)damage / 10);
Tile tile = world.tileWorld(other.x, other.y);
if(tile != null){
Fires.create(tile);
}
});
}
}