implement content
This commit is contained in:
@@ -119,6 +119,10 @@ public class Damage{
|
||||
collidedBlocks.add(tile.pos());
|
||||
hitter.type.hit(hitter, tile.x, tile.y);
|
||||
}
|
||||
//can heal?
|
||||
if(tile != null && !collidedBlocks.contains(tile.pos()) && hitter.type.collides(hitter, tile)){
|
||||
hitter.type.hitTile(hitter, tile, 0f);
|
||||
}
|
||||
};
|
||||
|
||||
if(hitter.type.collidesGround){
|
||||
|
||||
@@ -36,7 +36,13 @@ public class Lightning{
|
||||
random.setSeed(seed);
|
||||
hit.clear();
|
||||
|
||||
BulletType bulletType = hitter != null && !hitter.type.collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
||||
BulletType bulletType;
|
||||
if(hitter != null && hitter.type.lightningHitter != null) {
|
||||
bulletType = hitter.type.lightningHitter;
|
||||
} else {
|
||||
bulletType = hitter != null && !hitter.type.collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
||||
}
|
||||
|
||||
Seq<Vec2> lines = new Seq<>();
|
||||
bhit = false;
|
||||
|
||||
|
||||
@@ -112,6 +112,8 @@ public abstract class BulletType extends Content{
|
||||
public float lightningDamage = -1;
|
||||
public float lightningCone = 360f;
|
||||
public float lightningAngle = 0f;
|
||||
/** The lighting "hitter"; Use when trying to implement special lightning. */
|
||||
public BulletType lightningHitter;
|
||||
|
||||
public float weaveScale = 1f;
|
||||
public float weaveMag = -1f;
|
||||
|
||||
Reference in New Issue
Block a user