Fix hitbox. Nothing worked, now it is.
This commit is contained in:
@ -32,12 +32,13 @@ public class Hitbox {
|
||||
parseStringToRectangleHitbox(informations);
|
||||
createCartesianPointsFromWidthAndHeigh();
|
||||
convertCartesianPointsToIso();
|
||||
printToConsole();
|
||||
}else if(shape.equals("Circle")) {
|
||||
parseStringToCircleHitbox(informations);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void initListsPoints() {
|
||||
if(listPointsIso.size()<1) {
|
||||
for(int i=0;i<4;i++) {
|
||||
@ -136,15 +137,23 @@ public class Hitbox {
|
||||
public void printToConsole() {
|
||||
System.out.println();
|
||||
System.out.println("|||Hitbox:");
|
||||
/* if(shape!=null&&listPoints!=null) {
|
||||
System.out.println("shape: " + shape);
|
||||
for(Point point: listPoints) {
|
||||
if(shape!=null&&listPointsCartesian!=null) {
|
||||
System.out.println("Shape: " + shape);
|
||||
System.out.println("Cartesian: ");
|
||||
for(Point point: listPointsCartesian) {
|
||||
System.out.print("("+point.x+";"+point.y+") ");
|
||||
System.out.println("");
|
||||
}
|
||||
System.out.println();
|
||||
System.out.println("-----------");
|
||||
System.out.println("Iso: ");
|
||||
for(Point point: listPointsIso){
|
||||
System.out.print("("+point.x+";"+point.y+") ");
|
||||
System.out.println("");
|
||||
}
|
||||
System.out.println(" ");
|
||||
}else {
|
||||
System.out.println("null");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
//дописать функцию возвращения listPonts и shape(форма), если будет нужно.
|
||||
// так же при написании функции возвращения нужных координат, надо их сделать целочисленными.
|
||||
|
||||
Reference in New Issue
Block a user