This commit is contained in:
Ziver Koc 2007-04-19 12:41:38 +00:00
parent a2d6b68992
commit 901206c108
2 changed files with 27 additions and 15 deletions

View file

@ -134,6 +134,17 @@ public class Map {
return mapNode;
}
public Vector2i getPosIndex(GameEntity u){
for(int i=0; i<width ;i++){
for(int j=0; j<hight ;j++){
if(map[i][j] == u){
return new Vector2i(i,j);
}
}
}
return null;
}
/**
* Prints all the units on the map
*