Doors fixed + merge

master
Jonathan Hager 5 years ago
commit 664a4baf71

@ -238,54 +238,4 @@ public class Player extends Actor{
} }
return null; return null;
} }
/*
public int getMovementAvailable(){
boolean canMoveVer = true;
boolean canMoveHor = true;
boolean canMoveBoth = true;
for(Actor a : getStage().getActors()){
if(a.getName().equals("mapobject")){
Rectangle p = new Rectangle(getX()+movementX, getY() + movementY, getWidth(), getHeight());
Rectangle o = new Rectangle(a.getX(), a.getY(), a.getWidth(), a.getHeight());
if(Intersector.overlaps(p, o)){
canMoveBoth = false;
break;
}
}
}
if(canMoveBoth){
return 2;
}
for(Actor a : getStage().getActors()){
if(a.getName().equals("mapobject")){
Rectangle p = new Rectangle(getX()+movementX, getY(), getWidth(), getHeight());
Rectangle o = new Rectangle(a.getX(), a.getY(), a.getWidth(), a.getHeight());
if(Intersector.overlaps(p, o)){
canMoveHor = false;
break;
}
}
}
if(canMoveHor){
return 1;
}
for(Actor a : getStage().getActors()){
if(a.getName().equals("mapobject")){
Rectangle p = new Rectangle(getX(), getY()+movementY, getWidth(), getHeight());
Rectangle o = new Rectangle(a.getX(), a.getY(), a.getWidth(), a.getHeight());
if(Intersector.overlaps(p, o)){
canMoveVer = false;
break;
}
}
}
if(canMoveVer){
return 0;
}
return 3;
}
*/
} }

Loading…
Cancel
Save