mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-25 11:18:55 +00:00
Minor fix.
This commit is contained in:
parent
2b304eaa75
commit
a4941c1273
@ -518,7 +518,7 @@
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
210.4441731196186,
|
||||
209.66956379694378,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@ -462,7 +462,7 @@ cc.Class({
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
cc.game.setFrameRate(60);
|
||||
cc.game.setFrameRate(59.9);
|
||||
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
|
||||
cc.view.enableAutoFullScreen(true);
|
||||
|
||||
|
@ -11,7 +11,7 @@ cc.Class({
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
cc.game.setFrameRate(60);
|
||||
cc.game.setFrameRate(59.9);
|
||||
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
|
||||
cc.view.enableAutoFullScreen(true);
|
||||
const self = this;
|
||||
|
@ -6908,20 +6908,24 @@ $packages["jsexport/battle"] = (function() {
|
||||
/* */ } return; } var $f = {$blk: generateRectColliderInCollisionSpace, $c: true, $r, blX, blY, collider, data, h, shape, tag, w, $s};return $f;
|
||||
};
|
||||
UpdateRectCollider = function(collider, wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) {
|
||||
var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, blX, blY, bottomPadding, collider, data, h, leftPadding, rectShape, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy;
|
||||
var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, blX, blY, bottomPadding, collider, data, effH, effW, h, leftPadding, rectShape, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy;
|
||||
_tuple = WorldToPolygonColliderBLPos(wx, wy, w * 0.5, h * 0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY);
|
||||
blX = _tuple[0];
|
||||
blY = _tuple[1];
|
||||
_tmp = blX;
|
||||
_tmp$1 = blY;
|
||||
_tmp$2 = w;
|
||||
_tmp$3 = h;
|
||||
collider.X = _tmp;
|
||||
collider.Y = _tmp$1;
|
||||
collider.W = _tmp$2;
|
||||
collider.H = _tmp$3;
|
||||
_tmp = leftPadding + w + rightPadding;
|
||||
_tmp$1 = bottomPadding + h + topPadding;
|
||||
effW = _tmp;
|
||||
effH = _tmp$1;
|
||||
_tmp$2 = blX;
|
||||
_tmp$3 = blY;
|
||||
_tmp$4 = effW;
|
||||
_tmp$5 = effH;
|
||||
collider.X = _tmp$2;
|
||||
collider.Y = _tmp$3;
|
||||
collider.W = _tmp$4;
|
||||
collider.H = _tmp$5;
|
||||
rectShape = $assertType(collider.Shape, ptrType$9);
|
||||
rectShape.UpdateAsRectangle(0, 0, w, h);
|
||||
rectShape.UpdateAsRectangle(0, 0, effW, effH);
|
||||
collider.Data = data;
|
||||
};
|
||||
$pkg.UpdateRectCollider = UpdateRectCollider;
|
||||
|
@ -1236,9 +1236,10 @@ func generateRectColliderInCollisionSpace(blX, blY, w, h float64, data interface
|
||||
|
||||
func UpdateRectCollider(collider *resolv.Object, wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY float64, data interface{}, tag string) {
|
||||
blX, blY := WorldToPolygonColliderBLPos(wx, wy, w*0.5, h*0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY)
|
||||
collider.X, collider.Y, collider.W, collider.H = blX, blY, w, h
|
||||
effW, effH := leftPadding+w+rightPadding, bottomPadding+h+topPadding
|
||||
collider.X, collider.Y, collider.W, collider.H = blX, blY, effW, effH
|
||||
rectShape := collider.Shape.(*resolv.ConvexPolygon)
|
||||
rectShape.UpdateAsRectangle(0, 0, w, h)
|
||||
rectShape.UpdateAsRectangle(0, 0, effW, effH)
|
||||
collider.Data = data
|
||||
// Ignore "tag" for now
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user