Added self-destruct bullet property

This commit is contained in:
Anuken
2020-01-19 10:43:38 -05:00
parent 87b4c37d82
commit b1df52e0c8
5 changed files with 20 additions and 26 deletions

View File

@@ -1,10 +1,8 @@
package mindustry.content;
import arc.struct.*;
import mindustry.ctype.ContentList;
import mindustry.ctype.*;
import mindustry.entities.bullet.*;
import mindustry.entities.type.*;
import mindustry.entities.type.Bullet;
import mindustry.entities.type.base.*;
import mindustry.gen.*;
import mindustry.type.*;
@@ -103,23 +101,14 @@ public class UnitTypes implements ContentList{
reload = 12f;
ejectEffect = Fx.none;
shootSound = Sounds.explosion;
bullet = new BombBulletType(2f, 3f, "clear"){
{
hitEffect = Fx.pulverize;
lifetime = 30f;
speed = 1.1f;
splashDamageRadius = 55f;
splashDamage = 30f;
}
@Override
public void init(Bullet b){
if(b.getOwner() instanceof Unit){
((Unit)b.getOwner()).kill();
}
b.time(b.lifetime());
}
};
bullet = new BombBulletType(2f, 3f, "clear"){{
hitEffect = Fx.pulverize;
lifetime = 2f;
speed = 1.1f;
splashDamageRadius = 55f;
splashDamage = 30f;
killShooter = true;
}};
}};
}};