lolz
This commit is contained in:
parent
e9db4c48e3
commit
257d7e9db5
4 changed files with 28 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package ei.game.scene;
|
||||
|
||||
import ei.engine.math.Vector2i;
|
||||
import ei.engine.math.Vector3f;
|
||||
import ei.engine.scene.Node;
|
||||
import ei.engine.scene.Sprite;
|
||||
|
|
@ -35,6 +36,20 @@ public class Map {
|
|||
}
|
||||
}
|
||||
|
||||
public Vector2i getPosByPixel(float x, float y){
|
||||
System.out.println("DOWN: "+x+"-"+y);
|
||||
x = x/POS_SIZE;
|
||||
y = y/POS_SIZE;
|
||||
System.out.println("DOWN: "+x+"-"+y);
|
||||
return new Vector2i((int)x,(int)y);
|
||||
}
|
||||
|
||||
public Vector2i getPixelByPos(int x, int y){
|
||||
x = POS_SIZE*x;
|
||||
y = POS_SIZE*y;
|
||||
return new Vector2i((int)x,(int)y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the pos inthe map is empty
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue