Fixed scaling / Improved power node visuals / Balancing
This commit is contained in:
@@ -160,14 +160,14 @@ public class Fx implements ContentList{
|
||||
healWave = new Effect(22, e -> {
|
||||
Draw.color(Pal.heal);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 30, 4f + e.finpow() * 60f);
|
||||
Lines.circle(e.x, e.y, 4f + e.finpow() * 60f);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
heal = new Effect(11, e -> {
|
||||
Draw.color(Pal.heal);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 24, 2f + e.finpow() * 7f);
|
||||
Lines.circle(e.x, e.y, 2f + e.finpow() * 7f);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
@@ -568,21 +568,21 @@ public class Fx implements ContentList{
|
||||
nuclearShockwave = new Effect(10f, 200f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
|
||||
Lines.stroke(e.fout() * 3f + 0.2f);
|
||||
Lines.poly(e.x, e.y, 40, e.fin() * 140f);
|
||||
Lines.circle(e.x, e.y, e.fin() * 140f);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
impactShockwave = new Effect(13f, 300f, e -> {
|
||||
Draw.color(Pal.lighterOrange, Color.LIGHT_GRAY, e.fin());
|
||||
Lines.stroke(e.fout() * 4f + 0.2f);
|
||||
Lines.poly(e.x, e.y, 60, e.fin() * 200f);
|
||||
Lines.circle(e.x, e.y, e.fin() * 200f);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
spawnShockwave = new Effect(20f, 400f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
|
||||
Lines.stroke(e.fout() * 3f + 0.5f);
|
||||
Lines.poly(e.x, e.y, 40, e.fin() * (e.rotation + 50f));
|
||||
Lines.circle(e.x, e.y, e.fin() * (e.rotation + 50f));
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
@@ -614,7 +614,7 @@ public class Fx implements ContentList{
|
||||
|
||||
e.scaled(5 + intensity * 2, i -> {
|
||||
Lines.stroke(3.1f * i.fout());
|
||||
Lines.poly(e.x, e.y, (int)(20 * intensity), (3f + i.fin() * 14f) * intensity);
|
||||
Lines.circle(e.x, e.y, (3f + i.fin() * 14f) * intensity);
|
||||
});
|
||||
|
||||
Draw.color(Color.GRAY);
|
||||
@@ -1157,21 +1157,21 @@ public class Fx implements ContentList{
|
||||
launch = new Effect(28, e -> {
|
||||
Draw.color(Pal.command);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 40, 4f + e.finpow() * 120f);
|
||||
Lines.circle(e.x, e.y, 4f + e.finpow() * 120f);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
healWaveMend = new Effect(40, e -> {
|
||||
Draw.color(e.color);
|
||||
Lines.stroke(e.fout() * 2f);
|
||||
Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation);
|
||||
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
overdriveWave = new Effect(50, e -> {
|
||||
Draw.color(e.color);
|
||||
Lines.stroke(e.fout() * 1f);
|
||||
Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation);
|
||||
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ public class Renderer implements ApplicationListener{
|
||||
if(settings.getBool("bloom")){
|
||||
setupBloom();
|
||||
}
|
||||
Lines.setCircleVertices(20);
|
||||
Shaders.init();
|
||||
|
||||
Effects.setScreenShakeProvider((intensity, duration) -> {
|
||||
|
||||
@@ -140,7 +140,7 @@ public class UI implements ApplicationListener{
|
||||
FreeTypeFontParameter outlined = new FreeTypeFontParameter(){{
|
||||
size = param.size;
|
||||
borderColor = Color.DARK_GRAY;
|
||||
borderWidth = 2f;
|
||||
borderWidth = UnitScl.dp.scl(2f);
|
||||
spaceX -= borderWidth;
|
||||
incremental = true;
|
||||
}};
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.anuke.arc.graphics.*;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.math.*;
|
||||
import io.anuke.arc.math.geom.*;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.content.*;
|
||||
import io.anuke.mindustry.entities.*;
|
||||
@@ -402,7 +403,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
Core.scene.skin.getFont("outline").draw(item.amount + "",
|
||||
x + Angles.trnsx(rotation + 180f, backTrns),
|
||||
y + Angles.trnsy(rotation + 180f, backTrns) - 3,
|
||||
Pal.accent, 0.25f * itemtime, false, Align.center
|
||||
Pal.accent, 0.25f * itemtime / UnitScl.dp.scl(1f), false, Align.center
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ public enum Gamemode{
|
||||
rules.pvp = true;
|
||||
rules.enemyCoreBuildRadius = 600f;
|
||||
rules.respawnTime = 60 * 10;
|
||||
rules.buildCostMultiplier = 0.5f;
|
||||
rules.buildSpeedMultiplier = 2f;
|
||||
rules.buildCostMultiplier = 1f;
|
||||
rules.buildSpeedMultiplier = 1f;
|
||||
rules.playerDamageMultiplier = 0.33f;
|
||||
rules.playerHealthMultiplier = 0.5f;
|
||||
rules.unitBuildSpeedMultiplier = 3f;
|
||||
rules.unitBuildSpeedMultiplier = 2f;
|
||||
rules.unitHealthMultiplier = 3f;
|
||||
rules.attackMode = true;
|
||||
}, map -> map.teams.size > 1),
|
||||
|
||||
@@ -21,14 +21,34 @@ public class Drawf{
|
||||
}
|
||||
|
||||
public static void circles(float x, float y, float rad, Color color){
|
||||
int vertices = (int)(rad * 2);
|
||||
Lines.stroke(3f, Pal.gray);
|
||||
Lines.poly(x, y, vertices, rad);
|
||||
Lines.circle(x, y, rad);
|
||||
Lines.stroke(1f, color);
|
||||
Lines.poly(x, y, vertices, rad);
|
||||
Lines.circle(x, y, rad);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
public static void square(float x, float y, float radius, Color color){
|
||||
Lines.stroke(3f, Pal.gray);
|
||||
Lines.square(x, y, radius + 1f, 45);
|
||||
Lines.stroke(1f, color);
|
||||
Lines.square(x, y, radius + 1f, 45);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
public static void square(float x, float y, float radius){
|
||||
square(x, y, radius, Pal.accent);
|
||||
}
|
||||
|
||||
/*
|
||||
public static void square(float x, float y, float radius){
|
||||
Lines.stroke(1f, Pal.gray);
|
||||
Lines.square(x, y - 1f, radius + 1f, 45);
|
||||
Lines.stroke(1f, Pal.accent);
|
||||
Lines.square(x, y, radius + 1f, 45);
|
||||
Draw.reset();
|
||||
}*/
|
||||
|
||||
public static void arrow(float x, float y, float x2, float y2, float length, float radius){
|
||||
float angle = Angles.angle(x, y, x2, y2);
|
||||
float space = 2f;
|
||||
|
||||
@@ -85,9 +85,9 @@ public class OverlayRenderer{
|
||||
float dst = Mathf.dst(player.x, player.y, core.drawx(), core.drawy());
|
||||
if(dst < state.rules.enemyCoreBuildRadius * 1.5f){
|
||||
Draw.color(Color.DARK_GRAY);
|
||||
Lines.poly(core.drawx(), core.drawy() - 2, 200, state.rules.enemyCoreBuildRadius);
|
||||
Lines.circle(core.drawx(), core.drawy() - 2, state.rules.enemyCoreBuildRadius);
|
||||
Draw.color(Pal.accent, enemy.color, 0.5f + Mathf.absin(Time.time(), 10f, 0.5f));
|
||||
Lines.poly(core.drawx(), core.drawy(), 200, state.rules.enemyCoreBuildRadius);
|
||||
Lines.circle(core.drawx(), core.drawy(), state.rules.enemyCoreBuildRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ public class MirrorFilter extends GenerateFilter{
|
||||
v1.trns(angle - 90, 1f);
|
||||
v2.set(v1).scl(-1f);
|
||||
|
||||
v1.add(in.width/2f, in.height/2f);
|
||||
v2.add(in.width/2f, in.height/2f);
|
||||
v1.add(in.width/2f - 0.5f, in.height/2f - 0.5f);
|
||||
v2.add(in.width/2f - 0.5f, in.height/2f - 0.5f);
|
||||
|
||||
v3.set(in.x, in.y);
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ public class Block extends BlockStorage{
|
||||
GlyphLayout layout = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
boolean ints = font.usesIntegerPositions();
|
||||
font.setUseIntegerPositions(false);
|
||||
font.getData().setScale(1f / 4f);
|
||||
font.getData().setScale(1f / 4f / UnitScl.dp.scl(1f));
|
||||
layout.setText(font, text);
|
||||
|
||||
float width = layout.width;
|
||||
|
||||
@@ -161,13 +161,12 @@ public class PowerNode extends PowerBlock{
|
||||
Lines.stroke(1f);
|
||||
|
||||
Draw.color(Pal.accent);
|
||||
Lines.poly(tile.drawx(), tile.drawy(), 50, laserRange * tilesize);
|
||||
Drawf.circles(tile.drawx(), tile.drawy(), laserRange * tilesize);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawConfigure(Tile tile){
|
||||
TileEntity entity = tile.entity();
|
||||
|
||||
Draw.color(Pal.accent);
|
||||
|
||||
@@ -185,15 +184,9 @@ public class PowerNode extends PowerBlock{
|
||||
|
||||
if(link != tile && linkValid(tile, link, false)){
|
||||
boolean linked = linked(tile, link);
|
||||
Draw.color(linked ? Pal.place : Pal.breakInvalid);
|
||||
|
||||
Lines.circle(link.drawx(), link.drawy(),
|
||||
link.block().size * tilesize / 2f + 1f + (linked ? 0f : Mathf.absin(Time.time(), 4f, 1f)));
|
||||
|
||||
if((entity.power.links.size >= maxNodes || (link.block() instanceof PowerNode && link.entity.power.links.size >= ((PowerNode)link.block()).maxNodes)) && !linked){
|
||||
Draw.color(Pal.breakInvalid);
|
||||
Lines.lineAngleCenter(link.drawx(), link.drawy(), 45, link.block().size * Mathf.sqrt2 * tilesize * 0.9f);
|
||||
Draw.color();
|
||||
if(linked){
|
||||
Drawf.square(link.drawx(), link.drawy(), link.block().size * tilesize / 2f + 1f, Pal.place);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,9 +197,24 @@ public class PowerNode extends PowerBlock{
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Tile tile = world.tile(x, y);
|
||||
|
||||
if(tile == null) return;
|
||||
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Pal.placing);
|
||||
Drawf.circles(x * tilesize + offset(), y * tilesize + offset(), laserRange * tilesize);
|
||||
|
||||
for(int cx = (int)(x - laserRange - 1); cx <= x + laserRange + 1; cx++){
|
||||
for(int cy = (int)(y - laserRange - 1); cy <= y + laserRange + 1; cy++){
|
||||
Tile link = world.ltile(cx, cy);
|
||||
|
||||
if(link != null && !(link.x == x && link.y == y) && link.block().hasPower && overlaps(x * tilesize + offset(), y *tilesize + offset(), link, laserRange * tilesize)){
|
||||
Drawf.square(link.drawx(), link.drawy(), link.block().size * tilesize / 2f + 2f, link.pos() == lastPlaced ? Pal.place : Pal.accent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@@ -246,8 +254,12 @@ public class PowerNode extends PowerBlock{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean overlaps(float srcx, float srcy, Tile other, float range){
|
||||
return Intersector.overlaps(Tmp.cr1.set(srcx, srcy, range), other.getHitbox(Tmp.r1));
|
||||
}
|
||||
|
||||
protected boolean overlaps(Tile src, Tile other, float range){
|
||||
return Intersector.overlaps(Tmp.cr1.set(src.drawx(), src.drawy(), range), other.getHitbox(Tmp.r1));
|
||||
return overlaps(src.drawx(), src.drawy(), other, range);
|
||||
}
|
||||
|
||||
protected void drawLaser(Tile tile, Tile target){
|
||||
|
||||
Reference in New Issue
Block a user