Merge branch 'master' of https://github.com/Anuken/Mindustry into schematics

This commit is contained in:
Anuken
2019-10-15 08:52:48 -04:00
31 changed files with 1449 additions and 1199 deletions

View File

@@ -211,6 +211,11 @@ public class DesktopInput extends InputHandler{
cursorType = SystemCursor.arrow;
}
@Override
public boolean isBreaking(){
return mode == breaking;
}
void pollInput(){
Tile selected = tileAt(Core.input.mouseX(), Core.input.mouseY());
int cursorX = tileX(Core.input.mouseX());

View File

@@ -523,6 +523,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
return block != null;
}
public boolean isBreaking(){
return false;
}
public float mouseAngle(float x, float y){
return Core.input.mouseWorld(getMouseX(), getMouseY()).sub(x, y).angle();
}

View File

@@ -348,6 +348,11 @@ public class MobileInput extends InputHandler implements GestureListener{
//endregion
//region input events
@Override
public boolean isBreaking(){
return mode == breaking;
}
@Override
public boolean touchDown(int screenX, int screenY, int pointer, KeyCode button){
if(state.is(State.menu) || player.isDead()) return false;