Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -307,7 +307,19 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
hide();
|
hide();
|
||||||
}).disabled(b -> field.getText().isEmpty());
|
}).disabled(b -> field.getText().isEmpty());
|
||||||
buttons.addButton("$cancel", this::hide);
|
buttons.addButton("$cancel", this::hide);
|
||||||
}}.show();
|
keyDown(KeyCode.ENTER, () -> {
|
||||||
|
String text = field.getText();
|
||||||
|
if(!text.isEmpty()){
|
||||||
|
confirmed.get(text);
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
keyDown(KeyCode.ESCAPE, this::hide);
|
||||||
|
keyDown(KeyCode.BACK, this::hide);
|
||||||
|
show();
|
||||||
|
Core.scene.setKeyboardFocus(field);
|
||||||
|
field.setCursorPosition(def.length());
|
||||||
|
}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -637,7 +637,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
|||||||
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
|
if(!state.isEditor() && isShooting() && mech.canShoot(this)){
|
||||||
if(!mech.turnCursor){
|
if(!mech.turnCursor){
|
||||||
//shoot forward ignoring cursor
|
//shoot forward ignoring cursor
|
||||||
mech.weapon.update(this, x + Angles.trnsx(rotation, 1f), y + Angles.trnsy(rotation, 1f));
|
mech.weapon.update(this, x + Angles.trnsx(rotation, mech.weapon.targetDistance), y + Angles.trnsy(rotation, mech.weapon.targetDistance));
|
||||||
}else{
|
}else{
|
||||||
mech.weapon.update(this, pointerX, pointerY);
|
mech.weapon.update(this, pointerX, pointerY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ public class Weapon{
|
|||||||
public float shotDelay = 0;
|
public float shotDelay = 0;
|
||||||
/** whether shooter rotation is ignored when shooting. */
|
/** whether shooter rotation is ignored when shooting. */
|
||||||
public boolean ignoreRotation = false;
|
public boolean ignoreRotation = false;
|
||||||
|
/** if turnCursor is false for a mech, how far away will the weapon target. */
|
||||||
|
public float targetDistance = 1f;
|
||||||
|
|
||||||
public Sound shootSound = Sounds.pew;
|
public Sound shootSound = Sounds.pew;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class BundleLauncher{
|
|||||||
OrderedMap<String, String> base = new OrderedMap<>();
|
OrderedMap<String, String> base = new OrderedMap<>();
|
||||||
PropertiesUtils.load(base, new InputStreamReader(new FileInputStream(file)));
|
PropertiesUtils.load(base, new InputStreamReader(new FileInputStream(file)));
|
||||||
Array<String> removals = new Array<>();
|
Array<String> removals = new Array<>();
|
||||||
Fi.get("").walk(child -> {
|
Fi.get(".").walk(child -> {
|
||||||
if(child.name().equals("bundle.properties") || child.isDirectory() || child.toString().contains("output"))
|
if(child.name().equals("bundle.properties") || child.isDirectory() || child.toString().contains("output"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user