Changed some enemy shots and effects

This commit is contained in:
Anuken 2017-11-11 15:23:13 -05:00
parent 60a5782a24
commit ed3ac9df31
14 changed files with 115 additions and 81 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 714 B

BIN
core/assets/maps/test2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@ -573,21 +573,21 @@ blocks/shotgunturret
index: -1
blocks/shrub
rotate: false
xy: 230, 49
xy: 230, 39
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/shrubshadow
rotate: false
xy: 240, 59
xy: 240, 49
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/smelter
rotate: false
xy: 230, 39
xy: 240, 39
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -601,28 +601,28 @@ blocks/sniperturret
index: -1
blocks/sorter
rotate: false
xy: 240, 49
xy: 250, 115
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/steelconveyor
rotate: false
xy: 240, 39
xy: 260, 115
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/steelconveyormove
rotate: false
xy: 250, 115
xy: 250, 105
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/steelwall
rotate: false
xy: 260, 115
xy: 250, 95
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -636,49 +636,49 @@ blocks/stone
index: -1
blocks/stone1
rotate: false
xy: 250, 105
xy: 260, 105
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stone2
rotate: false
xy: 250, 95
xy: 250, 85
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stone3
rotate: false
xy: 260, 105
xy: 260, 95
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stoneblock
rotate: false
xy: 250, 85
xy: 250, 75
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stoneblock2
rotate: false
xy: 260, 95
xy: 260, 85
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stoneblock3
rotate: false
xy: 250, 75
xy: 250, 65
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/stonedrill
rotate: false
xy: 260, 85
xy: 260, 75
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -692,28 +692,28 @@ blocks/stoneedge
index: -1
blocks/stonewall
rotate: false
xy: 250, 65
xy: 250, 55
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/teleporter
rotate: false
xy: 260, 75
xy: 260, 65
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/teleporter-top
rotate: false
xy: 250, 55
xy: 250, 45
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/thermalgenerator
rotate: false
xy: 260, 65
xy: 260, 55
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -734,49 +734,49 @@ blocks/titancannon-icon
index: -1
blocks/titanium1
rotate: false
xy: 250, 45
xy: 260, 45
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titanium2
rotate: false
xy: 260, 55
xy: 250, 35
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titanium3
rotate: false
xy: 260, 45
xy: 260, 35
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titaniumdrill
rotate: false
xy: 250, 35
xy: 270, 109
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titaniumpurifier
rotate: false
xy: 260, 35
xy: 270, 99
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titaniumshieldwall
rotate: false
xy: 270, 109
xy: 280, 109
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/titaniumwall
rotate: false
xy: 270, 99
xy: 270, 89
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -790,7 +790,7 @@ blocks/titaniumwall-large
index: -1
blocks/titaniumwall-large-icon
rotate: false
xy: 280, 109
xy: 280, 99
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -804,35 +804,35 @@ blocks/turret
index: -1
blocks/uranium1
rotate: false
xy: 280, 99
xy: 270, 79
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/uranium2
rotate: false
xy: 290, 109
xy: 280, 89
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/uranium3
rotate: false
xy: 270, 79
xy: 290, 99
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/uraniumdrill
rotate: false
xy: 280, 89
xy: 300, 109
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
blocks/water
rotate: false
xy: 290, 99
xy: 270, 69
size: 8, 8
orig: 8, 8
offset: 0, 0
@ -1166,6 +1166,20 @@ mechs/player
orig: 12, 12
offset: 0, 0
index: -1
shot
rotate: false
xy: 230, 49
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
shot-long
rotate: false
xy: 240, 59
size: 8, 8
orig: 8, 8
offset: 0, 0
index: -1
ui/border
rotate: false
xy: 317, 199
@ -1636,7 +1650,7 @@ weapons/railgun
index: -1
weapons/triblaster
rotate: false
xy: 270, 89
xy: 290, 109
size: 8, 8
orig: 8, 8
offset: 0, 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -19,7 +19,6 @@ import io.anuke.mindustry.entities.enemies.*;
import io.anuke.mindustry.input.AndroidInput;
import io.anuke.mindustry.input.GestureHandler;
import io.anuke.mindustry.input.Input;
import io.anuke.mindustry.io.SaveIO;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.ItemStack;
import io.anuke.mindustry.resource.Weapon;
@ -401,17 +400,8 @@ public class Control extends Module{
public void update(){
if(debug){
if(Inputs.keyUp(Keys.O)){
Timers.mark();
SaveIO.write(Gdx.files.local("mapsave.mins"));
log("Save time taken: " + Timers.elapsed());
}
if(Inputs.keyUp(Keys.P)){
Timers.mark();
SaveIO.load(Gdx.files.local("mapsave.mins"));
log("Load time taken: " + Timers.elapsed());
Vars.renderer.clearTiles();
Effects.effect("blockexplosion", player);
}
if(Inputs.keyUp(Keys.C)){

View File

@ -93,14 +93,14 @@ public class EffectCreator{
Effects.create("shellexplosion", 15, e -> {
Draw.thickness(1.3f - e.ifract());
Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract()));
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
Draw.circle(e.x, e.y, 1f + e.ifract() * 7f);
Draw.reset();
});
Effects.create("blastexplosion", 16, e -> {
Draw.thickness(1.2f - e.ifract());
Draw.color(Hue.mix(Color.WHITE, Color.SCARLET, e.ifract()));
Draw.color(Color.WHITE, Color.SCARLET, e.ifract());
Draw.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
Draw.reset();
});
@ -112,21 +112,21 @@ public class EffectCreator{
});
Effects.create("purify", 10, e -> {
Draw.color(Hue.mix(Color.ROYAL, Color.GRAY, e.ifract()));
Draw.color(Color.ROYAL, Color.GRAY, e.ifract());
Draw.thickness(2f);
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.reset();
});
Effects.create("purifyoil", 10, e -> {
Draw.color(Hue.mix(Color.BLACK, Color.GRAY, e.ifract()));
Draw.color(Color.BLACK, Color.GRAY, e.ifract());
Draw.thickness(2f);
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.reset();
});
Effects.create("generate", 11, e -> {
Draw.color(Hue.mix(Color.ORANGE, Color.YELLOW, e.ifract()));
Draw.color(Color.ORANGE, Color.YELLOW, e.ifract());
Draw.thickness(1f);
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.reset();
@ -134,21 +134,21 @@ public class EffectCreator{
Effects.create("spark", 10, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GRAY, e.ifract()));
Draw.color(Color.WHITE, Color.GRAY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.reset();
});
Effects.create("sparkbig", 11, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(lightRed, Color.GRAY, e.ifract()));
Draw.color(lightRed, Color.GRAY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2.3f, 8);
Draw.reset();
});
Effects.create("smelt", 10, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.YELLOW, Color.RED, e.ifract()));
Draw.color(Color.YELLOW, Color.RED, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.reset();
});
@ -162,65 +162,92 @@ public class EffectCreator{
Effects.create("hit", 10, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract()));
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
Draw.reset();
});
Effects.create("laserhit", 10, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.SKY, e.ifract()));
Draw.color(Color.WHITE, Color.SKY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
Draw.reset();
});
Effects.create("shoot", 8, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract()));
Draw.color(Color.WHITE, Color.GOLD, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 2f, 2, 5);
Draw.reset();
});
Effects.create("shoot2", 8, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.SKY, e.ifract()));
Draw.color(Color.WHITE, Color.SKY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5);
Draw.reset();
});
Effects.create("shoot3", 8, e -> {
Draw.thickness(1f);
Draw.color(Hue.mix(Color.WHITE, Color.GOLD, e.ifract()));
Draw.color(Color.WHITE, Color.GOLD, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5);
Draw.reset();
});
Effects.create("railshoot", 8, e -> {
Draw.thickness(2f - e.ifract()*2f);
Draw.color(Hue.mix(Color.WHITE, Color.LIGHT_GRAY, e.ifract()));
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.spikes(e.x, e.y, 1f + e.ifract() * 4f, 1, 5);
Draw.reset();
});
Effects.create("mortarshoot", 9, e -> {
Draw.thickness(1.3f - e.ifract());
Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract()));
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.circle(e.x, e.y, e.ifract() * 5f + 1f);
Draw.reset();
});
Effects.create("explosion", 15, e -> {
Draw.thickness(2f);
Draw.color(Hue.mix(Color.ORANGE, Color.GRAY, e.ifract()));
Draw.spikes(e.x, e.y, 2f + e.ifract() * 3f, 4, 6);
Draw.circle(e.x, e.y, 3f + e.ifract() * 3f);
Effects.create("explosion", 11, e -> {
Draw.thickness(2f*e.fract()+0.5f);
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
Draw.circle(e.x, e.y, 5f + e.powfract() * 6f);
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
float rad = e.fract()*10f + 5f;
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
});
Draw.reset();
});
Effects.create("blockexplosion", 13, e -> {
Angles.randLenVectors(e.id+1, 8, 5f + e.ifract()*11f, (x, y)->{
float size = 2f+e.fract()*8f;
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
Draw.thickness(2f*e.fract()+0.4f);
Draw.color(Color.WHITE, Color.ORANGE, e.powfract());
Draw.circle(e.x, e.y, 2f + e.powfract() * 9f);
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
float rad = e.fract()*10f + 2f;
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
});
Draw.reset();
});
Effects.create("coreexplosion", 13, e -> {
Draw.thickness(3f-e.ifract()*2f);
Draw.color(Hue.mix(Color.ORANGE, Color.WHITE, e.ifract()));
Draw.color(Color.ORANGE, Color.WHITE, e.ifract());
Draw.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6);
Draw.circle(e.x, e.y, 4f + e.ifract() * 40f);
Draw.reset();
@ -242,7 +269,7 @@ public class EffectCreator{
Effects.create("spawn", 23, e -> {
Draw.thickness(2f);
Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract()));
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.ifract());
Draw.circle(e.x, e.y, 7f - e.ifract() * 6f);
Draw.reset();
});

