Lightning turret tweaks / Beginning of teleporter rework

This commit is contained in:
Anuken 2018-04-06 16:59:31 -04:00
parent d67402e6aa
commit 7a65604cc8
8 changed files with 217 additions and 180 deletions

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

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Fri Apr 06 15:12:13 EDT 2018
#Fri Apr 06 16:57:38 EDT 2018
version=release
androidBuildCode=856
androidBuildCode=857
name=Mindustry
code=3.4
build=custom build

View File

@ -115,7 +115,7 @@ public class WeaponBlocks{
chargeMaxDelay = 30f;
chargeEffects = 7;
shootEffect = ShootFx.lightningShoot;
chargeEffect = ShootFx.lancerLaserCharge;
chargeEffect = ShootFx.lightningCharge;
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
heatColor = Color.RED;
recoil = 3f;

View File

@ -184,7 +184,7 @@ public class TurretBullets {
@Override
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();
}
};

View File

@ -188,6 +188,16 @@ public class ShootFx {
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 -> {
Draw.color(Color.WHITE, Palette.lancerLaser, e.fin());
Lines.stroke(e.fout() * 1.2f + 0.5f);

View File

@ -3,16 +3,22 @@ package io.anuke.mindustry.world.blocks.types.distribution;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectSet;
import io.anuke.mindustry.content.fx.Fx;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.BarType;
import io.anuke.mindustry.world.Tile;
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.Fill;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.scene.ui.ButtonGroup;
import io.anuke.ucore.scene.ui.ImageButton;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;
import java.io.DataInputStream;
@ -33,6 +39,8 @@ public class Teleporter extends PowerBlock{
private Array<Tile> returns = new Array<>();
protected float powerPerItem = 5f;
protected float warmupTime = 80f;
protected Effect teleportEffect = Fx.none;
static{
for(int i = 0; i < colors; i ++){
@ -84,9 +92,21 @@ public class Teleporter extends PowerBlock{
Draw.color(colorArray[entity.color]);
Draw.rect("teleporter-top", tile.drawx(), tile.drawy());
//Draw.color(Color.WHITE);
//Draw.alpha(0.45f + Mathf.absin(Timers.time(), 7f, 0.26f));
//Draw.rect("teleporter-top", tile.worldx(), tile.worldy());
Draw.reset();
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();
}