mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Lightning turret tweaks / Beginning of teleporter rework
This commit is contained in:
parent
d67402e6aa
commit
7a65604cc8
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.
|
||||
#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
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user