View File

@ -7,21 +7,23 @@ import io.anuke.ucore.core.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.BaseBulletType;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
public abstract class BulletType extends BaseBulletType<Bullet>{
static Color glowy = Color.valueOf("fdc056");
static Color lightGold = Hue.mix(Color.GOLD, Color.WHITE, 0.4f);
public static final BulletType
none = new BulletType(0f, 0){
public void draw(Bullet b){
}
public void draw(Bullet b){}
},
stone = new BulletType(1.5f, 2){
public void draw(Bullet b){
Draw.color("gray");
Draw.square(b.x, b.y, 1f);
Draw.colorl(0.64f);
Draw.rect("blank", b.x, b.y, 2f, 2f);
Draw.reset();
}
},
@ -158,15 +160,15 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
},
small = new BulletType(1.5f, 1){
public void draw(Bullet b){
Draw.color("orange");
Draw.rect("bullet", b.x, b.y, b.angle());
Draw.color(glowy);
Draw.rect("shot", b.x, b.y, b.angle() - 45);
Draw.reset();
}
},
smallSlow = new BulletType(1.2f, 1){
public void draw(Bullet b){
Draw.color("orange");
Draw.rect("bullet", b.x, b.y, b.angle());
Draw.rect("shot", b.x, b.y, b.angle() - 45);
Draw.reset();
}
},
@ -209,12 +211,12 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
shot = new BulletType(2.4f, 2){
{lifetime = 40;}
public void draw(Bullet b){
Draw.color(Color.GOLD);
Draw.color(lightGold);
Draw.rect("bullet", b.x, b.y, b.angle());
Draw.reset();
}
},
shot2 = new BulletType(2.5f, 2){
multishot = new BulletType(2.5f, 2){
{lifetime=40;}
public void draw(Bullet b){
Draw.color(Color.SKY);

View File

@ -58,7 +58,7 @@ public class Enemy extends DestructibleEntity{
}
void move(){
boolean nearCore = distanceTo(World.core.worldx(), World.core.worldy()) <= range - 14f;
boolean nearCore = distanceTo(World.core.worldx(), World.core.worldy()) <= range - 18f;
Vector2 vec;

View File

@ -40,7 +40,7 @@ public enum Weapon{
}
},
multigun(6, BulletType.shot2, "Shoots inaccurate bullets with a high\nrate of fire.", stack(Item.iron, 60), stack(Item.steel, 20)){
multigun(6, BulletType.multishot, "Shoots inaccurate bullets with a high\nrate of fire.", stack(Item.iron, 60), stack(Item.steel, 20)){
@Override
public void shoot(Player p){
float ang = mouseAngle(p);

View File

@ -26,7 +26,7 @@ public class Block{
/**display name*/
public String formalName;
/**played on destroy*/
public String explosionEffect = "explosion";
public String explosionEffect = "blockexplosion";
/**played on destroy*/
public String explosionSound = "break";
/**whether this block has a tile entity that updates*/

View File

@ -10,7 +10,8 @@ public enum Map{
maze4("test"),
maze5("test"),
tutorial(false),
test(false);
test1(false),
test2(false);
public final boolean visible;
public final String description;

View File

@ -21,7 +21,7 @@ public class WeaponBlocks{
turret = new Turret("turret"){
{
formalName = "turret";
range = 50;
range = 52;
reload = 15f;
bullet = BulletType.stone;
ammo = Item.stone;
@ -31,7 +31,7 @@ public class WeaponBlocks{
doubleturret = new Turret("doubleturret"){
{
formalName = "double turret";
range = 40;
range = 44;
reload = 13f;
bullet = BulletType.stone;
ammo = Item.stone;