Fix select bug, update TODO
This commit is contained in:
@@ -9,7 +9,7 @@ import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
public class Vars{
|
||||
public static final boolean testAndroid = false;
|
||||
public static final boolean testAndroid = true;
|
||||
//shorthand for whether or not this is running on android
|
||||
public static final boolean android = (Gdx.app.getType() == ApplicationType.Android) || testAndroid;
|
||||
//shorthand for whether or not this is running on GWT
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.entities.effect;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Colors;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
@@ -311,8 +312,11 @@ public class Fx{
|
||||
|
||||
breakBlock = new Effect(12, e -> {
|
||||
Draw.thickness(2f);
|
||||
Draw.color(Color.WHITE, Color.GRAY, e.ifract());
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 5);
|
||||
Draw.color(Color.WHITE, Colors.get("break"), e.ifract());
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 5, 90);
|
||||
|
||||
Draw.thickness(2f - e.ifract() * 2f);
|
||||
Draw.polygon(4, e.x, e.y, Vars.tilesize / 1.6f + e.ifract() * 5f, 45);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
|
||||
@@ -37,10 +37,12 @@ public class AndroidInput extends InputHandler{
|
||||
|
||||
@Override
|
||||
public boolean touchUp(int screenX, int screenY, int pointer, int button){
|
||||
if(brokeBlock) return false;
|
||||
if(brokeBlock){
|
||||
brokeBlock = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
brokeBlock = false;
|
||||
if(placing && pointer == 0 && !player.placeMode.pan){
|
||||
if(placing && pointer == 0 && !player.placeMode.pan && player.recipe != null){
|
||||
player.placeMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY());
|
||||
}else if(pointer == 0 && !player.breakMode.pan && player.recipe == null && drawPlace()){
|
||||
player.breakMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY());
|
||||
|
||||
Reference in New Issue
Block a user