Lightning turret tweaks / Beginning of teleporter rework
This commit is contained in:
BIN
core/assets-raw/sprites/blocks/turrets/teslaturret-heat.png
Normal file
BIN
core/assets-raw/sprites/blocks/turrets/teslaturret-heat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 180 B |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
@@ -1,7 +1,7 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Fri Apr 06 15:12:13 EDT 2018
|
#Fri Apr 06 16:57:38 EDT 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=856
|
androidBuildCode=857
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
code=3.4
|
code=3.4
|
||||||
build=custom build
|
build=custom build
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class WeaponBlocks{
|
|||||||
chargeMaxDelay = 30f;
|
chargeMaxDelay = 30f;
|
||||||
chargeEffects = 7;
|
chargeEffects = 7;
|
||||||
shootEffect = ShootFx.lightningShoot;
|
shootEffect = ShootFx.lightningShoot;
|
||||||
chargeEffect = ShootFx.lancerLaserCharge;
|
chargeEffect = ShootFx.lightningCharge;
|
||||||
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
|
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
|
||||||
heatColor = Color.RED;
|
heatColor = Color.RED;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class TurretBullets {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Bullet b) {
|
public void init(Bullet b) {
|
||||||
new Lightning(b.team, hiteffect, damage, b.x, b.y, b.angle(), 40).add();
|
new Lightning(b.team, hiteffect, damage, b.x, b.y, b.angle(), 30).add();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -188,6 +188,16 @@ public class ShootFx {
|
|||||||
Fill.circle(e.x, e.y, e.fin() * 2f);
|
Fill.circle(e.x, e.y, e.fin() * 2f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
lightningCharge = new Effect(38f, e -> {
|
||||||
|
Draw.color(Palette.lancerLaser);
|
||||||
|
|
||||||
|
Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> {
|
||||||
|
Shapes.tri(e.x + x, e.y + y, e.fslope()*3f + 1, e.fslope()*3f + 1, Mathf.atan2(x, y));
|
||||||
|
});
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
lightningShoot= new Effect(12f, e -> {
|
lightningShoot= new Effect(12f, e -> {
|
||||||
Draw.color(Color.WHITE, Palette.lancerLaser, e.fin());
|
Draw.color(Color.WHITE, Palette.lancerLaser, e.fin());
|
||||||
Lines.stroke(e.fout() * 1.2f + 0.5f);
|
Lines.stroke(e.fout() * 1.2f + 0.5f);
|
||||||
|
|||||||
@@ -3,16 +3,22 @@ package io.anuke.mindustry.world.blocks.types.distribution;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import com.badlogic.gdx.utils.ObjectSet;
|
import com.badlogic.gdx.utils.ObjectSet;
|
||||||
|
import io.anuke.mindustry.content.fx.Fx;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.BarType;
|
import io.anuke.mindustry.world.BarType;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
||||||
|
import io.anuke.ucore.core.Effects.Effect;
|
||||||
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.graphics.Draw;
|
import io.anuke.ucore.graphics.Draw;
|
||||||
|
import io.anuke.ucore.graphics.Fill;
|
||||||
|
import io.anuke.ucore.graphics.Lines;
|
||||||
import io.anuke.ucore.scene.ui.ButtonGroup;
|
import io.anuke.ucore.scene.ui.ButtonGroup;
|
||||||
import io.anuke.ucore.scene.ui.ImageButton;
|
import io.anuke.ucore.scene.ui.ImageButton;
|
||||||
import io.anuke.ucore.scene.ui.layout.Table;
|
import io.anuke.ucore.scene.ui.layout.Table;
|
||||||
|
import io.anuke.ucore.util.Mathf;
|
||||||
import io.anuke.ucore.util.Strings;
|
import io.anuke.ucore.util.Strings;
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
@@ -33,6 +39,8 @@ public class Teleporter extends PowerBlock{
|
|||||||
private Array<Tile> returns = new Array<>();
|
private Array<Tile> returns = new Array<>();
|
||||||
|
|
||||||
protected float powerPerItem = 5f;
|
protected float powerPerItem = 5f;
|
||||||
|
protected float warmupTime = 80f;
|
||||||
|
protected Effect teleportEffect = Fx.none;
|
||||||
|
|
||||||
static{
|
static{
|
||||||
for(int i = 0; i < colors; i ++){
|
for(int i = 0; i < colors; i ++){
|
||||||
@@ -84,9 +92,21 @@ public class Teleporter extends PowerBlock{
|
|||||||
|
|
||||||
Draw.color(colorArray[entity.color]);
|
Draw.color(colorArray[entity.color]);
|
||||||
Draw.rect("teleporter-top", tile.drawx(), tile.drawy());
|
Draw.rect("teleporter-top", tile.drawx(), tile.drawy());
|
||||||
//Draw.color(Color.WHITE);
|
Draw.reset();
|
||||||
//Draw.alpha(0.45f + Mathf.absin(Timers.time(), 7f, 0.26f));
|
|
||||||
//Draw.rect("teleporter-top", tile.worldx(), tile.worldy());
|
Draw.color(Color.WHITE);
|
||||||
|
|
||||||
|
Fill.circle(tile.drawx(), tile.drawy(), 7f);
|
||||||
|
|
||||||
|
Draw.color(Color.PURPLE);
|
||||||
|
|
||||||
|
for(int i = 0; i < 11; i ++){
|
||||||
|
Lines.swirl(tile.drawx(), tile.drawy(),
|
||||||
|
3f + i/3f + Mathf.sin(Timers.time() + i *93, 20f + i, 3f),
|
||||||
|
0.2f + Mathf.sin(Timers.time() + i *33, 10f + i, 0.1f),
|
||||||
|
Timers.time() * (1f + Mathf.randomSeedRange(i + 1, 1f)) + Mathf.randomSeedRange(i, 360f));
|
||||||
|
}
|
||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user