Select effect
This commit is contained in:
@@ -523,10 +523,10 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
//handle long tap when player isn't building
|
//handle long tap when player isn't building
|
||||||
if(mode == none){
|
if(mode == none){
|
||||||
|
Vec2 pos = Core.input.mouseWorld(x, y);
|
||||||
|
|
||||||
//TODO find payload target
|
//TODO find payload target
|
||||||
if(player.unit() instanceof Payloadc pay){
|
if(player.unit() instanceof Payloadc pay){
|
||||||
Vec2 pos = Core.input.mouseWorld(x, y);
|
|
||||||
Unit target = Units.closest(player.team(), pos.x, pos.y, 8f, u -> u.isAI() && u.isGrounded() && pay.canPickup(u) && u.within(pos, u.hitSize + 8f));
|
Unit target = Units.closest(player.team(), pos.x, pos.y, 8f, u -> u.isAI() && u.isGrounded() && pay.canPickup(u) && u.within(pos, u.hitSize + 8f));
|
||||||
if(target != null){
|
if(target != null){
|
||||||
payloadTarget = target;
|
payloadTarget = target;
|
||||||
@@ -545,6 +545,8 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
}else{
|
}else{
|
||||||
manualShooting = true;
|
manualShooting = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!state.isPlaying()) Fx.select.at(pos);
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
//ignore off-screen taps
|
//ignore off-screen taps
|
||||||
|
|||||||
Reference in New Issue
Block a user