Changed power generation system, made generator blocks explode
This commit is contained in:
@@ -164,7 +164,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
}
|
||||
},
|
||||
shot = new BulletType(2.4f, 2){
|
||||
{lifetime=40;}
|
||||
{lifetime = 40;}
|
||||
public void draw(Bullet b){
|
||||
Draw.color(Color.GOLD);
|
||||
Draw.rect("bullet", b.x, b.y, b.angle());
|
||||
|
||||
@@ -61,9 +61,13 @@ public class TileEntity extends Entity{
|
||||
}
|
||||
|
||||
public void collision(Bullet other){
|
||||
Block block = tile.block();
|
||||
damage(other.getDamage());
|
||||
}
|
||||
|
||||
public void damage(int damage){
|
||||
if(dead) return;
|
||||
|
||||
int amount = block.handleDamage(tile, other.getDamage());
|
||||
int amount = tile.block().handleDamage(tile, damage);
|
||||
health -= amount;
|
||||
if(health <= 0) onDeath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user