Moved unit-related classes, added base flying types
This commit is contained in:
@@ -114,7 +114,10 @@ public class Recipes {
|
||||
new Recipe(liquid, LiquidBlocks.pump, stack(Items.steel, 10)),
|
||||
new Recipe(liquid, LiquidBlocks.fluxpump, stack(Items.steel, 10), stack(Items.densealloy, 5)),
|
||||
|
||||
new Recipe(units, UnitBlocks.flierFactory, stack(Items.steel, 10)),
|
||||
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
|
||||
new Recipe(units, UnitBlocks.vtolFactory, stack(Items.steel, 10)),
|
||||
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
|
||||
new Recipe(units, UnitBlocks.droneFactory, stack(Items.steel, 10)),
|
||||
new Recipe(units, UnitBlocks.walkerFactory, stack(Items.steel, 10)),
|
||||
|
||||
new Recipe(units, DebugBlocks.itemSource, stack(Items.steel, 10)).setDebug(),
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import io.anuke.mindustry.entities.units.UnitType;
|
||||
import io.anuke.mindustry.entities.units.types.Flier;
|
||||
import io.anuke.mindustry.entities.units.types.Vtol;
|
||||
import io.anuke.mindustry.entities.units.types.Scout;
|
||||
|
||||
public class UnitTypes {
|
||||
public static final UnitType
|
||||
|
||||
drone = new Vtol(),
|
||||
scout = new Scout(),
|
||||
flier = new Flier();
|
||||
vtol = new Vtol();
|
||||
}
|
||||
|
||||
@@ -4,13 +4,22 @@ import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.UnitTypes;
|
||||
import io.anuke.mindustry.resource.ItemStack;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.types.production.UnitFactory;
|
||||
import io.anuke.mindustry.world.blocks.types.units.UnitFactory;
|
||||
|
||||
public class UnitBlocks {
|
||||
public static final Block
|
||||
|
||||
flierFactory = new UnitFactory("flierfactory"){{
|
||||
type = UnitTypes.flier;
|
||||
droneFactory = new UnitFactory("dronefactory"){{
|
||||
type = UnitTypes.drone;
|
||||
produceTime = 200;
|
||||
size = 2;
|
||||
requirements = new ItemStack[]{
|
||||
new ItemStack(Items.stone, 5)
|
||||
};
|
||||
}},
|
||||
|
||||
vtolFactory = new UnitFactory("vtolfactory"){{
|
||||
type = UnitTypes.vtol;
|
||||
produceTime = 200;
|
||||
size = 2;
|
||||
requirements = new ItemStack[]{
|
||||
|
||||
@@ -123,7 +123,7 @@ public class TurretBullets {
|
||||
hiteffect = BulletFx.hitLancer;
|
||||
despawneffect = Fx.none;
|
||||
hitsize = 4;
|
||||
lifetime = 20f;
|
||||
lifetime = 16f;
|
||||
pierce = true;
|
||||
}
|
||||
|
||||
@@ -134,12 +134,15 @@ public class TurretBullets {
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b) {
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), length);
|
||||
float f = Mathf.curve(b.fin(), 0f, 0.2f);
|
||||
float baseLen = length * f;
|
||||
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), baseLen);
|
||||
for(int s = 0; s < 3; s ++) {
|
||||
Draw.color(colors[s]);
|
||||
for (int i = 0; i < tscales.length; i++) {
|
||||
Lines.stroke(7f * b.fout() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]);
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), length * lenscales[i]);
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), baseLen * lenscales[i]);
|
||||
}
|
||||
}
|
||||
Draw.reset();
|
||||
|
||||
Reference in New Issue
Block a user