Save actual Rectengle Hitbox Data
This commit is contained in:
@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><objecttypes>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<objecttypes>
|
||||||
<objecttype color="#a0a0a4" name="misato">
|
<objecttype color="#a0a0a4" name="misato">
|
||||||
<property default="Solid" name="class" type="string"/>
|
<property default="Solid" name="class" type="string"/>
|
||||||
<property default="1 1 201 0 184 189 72 191 " name="drawbox" type="string"/>
|
<property default="1 1 201 0 184 189 72 191 " name="drawbox" type="string"/>
|
||||||
|
<property default="Rectangle -16 8 52 42" name="hitbox" type="string"/>
|
||||||
<property default="Rectangle 0 0 48 69" name="hitbox" type="string"/></objecttype>
|
</objecttype>
|
||||||
<objecttype color="#a0a0a4" name="starlight">
|
<objecttype color="#a0a0a4" name="starlight">
|
||||||
<property default="Solid" name="class" type="string"/>
|
<property default="Solid" name="class" type="string"/>
|
||||||
<property default="4 3 162 9 129 121 53 140 " name="drawbox" type="string"/>
|
<property default="4 3 162 9 129 121 53 140 " name="drawbox" type="string"/>
|
||||||
@ -24,4 +25,4 @@
|
|||||||
<property default="252 116 505 120 500 247 235 237 " name="drawbox" type="string"/>
|
<property default="252 116 505 120 500 247 235 237 " name="drawbox" type="string"/>
|
||||||
<property default="Circle 578 671 15" name="hitbox" type="string"/>
|
<property default="Circle 578 671 15" name="hitbox" type="string"/>
|
||||||
</objecttype>
|
</objecttype>
|
||||||
</objecttypes>
|
</objecttypes>
|
||||||
|
|||||||
@ -108,7 +108,10 @@ public class HitboxRectangle extends Hitbox {
|
|||||||
bottomPoint.y=currentPoint.y;
|
bottomPoint.y=currentPoint.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
referencePoint.x = bottomPoint.x-owner.getImage().getWidth()/2;
|
bottomPoint = isometricToCartesian(bottomPoint.x,bottomPoint.y,bottomPoint);
|
||||||
referencePoint.y = bottomPoint.y-owner.getImage().getHeight();
|
Point cartesianCenterImagePoint= new Point(0,0);
|
||||||
|
cartesianCenterImagePoint = isometricToCartesian(owner.getImage().getWidth()/2,owner.getImage().getHeight(),cartesianCenterImagePoint);
|
||||||
|
referencePoint.x = cartesianCenterImagePoint.x-bottomPoint.x;
|
||||||
|
referencePoint.y = cartesianCenterImagePoint.y-bottomPoint.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user