lol
This commit is contained in:
parent
acd4752826
commit
c426ee3287
3 changed files with 6 additions and 6 deletions
|
|
@ -84,16 +84,16 @@ public class Sprite extends Entity {
|
|||
public void update() {
|
||||
if(moveTo!=null) {
|
||||
if(moveTo.getX()>getLocation().getX()) {
|
||||
getLocation().add(0.5f, 0f, 0f);
|
||||
getLocation().add(1.5f, 0f, 0f);
|
||||
}
|
||||
if(moveTo.getY()>getLocation().getY()) {
|
||||
getLocation().add(0f, 0.5f, 0f);
|
||||
getLocation().add(0f, 1.5f, 0f);
|
||||
}
|
||||
if(moveTo.getX()<getLocation().getX()) {
|
||||
getLocation().add(-0.5f, 0f, 0f);
|
||||
getLocation().add(-1.5f, 0f, 0f);
|
||||
}
|
||||
if(moveTo.getY()<getLocation().getY()) {
|
||||
getLocation().add(0f, -0.5f, 0f);
|
||||
getLocation().add(0f, -1.5f, 0f);
|
||||
}
|
||||
if(moveTo.getX()==getLocation().getX() && moveTo.getY()==getLocation().getY()) {
|
||||
moveTo = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue