Changed some enemy shots and effects
This commit is contained in:
@@ -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)){
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user