Collapsing implemented at Trading System only
This commit is contained in:
1 parent
589e2a594a
commit
64e154d165
3 files changed
+50
-2
No files matched your search
@@ -23,14 +23,18 @@ function newFloatingObject () {
|
||||
isPinned: false,
|
||||
isFrozen: false,
|
||||
isTensed: false,
|
||||
isCollapsed: false,
|
||||
frozenManually: false,
|
||||
collapsedManually: false,
|
||||
getPinStatus: getPinStatus,
|
||||
getFreezeStatus: getFreezeStatus,
|
||||
getCollapseStatus: getCollapseStatus,
|
||||
getTensionStatus: getTensionStatus,
|
||||
nearbyFloatingObjects: [],
|
||||
setPosition: setPosition,
|
||||
pinToggle: pinToggle,
|
||||
freezeToggle: freezeToggle,
|
||||
collapseToggle: collapseToggle,
|
||||
tensionToggle: tensionToggle,
|
||||
physics: physics,
|
||||
initializeMass: initializeMass,
|
||||
@@ -128,6 +132,10 @@ function newFloatingObject () {
|
||||
return thisObject.isFrozen
|
||||
}
|
||||
|
||||
function getCollapseStatus () {
|
||||
return thisObject.isCollapsed
|
||||
}
|
||||
|
||||
function getTensionStatus () {
|
||||
return thisObject.isTensed
|
||||
}
|
||||
@@ -143,6 +151,17 @@ function newFloatingObject () {
|
||||
return thisObject.isFrozen
|
||||
}
|
||||
|
||||
function collapseToggle () {
|
||||
if (thisObject.isCollapsed !== true) {
|
||||
thisObject.isCollapsed = true
|
||||
thisObject.collapsedManually = true
|
||||
} else {
|
||||
thisObject.isCollapsed = false
|
||||
thisObject.collapsedManually = false
|
||||
}
|
||||
return thisObject.isCollapsed
|
||||
}
|
||||
|
||||
function tensionToggle () {
|
||||
if (thisObject.isTensed !== true) {
|
||||
thisObject.isTensed = true
|
||||
@@ -158,6 +177,7 @@ function newFloatingObject () {
|
||||
thisObjectPhysics()
|
||||
thisObject.payload.uiObject.physics()
|
||||
frozenPhysics()
|
||||
collapsePhysics()
|
||||
tensionPhysics()
|
||||
}
|
||||
|
||||
@@ -170,6 +190,15 @@ function newFloatingObject () {
|
||||
}
|
||||
}
|
||||
|
||||
function collapsePhysics () {
|
||||
if (thisObject.collapsedManually === false) {
|
||||
let parent = thisObject.payload.chainParent
|
||||
if (parent !== undefined) {
|
||||
thisObject.isCollapsed = parent.payload.floatingObject.isCollapsed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function tensionPhysics () {
|
||||
/* Tension Effect */
|
||||
if (thisObject.isTensed === true) {
|
||||
|
||||
Reference in new issue
Block a user