-
Notifications
You must be signed in to change notification settings - Fork 936
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to use custom collision masks for draggable behavior (#…
…3738) * Added a toggle in draggable behavior parameters so that users can chose to use custom collision mask or not
- Loading branch information
Showing
9 changed files
with
227 additions
and
9 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
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
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
GDJS/tests/tests/Extensions/testruntimeobjectwithfakerenderer.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,29 @@ | ||
/** | ||
* A test object doing nothing, with a fake getRendererObject method. | ||
* | ||
* It's only used for testing: if you want | ||
* an example to start a new object, take a look at gdjs.DummyRuntimeObject | ||
* in the Extensions folder. | ||
*/ | ||
gdjs.TestRuntimeObjectWithFakeRenderer = class TestRuntimeObjectWithFakeRenderer extends gdjs.RuntimeObject { | ||
/** | ||
* @param {gdjs.RuntimeScene} runtimeScene | ||
* @param {ObjectData} objectData | ||
*/ | ||
constructor(runtimeScene, objectData) { | ||
// *ALWAYS* call the base gdjs.RuntimeObject constructor. | ||
super(runtimeScene, objectData); | ||
|
||
// *ALWAYS* call `this.onCreated()` at the very end of your object constructor. | ||
this.onCreated(); | ||
} | ||
|
||
getRendererObject() { | ||
return { visible: true }; | ||
} | ||
}; | ||
|
||
gdjs.registerObject( | ||
'TestObjectWithFakeRenderer::TestObjectWithFakeRenderer', | ||
gdjs.TestRuntimeObjectWithFakeRenderer | ||
); |
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