changed getPixelByPos to Vector2f
This commit is contained in:
parent
4627101025
commit
1208973646
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package ei.game.scene;
|
||||
|
||||
import ei.engine.math.Vector2f;
|
||||
import ei.engine.math.Vector2i;
|
||||
import ei.engine.math.Vector3f;
|
||||
import ei.engine.scene.Node;
|
||||
|
|
@ -44,10 +45,10 @@ public class Map {
|
|||
return new Vector2i((int)x,(int)y);
|
||||
}
|
||||
|
||||
public Vector2i getPixelByPos(int x, int y){
|
||||
public Vector2f getPixelByPos(float x, float y){
|
||||
x = (int)(POS_SIZE*x*1.2f);
|
||||
y = (int)(POS_SIZE*y*1.2f);
|
||||
return new Vector2i((int)x,(int)y);
|
||||
return new Vector2f((int)x,(int)y);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue