This commit is contained in:
Ziver Koc 2007-04-18 13:04:05 +00:00
parent 83c0b0f180
commit a2a48df340

View file

@ -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{
}
}
}
}
/**