getContainer added across floating space

This commit is contained in:
Luis Fernando Molina committed 2019-05-04 18:06:21 +02:00
1 parent 7115daf686
commit 276db501b6
7 files changed
+118 -9

No files matched your search

+23 -2
View File
@@ -1,19 +1,30 @@
function newStrategyPart () {
const MODULE_NAME = 'Strategy Part'
let thisObject = {
type: undefined,
container: undefined,
physicsLoop: physicsLoop,
onMouseOver: onMouseOver,
onMouseClick: onMouseClick,
onMouseNotOver: onMouseNotOver,
drawBackground: drawBackground,
drawForeground: drawForeground,
getContainer: getContainer,
initialize: initialize
}
let ballStringMenu = []
thisObject.container = newContainer()
thisObject.container.name = MODULE_NAME
thisObject.container.initialize('Circle')
thisObject.container.isClickeable = true
thisObject.container.isDraggeable = false
thisObject.container.frame.radius = 0
thisObject.container.frame.position.x = 0
thisObject.container.frame.position.y = 0
let ballStringMenu = []
let floatingLayer
let isMouseOver = false
let image
@@ -263,6 +274,16 @@ function newStrategyPart () {
}
}
function getContainer (point) {
let container
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
return thisObject.container
} else {
return undefined
}
}
function physicsLoop () {
// The menuItems also have a target.