This commit is contained in:
parent
83c0b0f180
commit
a2a48df340
1 changed files with 6 additions and 3 deletions
|
|
@ -10,7 +10,6 @@ import ei.engine.math.Vector4f;
|
|||
import ei.engine.scene.Box;
|
||||
import ei.engine.scene.Sprite;
|
||||
import ei.engine.texture.Texture;
|
||||
import ei.engine.util.MultiPrintStream;
|
||||
import ei.game.scene.GameEntity;
|
||||
import ei.game.scene.Map;
|
||||
|
||||
|
|
@ -130,8 +129,13 @@ public class InGameMouseInput extends MouseInput{
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Selecting all the units between the two positions
|
||||
*
|
||||
* @param startPos The start position
|
||||
* @param stopPos The stop position
|
||||
*/
|
||||
public void selectUnits(Vector2i startPos, Vector2i stopPos){
|
||||
|
||||
for(int i=Math.min(startPos.getX(), stopPos.getX()); i<=Math.max(startPos.getX(), stopPos.getX()) ;i++){
|
||||
for(int j=Math.min(startPos.getY(), stopPos.getY()); j<=Math.max(startPos.getY(), stopPos.getY()) ;j++){
|
||||
if(!map.isPosEmpty(i, j)){
|
||||
|
|
@ -140,7 +144,6 @@ public class InGameMouseInput extends MouseInput{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue