left right button working well
This commit is contained in:
1 parent
cf49462760
commit
b37611fda7
2 files changed
+26
-11
No files matched your search
@@ -93,14 +93,13 @@ function newLeftRightButton () {
|
||||
}
|
||||
|
||||
function physics () {
|
||||
return
|
||||
if (isInitialized === false) { return }
|
||||
|
||||
leftPosition.x = thisObject.parentContainer.frame.position.x
|
||||
leftPosition.y = canvas.chartingSpace.viewport.visibleArea.topRight.y
|
||||
leftPosition.x = canvas.chartingSpace.viewport.visibleArea.topLeft.x
|
||||
leftPosition.y = thisObject.parentContainer.frame.position.y
|
||||
|
||||
rightPosition.x = thisObject.parentContainer.frame.position.x
|
||||
rightPosition.y = canvas.chartingSpace.viewport.visibleArea.bottomRight.y
|
||||
rightPosition.x = canvas.chartingSpace.viewport.visibleArea.bottomRight.x
|
||||
rightPosition.y = thisObject.parentContainer.frame.position.y
|
||||
|
||||
if (thisObject.status === 'going right') {
|
||||
if (transitionPosition.x < rightPosition.x) {
|
||||
|
||||
+22
-6
@@ -167,16 +167,32 @@ function newPanelsSpace () {
|
||||
|
||||
if (panel.upDownButton !== undefined) {
|
||||
if (panel.upDownButton.status === 'up') {
|
||||
if (centerPoint.x < verticalLine) {
|
||||
panel.gravitatesTowards = 'topLeft'
|
||||
if (panel.leftRightButton !== undefined) {
|
||||
if (panel.leftRightButton.status === 'left') {
|
||||
panel.gravitatesTowards = 'topLeft'
|
||||
} else {
|
||||
panel.gravitatesTowards = 'topRight'
|
||||
}
|
||||
} else {
|
||||
panel.gravitatesTowards = 'topRight'
|
||||
if (centerPoint.x < verticalLine) {
|
||||
panel.gravitatesTowards = 'topLeft'
|
||||
} else {
|
||||
panel.gravitatesTowards = 'topRight'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (centerPoint.x < verticalLine) {
|
||||
panel.gravitatesTowards = 'bottomLeft'
|
||||
if (panel.leftRightButton !== undefined) {
|
||||
if (panel.leftRightButton.status === 'left') {
|
||||
panel.gravitatesTowards = 'bottomLeft'
|
||||
} else {
|
||||
panel.gravitatesTowards = 'bottomRight'
|
||||
}
|
||||
} else {
|
||||
panel.gravitatesTowards = 'bottomRight'
|
||||
if (centerPoint.x < verticalLine) {
|
||||
panel.gravitatesTowards = 'bottomLeft'
|
||||
} else {
|
||||
panel.gravitatesTowards = 'bottomRight'
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user