New weapon factory sprites, ready to merge
This commit is contained in:
@@ -227,8 +227,8 @@ public class Control extends Module{
|
||||
player.weaponLeft = player.weaponRight = weapons.first();
|
||||
|
||||
if(debug){
|
||||
weapons.add(Weapon.triblaster, Weapon.clustergun, Weapon.beam, Weapon.vulcan);
|
||||
weapons.add(Weapon.shockgun);
|
||||
//weapons.add(Weapon.triblaster, Weapon.clustergun, Weapon.beam, Weapon.vulcan);
|
||||
//weapons.add(Weapon.shockgun);
|
||||
player.weaponLeft = player.weaponRight = weapons.peek();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.core;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
@@ -324,6 +325,16 @@ public class Renderer extends RendererModule{
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
//draw config selected block
|
||||
if(Vars.ui.configfrag.isShown()){
|
||||
Tile tile = ui.configfrag.getSelectedTile();
|
||||
Draw.color(Colors.get("accent"));
|
||||
Draw.thick(1f);
|
||||
Draw.square(tile.worldx() + tile.block().getPlaceOffset().x, tile.worldy() + tile.block().getPlaceOffset().y,
|
||||
tile.block().width * Vars.tilesize / 2f + 1f);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
int tilex = control.input.getBlockX();
|
||||
int tiley = control.input.getBlockY();
|
||||
|
||||
@@ -268,7 +268,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
Draw.reset();
|
||||
}
|
||||
},
|
||||
shot = new BulletType(2.7f, 4){
|
||||
shot = new BulletType(2.7f, 5){
|
||||
{
|
||||
lifetime = 40;
|
||||
}
|
||||
@@ -302,8 +302,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
|
||||
public void draw(Bullet b){
|
||||
Draw.thick(2f);
|
||||
Draw.color(lightOrange);
|
||||
Draw.circle(b.x, b.y, 1.6f);
|
||||
Draw.color(lightOrange, Color.WHITE, 0.4f);
|
||||
Draw.polygon(b.y, b.x, 3, 1.6f, b.angle());
|
||||
Draw.thick(1f);
|
||||
Draw.color(Color.WHITE, lightOrange, b.ifract()/2f);
|
||||
Draw.alpha(b.ifract());
|
||||
@@ -316,7 +316,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||
}
|
||||
|
||||
public void removed(Bullet b){
|
||||
Effects.shake(1f, 1f, b);
|
||||
Effects.shake(1.5f, 1.5f, b);
|
||||
|
||||
Effects.effect(Fx.clusterbomb, b);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class EMP extends TimedEntity{
|
||||
}
|
||||
|
||||
Draw.thick(fract()*2f);
|
||||
Draw.polygon(34, x, y, radius * Vars.tilesize);
|
||||
Draw.polygon(y, x, 34, radius * Vars.tilesize);
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class Fx{
|
||||
nuclearShockwave = new Effect(10f, 200f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||
Draw.thick(e.fract()*3f + 0.2f);
|
||||
Draw.polygon(40, e.x, e.y, e.ifract()*140f);
|
||||
Draw.polygon(e.y, e.x, 40, e.ifract()*140f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
@@ -452,7 +452,7 @@ public class Fx{
|
||||
clusterbomb = new Effect(10f, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Draw.thick(e.fract()*1.5f);
|
||||
Draw.polygon(4, e.x, e.y, e.fract()*8f);
|
||||
Draw.polygon(e.y, e.x, 4, e.fract()*8f);
|
||||
Draw.circle(e.x, e.y, e.ifract()*14f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
@@ -101,7 +101,7 @@ public enum PlaceMode{
|
||||
Draw.linecrect(tile.worldx() + offset.x, tile.worldy() + offset.y, tile.block().width * Vars.tilesize, tile.block().height * Vars.tilesize);
|
||||
}else if(android && control.getInput().breaktime > 0){
|
||||
Draw.color(Colors.get("breakStart"), Colors.get("break"), fract);
|
||||
Draw.polygon(25, tile.worldx() + offset.x, tile.worldy() + offset.y, 4 + (1f - fract) * 26);
|
||||
Draw.polygon(tile.worldy() + offset.y, tile.worldx() + offset.x, 25, 4 + (1f - fract) * 26);
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@@ -238,9 +238,9 @@ public class MapView extends Element implements GestureListener{
|
||||
Draw.thick(Unit.dp.scl(3f * zoom));
|
||||
Draw.line(sx, sy, v2.x, v2.y);
|
||||
|
||||
Draw.polygon(40, sx, sy, editor.getBrushSize() * zoom * 3);
|
||||
Draw.polygon(sy, sx, 40, editor.getBrushSize() * zoom * 3);
|
||||
|
||||
Draw.polygon(40, v2.x, v2.y, editor.getBrushSize() * zoom * 3);
|
||||
Draw.polygon(v2.y, v2.x, 40, editor.getBrushSize() * zoom * 3);
|
||||
}
|
||||
|
||||
batch.flush();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Recipes {
|
||||
new Recipe(crafting, ProductionBlocks.oilrefinery, stack(Item.steel, 15), stack(Item.iron, 15)),
|
||||
new Recipe(crafting, ProductionBlocks.stoneformer, stack(Item.steel, 10), stack(Item.iron, 10)),
|
||||
new Recipe(crafting, ProductionBlocks.lavasmelter, stack(Item.steel, 30), stack(Item.titanium, 15)),
|
||||
new Recipe(crafting, ProductionBlocks.weaponFactory, stack(Item.steel, 30), stack(Item.titanium, 15)),
|
||||
new Recipe(crafting, ProductionBlocks.weaponFactory, stack(Item.steel, 60), stack(Item.iron, 60)),
|
||||
|
||||
new Recipe(production, ProductionBlocks.stonedrill, stack(Item.stone, 12)),
|
||||
new Recipe(production, ProductionBlocks.irondrill, stack(Item.stone, 25)),
|
||||
|
||||
@@ -47,7 +47,6 @@ public class Weapon extends Upgrade{
|
||||
},
|
||||
vulcan = new Weapon("vulcan", 5, BulletType.vulcan){
|
||||
{
|
||||
shootsound = "vulcan";
|
||||
effect = Fx.vulcanShoot;
|
||||
inaccuracy = 5;
|
||||
roundrobin = true;
|
||||
|
||||
@@ -23,6 +23,14 @@ public class BlockConfigFragment implements Fragment {
|
||||
Core.scene.add(table);
|
||||
}
|
||||
|
||||
public boolean isShown(){
|
||||
return table.isVisible() && configTile != null;
|
||||
}
|
||||
|
||||
public Tile getSelectedTile(){
|
||||
return configTile;
|
||||
}
|
||||
|
||||
public void showConfig(Tile tile){
|
||||
configTile = tile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user