Changed power generation system, made generator blocks explode

This commit is contained in:
Anuken
2017-11-02 18:42:42 -04:00
parent 6c390b16e4
commit 5e16fbffc9
14 changed files with 183 additions and 114 deletions

View File

@@ -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());

View File

@@ -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();
}