Fixed mobile crash
This commit is contained in:
@@ -88,9 +88,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
/** Check and assign targets for a specific position. */
|
||||
void checkTargets(float x, float y){
|
||||
if(player.dead()) return;
|
||||
|
||||
Unit unit = Units.closestEnemy(player.team(), x, y, 20f, u -> !u.dead);
|
||||
|
||||
if(unit != null && !player.dead() && player.unit().type.canAttack){
|
||||
if(unit != null && player.unit().type.canAttack){
|
||||
player.unit().mineTile = null;
|
||||
target = unit;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user