Project-wide refactoring, link crash fixes

This commit is contained in:
Anuken
2018-01-24 16:48:07 -05:00
parent 257335ebaf
commit 8c39e05f58
60 changed files with 302 additions and 303 deletions

View File

@@ -35,7 +35,8 @@ import io.anuke.ucore.core.Inputs.Axis;
import io.anuke.ucore.core.Inputs.DeviceType;
import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.graphics.Atlas;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Atlas;
import io.anuke.ucore.modules.Module;
import io.anuke.ucore.scene.ui.layout.Unit;
import io.anuke.ucore.util.Input;
@@ -97,7 +98,7 @@ public class Control extends Module{
block.postInit();
}
Draw.setCircleVertices(14);
Lines.setCircleVertices(14);
Gdx.input.setCatchBackKey(true);

View File

@@ -64,7 +64,7 @@ public class NetServer extends Module{
if(Vars.world.getMap().custom){
ByteArrayOutputStream stream = new ByteArrayOutputStream();
NetworkIO.writeMap(Vars.world.getMap(), stream);
NetworkIO.writeMap(Vars.world.getMap().pixmap, stream);
CustomMapPacket data = new CustomMapPacket();
data.stream = new ByteArrayInputStream(stream.toByteArray());
Net.sendStream(id, data);

View File

@@ -28,7 +28,9 @@ import io.anuke.ucore.entities.DestructibleEntity;
import io.anuke.ucore.entities.EffectEntity;
import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.function.Callable;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Surface;
import io.anuke.ucore.modules.RendererModule;
import io.anuke.ucore.scene.ui.layout.Unit;
@@ -317,14 +319,14 @@ public class Renderer extends RendererModule{
int y = control.core.y + Vars.control.tutorial.getPlacePoint().y;
int rot = Vars.control.tutorial.getPlaceRotation();
Draw.thick(1f);
Lines.stroke(1f);
Draw.color(Color.YELLOW);
Draw.square(x * tilesize, y * tilesize, tilesize / 2f + Mathf.sin(Timers.time(), 4f, 1f));
Lines.square(x * tilesize, y * tilesize, tilesize / 2f + Mathf.sin(Timers.time(), 4f, 1f));
Draw.color(Color.ORANGE);
Draw.thick(2f);
Lines.stroke(2f);
if(rot != -1){
Draw.lineAngle(x * tilesize, y * tilesize, rot * 90, 6);
Lines.lineAngle(x * tilesize, y * tilesize, rot * 90, 6);
}
Draw.reset();
}
@@ -333,8 +335,8 @@ public class Renderer extends RendererModule{
if(Vars.ui.configfrag.isShown()){
Tile tile = ui.configfrag.getSelectedTile();
Draw.color(Colors.get("accent"));
Draw.thick(1f);
Draw.square(tile.worldx() + tile.block().getPlaceOffset().x, tile.worldy() + tile.block().getPlaceOffset().y,
Lines.stroke(1f);
Lines.square(tile.worldx() + tile.block().getPlaceOffset().x, tile.worldy() + tile.block().getPlaceOffset().y,
tile.block().width * Vars.tilesize / 2f + 1f);
Draw.reset();
}
@@ -356,10 +358,10 @@ public class Renderer extends RendererModule{
input.placeMode.draw(control.input.getBlockX(), control.input.getBlockY(), control.input.getBlockEndX(), control.input.getBlockEndY());
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.SCARLET);
for(SpawnPoint spawn : control.getSpawnPoints()){
Draw.dashCircle(spawn.start.worldx(), spawn.start.worldy(), enemyspawnspace);
Lines.dashCircle(spawn.start.worldx(), spawn.start.worldy(), enemyspawnspace);
}
if(input.breakMode == PlaceMode.holdDelete)
@@ -430,15 +432,15 @@ public class Renderer extends RendererModule{
x -= 0.5f;
y += 0.5f;
Draw.thickness(3f);
Lines.stroke(3f);
Draw.color(Color.SLATE);
Draw.line(x - len + 1, y, x + len + 1.5f, y);
Draw.thickness(1f);
Lines.line(x - len + 1, y, x + len + 1.5f, y);
Lines.stroke(1f);
Draw.color(Color.BLACK);
Draw.line(x - len + 1, y, x + len + 0.5f, y);
Lines.line(x - len + 1, y, x + len + 0.5f, y);
Draw.color(color);
if(w >= 1)
Draw.line(x - len + 1, y, x - len + w, y);
Lines.line(x - len + 1, y, x - len + w, y);
Draw.reset();
}

View File

@@ -13,6 +13,7 @@ import io.anuke.mindustry.ui.fragments.*;
import io.anuke.ucore.core.*;
import io.anuke.ucore.function.Consumer;
import io.anuke.ucore.function.Listenable;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.modules.SceneModule;
import io.anuke.ucore.scene.Skin;
import io.anuke.ucore.scene.builders.build;

View File

@@ -10,13 +10,18 @@ import io.anuke.ucore.util.Mathf;
import static io.anuke.mindustry.Vars.tilesize;
public class Bullet extends BulletEntity{
BulletType type;
public boolean absorbed = false;
public Bullet(BulletType type, Entity owner, float x, float y, float angle){
super(type, owner, angle);
set(x, y);
this.type = type;
}
public void absorb(){
absorbed = true;
remove();
}
public void draw(){
type.draw(this);

View File

@@ -5,10 +5,11 @@ import io.anuke.mindustry.entities.effect.DamageArea;
import io.anuke.mindustry.entities.effect.EMP;
import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.graphics.Fx;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.BaseBulletType;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
@@ -45,8 +46,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
sniper = new BulletType(3f, 25){
public void draw(Bullet b){
Draw.color(Color.LIGHT_GRAY);
Draw.thick(1f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), 3f);
Lines.stroke(1f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), 3f);
Draw.reset();
}
@@ -66,7 +67,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
float rad = 6f + Mathf.sin(Timers.time(), 5f, 2f);
Draw.color(Color.SKY);
Draw.circle(b.x, b.y, 4f);
Lines.circle(b.x, b.y, 4f);
Draw.rect("circle", b.x, b.y, rad, rad);
Draw.reset();
}
@@ -138,10 +139,10 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b) {
Draw.color(Color.GRAY);
Draw.thick(3f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Draw.thick(1.5f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), 5f);
Lines.stroke(3f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Lines.stroke(1.5f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), 5f);
Draw.reset();
}
@@ -168,8 +169,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b) {
Draw.color(Color.LIGHT_GRAY, Color.GRAY, b.ifract());
Draw.thick(2f - b.ifract());
Draw.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Lines.stroke(2f - b.ifract());
Lines.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Draw.reset();
}
},
@@ -324,8 +325,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){
Draw.color(Color.WHITE, lightOrange, b.fract()/2f + 0.25f);
Draw.thick(1.5f);
Draw.lineAngle(b.x, b.y, b.angle(), 3f);
Lines.stroke(1.5f);
Lines.lineAngle(b.x, b.y, b.angle(), 3f);
Draw.reset();
}
},
@@ -338,8 +339,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
float size = 3f - b.ifract()*1f;
Draw.color(Color.PURPLE, Color.WHITE, 0.8f);
Draw.thick(1f);
Draw.circle(b.x, b.y, size);
Lines.stroke(1f);
Lines.circle(b.x, b.y, size);
Draw.reset();
}
},
@@ -350,13 +351,13 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
}
public void draw(Bullet b){
Draw.thick(2f);
Lines.stroke(2f);
Draw.color(lightOrange, Color.WHITE, 0.4f);
Draw.polygon(b.x, b.y, 3, 1.6f, b.angle());
Draw.thick(1f);
Lines.poly(b.x, b.y, 3, 1.6f, b.angle());
Lines.stroke(1f);
Draw.color(Color.WHITE, lightOrange, b.ifract()/2f);
Draw.alpha(b.ifract());
Draw.spikes(b.x, b.y, 1.5f, 2f, 6);
Lines.spikes(b.x, b.y, 1.5f, 2f, 6);
Draw.reset();
}
@@ -383,8 +384,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b){
Draw.color(lightGray);
Draw.thick(1f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Lines.stroke(1f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), 2f);
Draw.reset();
}
@@ -407,8 +408,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b) {
Draw.color(Color.WHITE, Color.ORANGE, b.ifract());
Draw.thick(2f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*5f);
Lines.stroke(2f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*5f);
Draw.reset();
}
@@ -435,8 +436,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
public void draw(Bullet b) {
Draw.color(Color.WHITE, Color.ORANGE, b.ifract());
Draw.thick(1f);
Draw.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*4f);
Lines.stroke(1f);
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*4f);
Draw.reset();
}
},
@@ -456,18 +457,18 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.color(beam);
Draw.rect("circle", b.x, b.y, 6f*f, 6f*f);
Draw.thick(3f * f);
Draw.lineAngle(b.x, b.y, b.angle(), length);
Lines.stroke(3f * f);
Lines.lineAngle(b.x, b.y, b.angle(), length);
Draw.thick(2f * f);
Draw.lineAngle(b.x, b.y, b.angle(), length + 6f);
Draw.thick(1f * f);
Draw.lineAngle(b.x, b.y, b.angle(), length + 12f);
Lines.stroke(2f * f);
Lines.lineAngle(b.x, b.y, b.angle(), length + 6f);
Lines.stroke(1f * f);
Lines.lineAngle(b.x, b.y, b.angle(), length + 12f);
Draw.color(beamLight);
Draw.thick(1.5f * f);
Lines.stroke(1.5f * f);
Draw.rect("circle", b.x, b.y, 3f*f, 3f*f);
Draw.lineAngle(b.x, b.y, b.angle(), length);
Lines.lineAngle(b.x, b.y, b.angle(), length);
}
};

