Implemented 'railgun' turret / Hierarchy split / Color refactoring
This commit is contained in:
@@ -8,5 +8,7 @@ public class AmmoTypes {
|
||||
|
||||
basicIron = new AmmoType(Items.iron, TurretBullets.basicIron, 5, 0.9f),
|
||||
|
||||
basicSteel = new AmmoType(Items.steel, TurretBullets.basicSteel, 5, 0.8f),
|
||||
|
||||
basicFlame = new AmmoType(Liquids.oil, TurretBullets.basicFlame, 0.3f, 0.9f);
|
||||
}
|
||||
|
||||
@@ -6,10 +6,7 @@ import io.anuke.mindustry.resource.AmmoType;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.LaserTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.Turret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.turrets.BurstTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.turrets.DoubleTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.turrets.LiquidTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.turrets.PowerTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.turrets.*;
|
||||
|
||||
public class WeaponBlocks{
|
||||
public static Block
|
||||
@@ -44,13 +41,31 @@ public class WeaponBlocks{
|
||||
ammoUseEffect = BulletFx.shellEjectSmall;
|
||||
}},
|
||||
|
||||
railgunturret = new Turret("railgunturret"){
|
||||
|
||||
},
|
||||
railgunturret = new ItemTurret("railgunturret"){{
|
||||
range = 100f;
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.basicSteel};
|
||||
reload = 100f;
|
||||
restitution = 0.03f;
|
||||
ammoEjectBack = 2f;
|
||||
recoil = 3f;
|
||||
shootShake = 2f;
|
||||
shootEffect = BulletFx.shootBig;
|
||||
smokeEffect = BulletFx.shootBigSmoke;
|
||||
ammoUseEffect = BulletFx.shellEjectBig;
|
||||
}},
|
||||
|
||||
flakturret = new Turret("flakturret"){
|
||||
|
||||
},
|
||||
flakturret = new ItemTurret("flakturret"){{
|
||||
range = 100f;
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.basicSteel};
|
||||
reload = 100f;
|
||||
restitution = 0.03f;
|
||||
ammoEjectBack = 2f;
|
||||
recoil = 3f;
|
||||
shootShake = 2f;
|
||||
shootEffect = BulletFx.shootBig;
|
||||
smokeEffect = BulletFx.shootBigSmoke;
|
||||
ammoUseEffect = BulletFx.shellEjectBig;
|
||||
}},
|
||||
|
||||
laserturret = new LaserTurret("laserturret"){
|
||||
|
||||
|
||||
@@ -1,24 +1,39 @@
|
||||
package io.anuke.mindustry.content.bullets;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import io.anuke.mindustry.entities.Bullet;
|
||||
import io.anuke.mindustry.entities.BulletType;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||
import io.anuke.mindustry.graphics.fx.Fx;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
|
||||
public class TurretBullets {
|
||||
|
||||
public static final BulletType
|
||||
|
||||
basicIron = new BulletType(3f, 0) {
|
||||
@Override
|
||||
public void draw(Bullet b) {
|
||||
Draw.color(Color.valueOf("f3d47f"));
|
||||
Draw.color(Palette.bulletYellow);
|
||||
Draw.rect("bullet", b.x, b.y, 9f, 5f + b.fract()*7f, b.angle() - 90);
|
||||
Draw.color();
|
||||
}
|
||||
},
|
||||
|
||||
basicSteel = new BulletType(6f, 0) {
|
||||
{
|
||||
hiteffect = BulletFx.hitBulletBig;
|
||||
knockback = 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b) {
|
||||
Draw.color(Palette.bulletYellow);
|
||||
Draw.rect("bullet", b.x, b.y, 11f, 9f + b.fract()*8f, b.angle() - 90);
|
||||
Draw.color();
|
||||
}
|
||||
},
|
||||
|
||||
basicFlame = new BulletType(2f, 4) {
|
||||
{
|
||||
hitsize = 7f;
|
||||
|
||||
Reference in New Issue
Block a user