-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daaa508
commit 00687fa
Showing
8 changed files
with
65 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
templates/gameobjectshell/shell/methods/BackgroundMethods.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
templates/gameobjectshell/shell/methods/ControlPointsMethods.js
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
templates/gameobjectshell/shell/methods/CreateBackground.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import FullWindowRectangle from '../../fullwindowrectangle/FullWindowRectangle.js'; | ||
|
||
var CreateBackground = function (config) { | ||
var background = new FullWindowRectangle(this.scene); | ||
this.scene.add.existing(background); | ||
this.addToBackgroundLayer(background); | ||
|
||
var shell = this; | ||
var onUnSelectGameObject = function () { | ||
shell.onUnSelectGameObjectCallback(shell); | ||
} | ||
|
||
background | ||
.setInteractive() | ||
.on('pointerdown', onUnSelectGameObject) | ||
|
||
this.background = background; | ||
} | ||
|
||
export default CreateBackground; |
13 changes: 13 additions & 0 deletions
13
templates/gameobjectshell/shell/methods/CreateControlPoints.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import ControlPoints from '../../controlpoints/ControlPoints.js'; | ||
|
||
const GetValue = Phaser.Utils.Objects.GetValue; | ||
|
||
var CreateControlPoints = function (config) { | ||
var controlPoints = new ControlPoints(this.scene, GetValue(config, 'controlPoints')); | ||
this.scene.add.existing(controlPoints); | ||
this.addToUILayer(controlPoints); | ||
|
||
this.controlPoints = controlPoints; | ||
} | ||
|
||
export default CreateControlPoints; |
26 changes: 26 additions & 0 deletions
26
templates/gameobjectshell/shell/methods/CreatePropertiesPanel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import PropertiesPanel from '../../propertiespanel/PropertiesPanel.js'; | ||
|
||
const GetValue = Phaser.Utils.Objects.GetValue; | ||
|
||
var CreatePropertiesPanel = function (config) { | ||
var panelConfig = GetValue(config, 'panel', {}); | ||
var unknowPositon = (panelConfig.x === undefined) && (panelConfig.y === undefined); | ||
|
||
var extraProperties = GetValue(config, 'extraProperties', {}); | ||
|
||
var panel = new PropertiesPanel(this.scene, panelConfig, extraProperties); | ||
panel.setScrollFactor(0); | ||
|
||
this.scene.add.existing(panel); | ||
panel.layout(); | ||
this.addToUILayer(panel); | ||
|
||
if (unknowPositon) { | ||
panel.left = 0; | ||
panel.top = 0; | ||
} | ||
|
||
this.panel = panel; | ||
} | ||
|
||
export default CreatePropertiesPanel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
templates/gameobjectshell/shell/methods/PropertiesPanelMethods.js
This file was deleted.
Oops, something went wrong.