New weapon factory sprites, ready to merge

This commit is contained in:
Anuken
2018-01-08 17:29:07 -05:00
parent eba6c9bb8e
commit adba601256
15 changed files with 283 additions and 258 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 459 B

+1 -1
View File
@@ -281,7 +281,7 @@ upgrade.clustergun.name=clustergun
upgrade.clustergun.description=Shoots an inaccurate spread of explosive grenades. upgrade.clustergun.description=Shoots an inaccurate spread of explosive grenades.
upgrade.beam.name=beam cannon upgrade.beam.name=beam cannon
upgrade.beam.description=Shoots a long-range piercing laser beam. upgrade.beam.description=Shoots a long-range piercing laser beam.
upgrade.vulcan.name=railgun upgrade.vulcan.name=vulcan
upgrade.vulcan.description=Shoots a barrage of fast bullets. upgrade.vulcan.description=Shoots a barrage of fast bullets.
upgrade.shockgun.name=shockgun upgrade.shockgun.name=shockgun
upgrade.shockgun.description=Shoots a devastating blast of charged shrapnel. upgrade.shockgun.description=Shoots a devastating blast of charged shrapnel.
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

@@ -227,8 +227,8 @@ public class Control extends Module{
player.weaponLeft = player.weaponRight = weapons.first(); player.weaponLeft = player.weaponRight = weapons.first();
if(debug){ if(debug){
weapons.add(Weapon.triblaster, Weapon.clustergun, Weapon.beam, Weapon.vulcan); //weapons.add(Weapon.triblaster, Weapon.clustergun, Weapon.beam, Weapon.vulcan);
weapons.add(Weapon.shockgun); //weapons.add(Weapon.shockgun);
player.weaponLeft = player.weaponRight = weapons.peek(); player.weaponLeft = player.weaponRight = weapons.peek();
} }
@@ -2,6 +2,7 @@ package io.anuke.mindustry.core;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Colors;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Vector2;
@@ -324,6 +325,16 @@ public class Renderer extends RendererModule{
} }
Draw.reset(); 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 tilex = control.input.getBlockX();
int tiley = control.input.getBlockY(); int tiley = control.input.getBlockY();
@@ -268,7 +268,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.reset(); Draw.reset();
} }
}, },
shot = new BulletType(2.7f, 4){ shot = new BulletType(2.7f, 5){
{ {
lifetime = 40; lifetime = 40;
} }
@@ -302,8 +302,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){ public void draw(Bullet b){
Draw.thick(2f); Draw.thick(2f);
Draw.color(lightOrange); Draw.color(lightOrange, Color.WHITE, 0.4f);
Draw.circle(b.x, b.y, 1.6f); Draw.polygon(b.y, b.x, 3, 1.6f, b.angle());
Draw.thick(1f); Draw.thick(1f);
Draw.color(Color.WHITE, lightOrange, b.ifract()/2f); Draw.color(Color.WHITE, lightOrange, b.ifract()/2f);
Draw.alpha(b.ifract()); Draw.alpha(b.ifract());
@@ -316,7 +316,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
} }
public void removed(Bullet b){ public void removed(Bullet b){
Effects.shake(1f, 1f, b); Effects.shake(1.5f, 1.5f, b);
Effects.effect(Fx.clusterbomb, b); Effects.effect(Fx.clusterbomb, b);
@@ -84,7 +84,7 @@ public class EMP extends TimedEntity{
} }
Draw.thick(fract()*2f); Draw.thick(fract()*2f);
Draw.polygon(34, x, y, radius * Vars.tilesize); Draw.polygon(y, x, 34, radius * Vars.tilesize);
Draw.reset(); Draw.reset();
} }
+2 -2
View File
@@ -121,7 +121,7 @@ public class Fx{
nuclearShockwave = new Effect(10f, 200f, e -> { nuclearShockwave = new Effect(10f, 200f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract()); Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.thick(e.fract()*3f + 0.2f); 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(); Draw.reset();
}), }),
@@ -452,7 +452,7 @@ public class Fx{
clusterbomb = new Effect(10f, e -> { clusterbomb = new Effect(10f, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract()); Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.thick(e.fract()*1.5f); 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.circle(e.x, e.y, e.ifract()*14f);
Draw.reset(); 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); 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){ }else if(android && control.getInput().breaktime > 0){
Draw.color(Colors.get("breakStart"), Colors.get("break"), fract); 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(); Draw.reset();
} }
@@ -238,9 +238,9 @@ public class MapView extends Element implements GestureListener{
Draw.thick(Unit.dp.scl(3f * zoom)); Draw.thick(Unit.dp.scl(3f * zoom));
Draw.line(sx, sy, v2.x, v2.y); 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(); 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.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.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.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.stonedrill, stack(Item.stone, 12)),
new Recipe(production, ProductionBlocks.irondrill, stack(Item.stone, 25)), 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){ vulcan = new Weapon("vulcan", 5, BulletType.vulcan){
{ {
shootsound = "vulcan";
effect = Fx.vulcanShoot; effect = Fx.vulcanShoot;
inaccuracy = 5; inaccuracy = 5;
roundrobin = true; roundrobin = true;
@@ -23,6 +23,14 @@ public class BlockConfigFragment implements Fragment {
Core.scene.add(table); Core.scene.add(table);
} }
public boolean isShown(){
return table.isVisible() && configTile != null;
}
public Tile getSelectedTile(){
return configTile;
}
public void showConfig(Tile tile){ public void showConfig(Tile tile){
configTile = tile; configTile = tile;