View File

@@ -9,6 +9,7 @@ import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.ucore.core.*;
import io.anuke.ucore.entities.SolidEntity;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;

View File

@@ -8,9 +8,10 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerAcceptor;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.entities.TimedEntity;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
@@ -83,8 +84,8 @@ public class EMP extends TimedEntity{
drawLine(x + Angles.x(), y + Angles.y());
}
Draw.thick(fract()*2f);
Draw.polygon(x, y, 34, radius * Vars.tilesize);
Lines.stroke(fract()*2f);
Lines.poly(x, y, 34, radius * Vars.tilesize);
Draw.reset();
}
@@ -111,7 +112,7 @@ public class EMP extends TimedEntity{
}
private void drawLaser(float x, float y, float x2, float y2){
Draw.thick(fract() * 2f);
Draw.line(x, y, x2, y2);
Lines.stroke(fract() * 2f);
Lines.line(x, y, x2, y2);
}
}

View File

@@ -6,7 +6,7 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.BulletEntity;
import io.anuke.ucore.entities.Entities;

View File

@@ -8,12 +8,13 @@ import com.badlogic.gdx.utils.ObjectSet;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.graphics.Fx;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.entities.Entity;
import io.anuke.ucore.entities.SolidEntity;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Tmp;
@@ -95,8 +96,8 @@ public class TeslaOrb extends Entity{
Draw.color(Color.WHITE);
Draw.alpha(1f-life/lifetime);
Draw.thick(3f - life/lifetime*2f);
Draw.line(x1, y1, x2, y2);
Lines.stroke(3f - life/lifetime*2f);
Lines.line(x1, y1, x2, y2);
float rad = 7f - life/lifetime*5f;
@@ -108,7 +109,7 @@ public class TeslaOrb extends Entity{
//Draw.color(Color.WHITE);
//Draw.thick(2f - life/lifetime*2f);
//Draw.stroke(2f - life/lifetime*2f);
//Draw.line(x1, y1, x2, y2);
Draw.reset();

View File

@@ -12,7 +12,7 @@ import io.anuke.mindustry.graphics.Shaders;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.core.Timers;

View File

@@ -11,7 +11,9 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.graphics.Shaders;
import io.anuke.ucore.core.*;
import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.Angles;
public class HealerType extends EnemyType {
@@ -75,7 +77,7 @@ public class HealerType extends EnemyType {
if(target.health < target.maxhealth){
Draw.color(Hue.rgb(138, 244, 138, (MathUtils.sin(Timers.time()) + 1f) / 13f));
Draw.alpha(0.9f);
Draw.laser("laser", "laserend", enemy.x + Angles.x(), enemy.y + Angles.y(), target.x - Angles.x()/1.5f, target.y - Angles.y()/1.5f);
Shapes.laser("laser", "laserend", enemy.x + Angles.x(), enemy.y + Angles.y(), target.x - Angles.x()/1.5f, target.y - Angles.y()/1.5f);
Draw.color();
}
Graphics.shader(Shaders.outline);

View File

@@ -6,8 +6,9 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.entities.enemies.EnemyType;
import io.anuke.mindustry.entities.enemies.EnemyTypes;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Mathf;
public class TargetType extends EnemyType {
@@ -42,7 +43,7 @@ public class TargetType extends EnemyType {
Draw.color(Color.YELLOW);
if(Vars.control.getTutorial().showTarget()){
Draw.spikes(enemy.x, enemy.y, 11f + Mathf.sin(Timers.time(), 7f, 1f), 4f, 8, Timers.time());
Lines.spikes(enemy.x, enemy.y, 11f + Mathf.sin(Timers.time(), 7f, 1f), 4f, 8, Timers.time());
}
Draw.color();

View File

@@ -15,9 +15,10 @@ import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.mindustry.world.blocks.types.StaticBlock;
import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.graphics.CacheBatch;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Mathf;
import java.util.Arrays;
@@ -195,7 +196,7 @@ public class BlockRenderer{
if(Vars.debug && Vars.debugChunks){
Draw.color(Color.YELLOW);
Draw.thick(1f);
Lines.stroke(1f);
for(int x = -crangex; x <= crangex; x++){
for(int y = -crangey; y <= crangey; y++){
int worldx = Mathf.scl(camera.position.x, chunksize * tilesize) + x;
@@ -203,7 +204,7 @@ public class BlockRenderer{
if(!Mathf.inBounds(worldx, worldy, cache))
continue;
Draw.linerect(worldx * chunksize * tilesize, worldy * chunksize * tilesize, chunksize * tilesize, chunksize * tilesize);
Lines.rect(worldx * chunksize * tilesize, worldy * chunksize * tilesize, chunksize * tilesize, chunksize * tilesize);
}
}
Draw.reset();
@@ -215,9 +216,9 @@ public class BlockRenderer{
for(SpawnPoint point : control.getSpawnPoints()){
if(point.pathTiles != null){
for(int i = 1; i < point.pathTiles.length; i ++){
Draw.line(point.pathTiles[i-1].worldx(), point.pathTiles[i-1].worldy(),
Lines.line(point.pathTiles[i-1].worldx(), point.pathTiles[i-1].worldy(),
point.pathTiles[i].worldx(), point.pathTiles[i].worldy());
Draw.circle(point.pathTiles[i-1].worldx(), point.pathTiles[i-1].worldy(), 6f);
Lines.circle(point.pathTiles[i-1].worldx(), point.pathTiles[i-1].worldy(), 6f);
}
}
}

View File

@@ -3,9 +3,11 @@ package io.anuke.mindustry.graphics;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Colors;
import io.anuke.mindustry.Vars;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
@@ -60,82 +62,82 @@ public class Fx{
chainshot = new Effect(9f, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.thick(e.fract()*4f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*7f);
Draw.thick(e.fract()*2f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
Lines.stroke(e.fract()*4f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*7f);
Lines.stroke(e.fract()*2f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
Draw.reset();
}),
mortarshot = new Effect(10f, e -> {
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
Draw.thick(e.fract()*6f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
Draw.thick(e.fract()*5f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
Draw.thick(e.fract()*1f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Lines.stroke(e.fract()*6f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
Lines.stroke(e.fract()*5f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
Lines.stroke(e.fract()*1f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Draw.reset();
}),
railshot = new Effect(9f, e -> {
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
Draw.thick(e.fract()*5f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*8f);
Draw.thick(e.fract()*4f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Draw.thick(e.fract()*1f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
Lines.stroke(e.fract()*5f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*8f);
Lines.stroke(e.fract()*4f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Lines.stroke(e.fract()*1f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
Draw.reset();
}),
titanshot = new Effect(12f, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.thick(e.fract()*7f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Draw.thick(e.fract()*4f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Draw.thick(e.fract()*2f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
Lines.stroke(e.fract()*7f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Lines.stroke(e.fract()*4f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Lines.stroke(e.fract()*2f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
Draw.reset();
}),
largeCannonShot = new Effect(11f, e -> {
Draw.color(Color.WHITE, whiteYellow, e.ifract());
Draw.thick(e.fract()*6f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Draw.thick(e.fract()*3f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Draw.thick(e.fract()*1f);
Draw.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
Lines.stroke(e.fract()*6f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
Lines.stroke(e.fract()*3f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
Lines.stroke(e.fract()*1f);
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
Draw.reset();
}),
shockwave = new Effect(10f, 80f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.thick(e.fract()*2f + 0.2f);
Draw.circle(e.x, e.y, e.ifract()*28f);
Lines.stroke(e.fract()*2f + 0.2f);
Lines.circle(e.x, e.y, e.ifract()*28f);
Draw.reset();
}),
nuclearShockwave = new Effect(10f, 200f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.thick(e.fract()*3f + 0.2f);
Draw.polygon(e.x, e.y, 40, e.ifract()*140f);
Lines.stroke(e.fract()*3f + 0.2f);
Lines.poly(e.x, e.y, 40, e.ifract()*140f);
Draw.reset();
}),
shockwaveSmall = new Effect(10f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.thick(e.fract()*2f + 0.1f);
Draw.circle(e.x, e.y, e.ifract()*15f);
Lines.stroke(e.fract()*2f + 0.1f);
Lines.circle(e.x, e.y, e.ifract()*15f);
Draw.reset();
}),
empshockwave = new Effect(7f, e -> {
Draw.color(Color.WHITE, Color.SKY, e.ifract());
Draw.thick(e.fract()*2f);
Draw.circle(e.x, e.y, e.ifract()*40f);
Lines.stroke(e.fract()*2f);
Lines.circle(e.x, e.y, e.ifract()*40f);
Draw.reset();
}),
@@ -143,7 +145,7 @@ public class Fx{
Angles.randLenVectors(e.id, 7, 1f + e.ifract()*12f, (x, y)->{
float len = 1f+e.fract()*6f;
Draw.color(Color.SKY);
Draw.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
Draw.reset();
});
}),
@@ -183,7 +185,7 @@ public class Fx{
float len = 1f+e.fract()*5f;
Draw.color(Color.WHITE, Color.CORAL, e.ifract());
Draw.alpha(e.ifract()/1.3f);
Draw.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
Draw.reset();
});
}),
@@ -218,191 +220,191 @@ public class Fx{
lavabubble = new Effect(45f, e -> {
Draw.color(Color.ORANGE);
float scl = 0.35f;
Draw.thick(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
Draw.circle(e.x, e.y, e.ifract()*4f);
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
Lines.circle(e.x, e.y, e.ifract()*4f);
Draw.reset();
}),
oilbubble = new Effect(64f, e -> {
Draw.color(Color.DARK_GRAY);
float scl = 0.25f;
Draw.thick(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
Draw.circle(e.x, e.y, e.ifract()*3f);
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
Lines.circle(e.x, e.y, e.ifract()*3f);
Draw.reset();
}),
shellexplosion = new Effect(9, e -> {
Draw.thickness(2f - e.ifract()*1.7f);
Lines.stroke(2f - e.ifract()*1.7f);
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
Draw.circle(e.x, e.y, 3f + e.ifract() * 9f);
Lines.circle(e.x, e.y, 3f + e.ifract() * 9f);
Draw.reset();
}),
blastexplosion = new Effect(16, e -> {
Draw.thickness(1.2f - e.ifract());
Lines.stroke(1.2f - e.ifract());
Draw.color(Color.WHITE, Color.SCARLET, e.ifract());
Draw.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
Draw.reset();
}),
place = new Effect(16, e -> {
Draw.thickness(3f - e.ifract() * 2f);
Draw.square(e.x, e.y, Vars.tilesize / 2f + e.ifract() * 3f);
Lines.stroke(3f - e.ifract() * 2f);
Lines.square(e.x, e.y, Vars.tilesize / 2f + e.ifract() * 3f);
Draw.reset();
}),
dooropen = new Effect(10, e -> {
Draw.thickness(e.fract() * 1.6f);
Draw.square(e.x, e.y, Vars.tilesize / 2f + e.ifract() * 2f);
Lines.stroke(e.fract() * 1.6f);
Lines.square(e.x, e.y, Vars.tilesize / 2f + e.ifract() * 2f);
Draw.reset();
}),
doorclose= new Effect(10, e -> {
Draw.thickness(e.fract() * 1.6f);
Draw.square(e.x, e.y, Vars.tilesize / 2f + e.fract() * 2f);
Lines.stroke(e.fract() * 1.6f);
Lines.square(e.x, e.y, Vars.tilesize / 2f + e.fract() * 2f);
Draw.reset();
}),
dooropenlarge = new Effect(10, e -> {
Draw.thickness(e.fract() * 1.6f);
Draw.square(e.x, e.y, Vars.tilesize + e.ifract() * 2f);
Lines.stroke(e.fract() * 1.6f);
Lines.square(e.x, e.y, Vars.tilesize + e.ifract() * 2f);
Draw.reset();
}),
doorcloselarge = new Effect(10, e -> {
Draw.thickness(e.fract() * 1.6f);
Draw.square(e.x, e.y, Vars.tilesize + e.fract() * 2f);
Lines.stroke(e.fract() * 1.6f);
Lines.square(e.x, e.y, Vars.tilesize + e.fract() * 2f);
Draw.reset();
}),
purify = new Effect(10, e -> {
Draw.color(Color.ROYAL, Color.GRAY, e.ifract());
Draw.thickness(2f);
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.reset();
}),
purifyoil = new Effect(10, e -> {
Draw.color(Color.BLACK, Color.GRAY, e.ifract());
Draw.thickness(2f);
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.reset();
}),
purifystone = new Effect(10, e -> {
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
Draw.thickness(2f);
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
Draw.reset();
}),
generate = new Effect(11, e -> {
Draw.color(Color.ORANGE, Color.YELLOW, e.ifract());
Draw.thickness(1f);
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Lines.stroke(1f);
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.reset();
}),
spark = new Effect(10, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.WHITE, Color.GRAY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
Draw.reset();
}),
sparkbig = new Effect(11, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(lightRed, Color.GRAY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2.3f, 8);
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2.3f, 8);
Draw.reset();
}),
smelt = new Effect(10, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.YELLOW, Color.RED, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 1f, 8);
Lines.spikes(e.x, e.y, e.ifract() * 5f, 1f, 8);
Draw.reset();
}),
breakBlock = new Effect(12, e -> {
Draw.thickness(2f);
Lines.stroke(2f);
Draw.color(Color.WHITE, Colors.get("break"), e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 6f, 2, 5, 90);
Lines.spikes(e.x, e.y, e.ifract() * 6f, 2, 5, 90);
Draw.reset();
}),
hit = new Effect(10, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
Lines.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
Draw.reset();
}),
laserhit = new Effect(10, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.WHITE, Color.SKY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
Lines.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
Draw.reset();
}),
shieldhit = new Effect(9, e -> {
Draw.thickness(1f);
Lines.stroke(1f);
Draw.color(Color.WHITE, Color.SKY, e.ifract());
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 6);
Draw.thickness(4f*e.fract());
Draw.circle(e.x, e.y, e.ifract()*14f);
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 6);
Lines.stroke(4f*e.fract());
Lines.circle(e.x, e.y, e.ifract()*14f);
Draw.reset();
}),
laserShoot = new Effect(8, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 6f, 2f, 0.8f);
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 6f, 2f, 0.8f);
Draw.reset();
}),
spreadShoot = new Effect(12, e -> {
Draw.color(Color.WHITE, Color.PURPLE, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 9f, 3.5f, 0.8f);
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 9f, 3.5f, 0.8f);
Draw.reset();
}),
clusterShoot = new Effect(12, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2.5f, 0.7f);
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2.5f, 0.7f);
Draw.reset();
}),
vulcanShoot = new Effect(8, e -> {
Draw.color(lighterOrange, lightOrange, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2f, 0.7f);
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2f, 0.7f);
Draw.reset();
}),
shockShoot = new Effect(8, e -> {
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 14f, 4f, 0.8f);
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 14f, 4f, 0.8f);
Draw.reset();
}),
beamShoot = new Effect(8, e -> {
Draw.color(beamLight, beam, e.ifract());
Draw.lineShot(e.x, e.y, e.rotation - 70, 3, e.fract(), 12f, 1f, 0.5f);
Draw.lineShot(e.x, e.y, e.rotation + 70, 3, e.fract(), 12f, 1f, 0.5f);
Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fract(), 12f, 1f, 0.5f);
Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fract(), 12f, 1f, 0.5f);
Draw.reset();
}),
beamhit = new Effect(8, e -> {
Draw.color(beamLight, beam, e.ifract());
Draw.thick(e.fract()*3f+0.5f);
Draw.circle(e.x, e.y, e.ifract()*8f);
Draw.spikes(e.x, e.y, e.ifract()*6f, 2f, 4, 45);
Lines.stroke(e.fract()*3f+0.5f);
Lines.circle(e.x, e.y, e.ifract()*8f);
Lines.spikes(e.x, e.y, e.ifract()*6f, 2f, 4, 45);
Draw.reset();
}),
titanExplosion = new Effect(11, 48f, e -> {
Draw.thickness(2f*e.fract()+0.5f);
Lines.stroke(2f*e.fract()+0.5f);
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
Draw.circle(e.x, e.y, 5f + e.powfract() * 8f);
Lines.circle(e.x, e.y, 5f + e.powfract() * 8f);
Draw.color(e.ifract() < 0.5f ? whiteOrange : Color.DARK_GRAY);
float rad = e.fract()*10f + 5f;
@@ -414,9 +416,9 @@ public class Fx{
}),
explosion = new Effect(11, e -> {
Draw.thickness(2f*e.fract()+0.5f);
Lines.stroke(2f*e.fract()+0.5f);
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
Draw.circle(e.x, e.y, 5f + e.powfract() * 6f);
Lines.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;
@@ -436,9 +438,9 @@ public class Fx{
Draw.reset();
});
Draw.thickness(2f*e.fract()+0.4f);
Lines.stroke(2f*e.fract()+0.4f);
Draw.color(Color.WHITE, Color.ORANGE, e.powfract());
Draw.circle(e.x, e.y, 2f + e.powfract() * 9f);
Lines.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;
@@ -451,17 +453,17 @@ public class Fx{
clusterbomb = new Effect(10f, e -> {
Draw.color(Color.WHITE, lightOrange, e.ifract());
Draw.thick(e.fract()*1.5f);
Draw.polygon(e.x, e.y, 4, e.fract()*8f);
Draw.circle(e.x, e.y, e.ifract()*14f);
Lines.stroke(e.fract()*1.5f);
Lines.poly(e.x, e.y, 4, e.fract()*8f);
Lines.circle(e.x, e.y, e.ifract()*14f);
Draw.reset();
}),
coreexplosion = new Effect(13, e -> {
Draw.thickness(3f-e.ifract()*2f);
Lines.stroke(3f-e.ifract()*2f);
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);
Lines.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6);
Lines.circle(e.x, e.y, 4f + e.ifract() * 40f);
Draw.reset();
}),
@@ -494,9 +496,9 @@ public class Fx{
}),
spawn = new Effect(23, e -> {
Draw.thickness(2f);
Lines.stroke(2f);
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.ifract());
Draw.circle(e.x, e.y, 7f - e.ifract() * 6f);
Lines.circle(e.x, e.y, 7f - e.ifract() * 6f);
Draw.reset();
}),

View File

@@ -8,8 +8,9 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.ui.fragments.ToolFragment;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.scene.utils.Cursors;
import io.anuke.ucore.util.Bundles;
import io.anuke.ucore.util.Mathf;
@@ -36,17 +37,17 @@ public enum PlaceMode{
float si = MathUtils.sin(Timers.time() / 6f) + 1.5f;
Draw.color(valid ? Colors.get("place") : Colors.get("placeInvalid"));
Draw.thickness(2f);
Draw.linecrect(x + offset.x, y + offset.y, tilesize * control.getInput().recipe.result.width + si,
Lines.stroke(2f);
Lines.crect(x + offset.x, y + offset.y, tilesize * control.getInput().recipe.result.width + si,
tilesize * control.getInput().recipe.result.height + si);
control.getInput().recipe.result.drawPlace(tilex, tiley, control.getInput().rotation, valid);
Draw.thickness(2f);
Lines.stroke(2f);
if(control.getInput().recipe.result.rotate){
Draw.color(Colors.get("placeRotate"));
Tmp.v1.set(7, 0).rotate(control.getInput().rotation * 90);
Draw.line(x, y, x + Tmp.v1.x, y + Tmp.v1.y);
Lines.line(x, y, x + Tmp.v1.x, y + Tmp.v1.y);
}
if(valid)
@@ -96,7 +97,7 @@ public enum PlaceMode{
if(android && control.getInput().breaktime > 0){
Draw.color(Colors.get("breakStart"), Colors.get("break"), fract);
Draw.polygon(tile.worldx() + offset.x, tile.worldy() + offset.y, 25, 4 + (1f - fract) * 26);
Lines.poly(tile.worldx() + offset.x, tile.worldy() + offset.y, 25, 4 + (1f - fract) * 26);
}
Draw.reset();
}
@@ -149,7 +150,7 @@ public enum PlaceMode{
}
Draw.color(Colors.get("break"));
Draw.thick(1f);
Lines.stroke(1f);
for(int cx = tilex; cx <= endx; cx ++){
for(int cy = tiley; cy <= endy; cy ++){
Tile tile = Vars.world.tile(cx, cy);
@@ -157,15 +158,15 @@ public enum PlaceMode{
tile = tile.getLinked();
if(tile != null && control.getInput().validBreak(tile.x, tile.y)){
Vector2 offset = tile.block().getPlaceOffset();
Draw.linecrect(tile.worldx() + offset.x, tile.worldy() + offset.y,
Lines.crect(tile.worldx() + offset.x, tile.worldy() + offset.y,
tile.block().width * t, tile.block().height * t);
}
}
}
Draw.thick(2f);
Lines.stroke(2f);
Draw.color(control.getInput().cursorNear() ? Colors.get("break") : Colors.get("breakInvalid"));
Draw.linerect(x, y, x2 - x, y2 - y);
Lines.rect(x, y, x2 - x, y2 - y);
Draw.alpha(0.3f);
Draw.crect("blank", x, y, x2 - x, y2 - y);
Draw.reset();
@@ -276,9 +277,9 @@ public enum PlaceMode{
if(tilex == endx && tiley == endy){
cursor.draw(tilex, tiley, endx, endy);
}else{
Draw.thick(2f);
Lines.stroke(2f);
Draw.color(control.getInput().cursorNear() ? Colors.get("place") : Colors.get("placeInvalid"));
Draw.linerect(x, y, x2 - x, y2 - y);
Lines.rect(x, y, x2 - x, y2 - y);
Draw.alpha(0.3f);
Draw.crect("blank", x, y, x2 - x, y2 - y);
@@ -292,7 +293,7 @@ public enum PlaceMode{
if(!control.getInput().validPlace(px, py, control.getInput().recipe.result)
|| !control.hasItems(control.getInput().recipe.requirements, amount)){
Draw.linecrect(px * t + offset.x, py * t + offset.y, t*block.width, t*block.height);
Lines.crect(px * t + offset.x, py * t + offset.y, t*block.width, t*block.height);
}
amount ++;
}
@@ -302,7 +303,7 @@ public enum PlaceMode{
float cx = tx * t, cy = ty * t;
Draw.color(Colors.get("placeRotate"));
Tmp.v1.set(7, 0).rotate(rotation * 90);
Draw.line(cx, cy, cx + Tmp.v1.x, cy + Tmp.v1.y);
Lines.line(cx, cy, cx + Tmp.v1.x, cy + Tmp.v1.y);
}
Draw.reset();
}

View File

@@ -8,7 +8,6 @@ import java.util.Locale;
public abstract class PlatformFunction{
public String format(Date date){return "invalid";}
public String format(int number){return "invalid";}
public void openLink(String link){}
public void showError(String text){}
public void addDialog(TextField field){
addDialog(field, 16);

View File

@@ -14,7 +14,7 @@ import io.anuke.mindustry.world.Map;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.mindustry.world.blocks.SpecialBlocks;
import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Pixmaps;
import io.anuke.ucore.scene.builders.build;

View File

@@ -15,9 +15,10 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.ui.GridImage;
import io.anuke.mindustry.world.ColorMapper;
import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.core.Inputs;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Pixmaps;
import io.anuke.ucore.scene.Element;
import io.anuke.ucore.scene.event.InputEvent;
@@ -235,12 +236,12 @@ public class MapView extends Element implements GestureListener{
Vector2 v2 = unproject(lastx, lasty).add(x, y);
Draw.color(Tmp.c1.set(ColorMapper.getColor(editor.getDrawBlock())));
Draw.thick(Unit.dp.scl(3f * zoom));
Draw.line(sx, sy, v2.x, v2.y);
Lines.stroke(Unit.dp.scl(3f * zoom));
Lines.line(sx, sy, v2.x, v2.y);
Draw.polygon(sx, sy, 40, editor.getBrushSize() * zoom * 3);
Lines.poly(sx, sy, 40, editor.getBrushSize() * zoom * 3);
Draw.polygon(v2.x, v2.y, 40, editor.getBrushSize() * zoom * 3);
Lines.poly(v2.x, v2.y, 40, editor.getBrushSize() * zoom * 3);
}
batch.flush();
@@ -248,8 +249,8 @@ public class MapView extends Element implements GestureListener{
if(pop) ScissorStack.popScissors();
Draw.color(Colors.get("accent"));
Draw.thick(Unit.dp.scl(3f));
Draw.linerect(x + width/2 - size/2, y + height/2 - size/2, size, size);
Lines.stroke(Unit.dp.scl(3f));
Lines.rect(x + width/2 - size/2, y + height/2 - size/2, size, size);
Draw.reset();
}

View File

@@ -1,9 +1,6 @@
package io.anuke.mindustry.mapeditor;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.utils.Array;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Pixmaps;
public class OperationStack{
private final static int maxSize = 10;

View File

@@ -20,7 +20,7 @@ import io.anuke.ucore.function.Consumer;
import java.io.IOException;
public class Net{
public static final int version = 11;
public static final int version = 12;
private static boolean server;
private static boolean active;

View File

@@ -21,10 +21,9 @@ import java.nio.ByteBuffer;
public class NetworkIO {
public static void writeMap(Map map, OutputStream os){
public static void writeMap(Pixmap map, OutputStream os){
try(DataOutputStream stream = new DataOutputStream(os)){
Pixmap pix = map.pixmap;
ByteBuffer buffer = pix.getPixels();
ByteBuffer buffer = map.getPixels();
UCore.log("Buffer position: " + buffer.position());
stream.writeShort(map.getWidth());
stream.writeShort(map.getHeight());

View File

@@ -5,7 +5,8 @@ import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.scene.ui.Image;
import io.anuke.ucore.scene.ui.layout.Unit;
@@ -36,8 +37,8 @@ public class BorderImage extends Image{
float scaleY = getScaleY();
Draw.color(Colors.get("accent"));
Draw.thick(Unit.dp.scl(thickness));
Draw.linerect(x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY);
Lines.stroke(Unit.dp.scl(thickness));
Lines.rect(x + imageX, y + imageY, imageWidth * scaleX, imageHeight * scaleY);
Draw.reset();
}
}

View File

@@ -3,7 +3,7 @@ package io.anuke.mindustry.ui;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.scene.Element;
public class GridImage extends Element{

View File

@@ -1,6 +1,6 @@
package io.anuke.mindustry.ui.dialogs;
import io.anuke.mindustry.Mindustry;
import com.badlogic.gdx.Gdx;
import io.anuke.mindustry.Vars;
import io.anuke.ucore.scene.ui.Dialog;
@@ -13,7 +13,7 @@ public class DiscordDialog extends Dialog {
content().row();
content().add("[orange]"+ Vars.discordURL);
buttons().defaults().size(200f, 50);
buttons().addButton("$text.openlink", () -> Mindustry.platforms.openLink(Vars.discordURL));
buttons().addButton("$text.openlink", () -> Gdx.net.openURI(Vars.discordURL));
buttons().addButton("$text.back", this::hide);
}
}

View File

@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.mindustry.core.GameState;
import io.anuke.mindustry.core.GameState.State;
import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.scene.ui.layout.Unit;
public class BackgroundFragment implements Fragment {

View File

@@ -11,7 +11,7 @@ import io.anuke.mindustry.core.GameState.State;
import io.anuke.mindustry.input.InputHandler;
import io.anuke.mindustry.resource.*;
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.scene.actions.Actions;
import io.anuke.ucore.scene.builders.table;

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.entities.Player;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.Packets.KickReason;
import io.anuke.mindustry.ui.BorderImage;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Inputs;
import io.anuke.ucore.scene.builders.label;
import io.anuke.ucore.scene.builders.table;

View File

@@ -12,7 +12,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.ItemStack;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.scene.ui.layout.Table;

View File

@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.function.Predicate;
import io.anuke.ucore.util.Mathf;

View File

@@ -6,7 +6,7 @@ import com.badlogic.gdx.math.MathUtils;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.function.Predicate;
import io.anuke.ucore.util.Mathf;

View File

@@ -10,7 +10,7 @@ import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.util.Mathf;
public class LiquidBlock extends Block implements LiquidAcceptor{

View File

@@ -8,7 +8,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.Wall;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.entities.Entities;

View File

@@ -7,10 +7,11 @@ import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Tmp;
@@ -54,14 +55,14 @@ public class LaserTurret extends PowerTurret{
Draw.color(Tmp.c1.set(beamColor).mul(1f + lighten, 1f + lighten, 1f + lighten, 1f));
Draw.alpha(0.3f);
Draw.thickness(4f);
Draw.line(x, y, x2, y2);
Draw.thickness(2f);
Lines.stroke(4f);
Lines.line(x, y, x2, y2);
Lines.stroke(2f);
Draw.rect("circle", x2, y2, 7f, 7f);
Draw.alpha(1f);
Draw.thickness(2f);
Draw.line(x, y, x2, y2);
Draw.thickness(1f);
Lines.stroke(2f);
Lines.line(x, y, x2, y2);
Lines.stroke(1f);
Draw.rect("circle", x2, y2, 5f, 5f);
}

View File

@@ -13,7 +13,8 @@ import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerAcceptor;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;
@@ -38,7 +39,7 @@ public class PowerTurret extends Turret implements PowerAcceptor{
Vector2 offset = getPlaceOffset();
Draw.color(Color.GREEN);
Draw.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
Lines.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
Draw.reset();
drawPowerBar(tile);

View File

@@ -8,9 +8,10 @@ import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;
@@ -70,7 +71,7 @@ public class RepairTurret extends PowerTurret{
@Override
public void drawSelect(Tile tile){
Draw.color(Color.GREEN);
Draw.dashCircle(tile.worldx(), tile.worldy(), range);
Lines.dashCircle(tile.worldx(), tile.worldy(), range);
Draw.reset();
drawPowerBar(tile);
@@ -89,14 +90,14 @@ public class RepairTurret extends PowerTurret{
Draw.color(Hue.rgb(138, 244, 138, (MathUtils.sin(Timers.time()) + 1f) / 14f));
Draw.alpha(0.3f);
Draw.thickness(4f);
Draw.line(x, y, x2, y2);
Draw.thickness(2f);
Lines.stroke(4f);
Lines.line(x, y, x2, y2);
Lines.stroke(2f);
Draw.rect("circle", x2, y2, 7f, 7f);
Draw.alpha(1f);
Draw.thickness(2f);
Draw.line(x, y, x2, y2);
Draw.thickness(1f);
Lines.stroke(2f);
Lines.line(x, y, x2, y2);
Lines.stroke(1f);
Draw.rect("circle", x2, y2, 5f, 5f);
Draw.reset();
}

View File

@@ -6,7 +6,7 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Strings;

View File

@@ -13,11 +13,12 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;
@@ -103,7 +104,7 @@ public class Turret extends Block{
Vector2 offset = getPlaceOffset();
Draw.color(Color.GREEN);
Draw.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
Lines.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
Draw.reset();
TurretEntity entity = tile.entity();
@@ -118,8 +119,8 @@ public class Turret extends Block{
@Override
public void drawPlace(int x, int y, int rotation, boolean valid){
Draw.color(Color.PURPLE);
Draw.thick(1f);
Draw.dashCircle(x*Vars.tilesize, y*Vars.tilesize, range);
Lines.stroke(1f);
Lines.dashCircle(x*Vars.tilesize, y*Vars.tilesize, range);
}
@Override
@@ -198,15 +199,15 @@ public class Turret extends Block{
predictY = entity.target.y + entity.target.velocity.y * hittime;
Draw.color(Color.GREEN);
Draw.line(tile.worldx(), tile.worldy(), entity.target.x, entity.target.y);
Lines.line(tile.worldx(), tile.worldy(), entity.target.x, entity.target.y);
Draw.color(Color.RED);
Draw.line(tile.worldx(), tile.worldy(), entity.target.x + entity.target.velocity.x * hittime,
Lines.line(tile.worldx(), tile.worldy(), entity.target.x + entity.target.velocity.x * hittime,
entity.target.y + entity.target.velocity.y * hittime);
Draw.color(Color.PURPLE);
Draw.thick(2f);
Draw.lineAngle(tile.worldx(), tile.worldy(), angle, 7f);
Lines.stroke(2f);
Lines.lineAngle(tile.worldx(), tile.worldy(), angle, 7f);
Draw.reset();

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Bits;
import io.anuke.ucore.util.Mathf;

View File

@@ -4,7 +4,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.LiquidBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
public class LiquidItemJunction extends LiquidBlock{

View File

@@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.types.distribution;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.LiquidBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
public class LiquidJunction extends Conduit{

View File

@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types.distribution;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
public class LiquidRouter extends Conduit{
protected final int timerDump = timers++;

View File

@@ -8,7 +8,8 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerAcceptor;
import io.anuke.mindustry.world.blocks.types.production.Generator;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.util.Mathf;
public class PowerBooster extends Generator{
@@ -28,15 +29,15 @@ public class PowerBooster extends Generator{
super.drawSelect(tile);
Draw.color(Color.YELLOW);
Draw.dashCircle(tile.worldx(), tile.worldy(), powerRange * Vars.tilesize);
Lines.dashCircle(tile.worldx(), tile.worldy(), powerRange * Vars.tilesize);
Draw.reset();
}
@Override
public void drawPlace(int x, int y, int rotation, boolean valid){
Draw.color(Color.PURPLE);
Draw.thick(1f);
Draw.dashCircle(x * Vars.tilesize, y * Vars.tilesize, powerRange * Vars.tilesize);
Lines.stroke(1f);
Lines.dashCircle(x * Vars.tilesize, y * Vars.tilesize, powerRange * Vars.tilesize);
Draw.reset();
}

View File

@@ -5,7 +5,7 @@ import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.scene.style.TextureRegionDrawable;
import io.anuke.ucore.scene.ui.ButtonGroup;

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.scene.ui.ButtonGroup;
import io.anuke.ucore.scene.ui.ImageButton;

View File

@@ -8,7 +8,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;

View File

@@ -13,11 +13,13 @@ import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerAcceptor;
import io.anuke.mindustry.world.blocks.types.PowerBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Lines;
import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.*;
public class Generator extends PowerBlock{
@@ -59,15 +61,15 @@ public class Generator extends PowerBlock{
int rotation = tile.getRotation();
if(hasLasers){
Draw.color(Color.YELLOW);
Draw.thick(2f);
Lines.stroke(2f);
for(int i = 0; i < laserDirections; i++){
int dir = Mathf.mod(i + rotation - laserDirections / 2, 4);
float lx = Geometry.getD4Points()[dir].x, ly = Geometry.getD4Points()[dir].y;
float lx = Geometry.d4[dir].x, ly = Geometry.d4[dir].y;
float dx = lx * laserRange * Vars.tilesize;
float dy = ly * laserRange * Vars.tilesize;
Draw.dashLine(
Lines.dashLine(
tile.worldx() + lx * Vars.tilesize / 2,
tile.worldy() + ly * Vars.tilesize / 2,
tile.worldx() + dx - lx * Vars.tilesize,
@@ -83,14 +85,14 @@ public class Generator extends PowerBlock{
public void drawPlace(int x, int y, int rotation, boolean valid){
if(hasLasers){
Draw.color(Color.PURPLE);
Draw.thick(2f);
Lines.stroke(2f);
for(int i = 0; i < laserDirections; i++){
int dir = Mathf.mod(i + rotation - laserDirections / 2, 4);
float lx = Geometry.getD4Points()[dir].x, ly = Geometry.getD4Points()[dir].y;
float lx = Geometry.d4[dir].x, ly = Geometry.d4[dir].y;
float dx = lx * laserRange * Vars.tilesize;
float dy = ly * laserRange * Vars.tilesize;
Draw.dashLine(
Lines.dashLine(
x * Vars.tilesize + lx * Vars.tilesize / 2,
y * Vars.tilesize + ly * Vars.tilesize / 2,
x * Vars.tilesize + dx - lx * Vars.tilesize,
@@ -193,13 +195,13 @@ public class Generator extends PowerBlock{
int relative = tile.relativeTo(target.x, target.y);
if(relative == -1){
Draw.laser("laser", "laserend", tile.worldx() + Angles.x(), tile.worldy() + Angles.y(),
Shapes.laser("laser", "laserend", tile.worldx() + Angles.x(), tile.worldy() + Angles.y(),
target.worldx() - Tmp.v1.x + Mathf.range(r),
target.worldy() - Tmp.v1.y + Mathf.range(r), 0.7f);
}else{
Draw.rect("laserfull",
tile.worldx() + Geometry.getD4Points()[relative].x * width * Vars.tilesize / 2f,
tile.worldy() + Geometry.getD4Points()[relative].y * width * Vars.tilesize / 2f);
tile.worldx() + Geometry.d4[relative].x * width * Vars.tilesize / 2f,
tile.worldy() + Geometry.d4[relative].y * width * Vars.tilesize / 2f);
}
Draw.color();
@@ -223,7 +225,7 @@ public class Generator extends PowerBlock{
protected Tile laserTarget(Tile tile, int rotation){
rotation = Mathf.mod(rotation, 4);
GridPoint2 point = Geometry.getD4Points()[rotation];
GridPoint2 point = Geometry.d4[rotation];
int i = 0;

View File

@@ -8,7 +8,7 @@ import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;

View File

@@ -10,7 +10,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.LiquidBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.util.Strings;

View File

@@ -12,7 +12,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.LiquidAcceptor;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;

View File

@@ -10,7 +10,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.Liquid;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf;

View File

@@ -6,7 +6,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.util.Tmp;

View File

@@ -7,7 +7,7 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Layer;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.LiquidBlock;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;

View File

@@ -8,7 +8,7 @@ import io.anuke.mindustry.graphics.Fx;
import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Effects.Effect;
import io.anuke.ucore.core.Timers;

View File

@@ -8,7 +8,7 @@ import io.anuke.mindustry.resource.UpgradeRecipes;
import io.anuke.mindustry.resource.Weapon;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.core.Effects;
import io.anuke.ucore.function.Listenable;
import io.anuke.ucore.scene.style.TextureRegionDrawable;