diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index a762c7f90..6894b88c1 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 253, + "build": 262, "major": 5, "minor": 6, "revision": 0 @@ -687,6 +687,18 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/3D City Kit (Roads)/Ground/0ecdbe600c3efca2dfce618286081460c6a079cff0dce79f21ae9514ca4a2896_Road Slant Curve.glb", "name": "Road Slant Curve.glb" } + }, + { + "file": "assets/LightGlow.png", + "kind": "image", + "metadata": "", + "name": "LightGlow.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/3D Particles/c17e2d500015e598624b763f4942b26e3aac96efca094cd20257a61e15b27fcb_LightGlow.png", + "name": "LightGlow.png" + } } ] }, @@ -1212,7 +1224,7 @@ "gridColor": 10401023, "gridAlpha": 0.5, "snap": true, - "zoomFactor": 0.2550455473354349, + "zoomFactor": 1.2121641972173733, "windowMask": false, "selectedLayer": "", "gameEditorMode": "embedded-game" @@ -2756,15 +2768,17 @@ "initialVariables": [] }, { - "angle": 61, + "angle": 53, "customSize": false, "height": 0, "layer": "", "name": "CommonTree", "persistentUuid": "10990ae3-86ae-4dc3-af87-9f72cfbed80e", + "rotationX": 24, + "rotationY": 324, "width": 0, - "x": -230, - "y": 958, + "x": -91, + "y": 995, "zOrder": 46, "numberProperties": [], "stringProperties": [], @@ -3077,6 +3091,7 @@ "layer": "", "name": "LargeBuildingA", "persistentUuid": "7fbca3aa-2a94-4cb9-b9e1-60168fcdd3a6", + "rotationX": 2, "width": 0, "x": -192, "y": 0, @@ -5824,9 +5839,117 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 157, + "customSize": false, + "height": 209, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "1841bf79-51ac-4a73-89ec-ac26e2c86e5f", + "rotationX": 172, + "rotationY": 17, + "width": 2889, + "x": -640, + "y": 1280, + "z": 160, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 15, + "customSize": false, + "height": 229.99999999999997, + "keepRatio": true, + "layer": "", + "name": "CarWithLight", + "persistentUuid": "2a179987-fdc0-449f-a695-861669abf036", + "width": 84, + "x": -380, + "y": 906, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 229, + "customSize": false, + "height": 80, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "cb846244-94b5-42fa-9f0a-819b5724d11b", + "rotationX": 51, + "rotationY": 27, + "width": 80, + "x": -768, + "y": 1024, + "z": 128, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 40, + "layer": "", + "name": "NewPointLight", + "persistentUuid": "6166ed78-f5d0-4870-af63-3946ae6cd218", + "width": 40, + "x": 173, + "y": 326, + "z": 96, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ + { + "assetStoreId": "", + "name": "CarWithLight", + "persistentUuid": "8c68bc8b-a967-4437-aded-55676b77618b", + "type": "CarWithLight::CarWithLight", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Dynamic", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 5, + "friction": 0.5, + "restitution": 0.2, + "linearDamping": 7, + "angularDamping": 4, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 + } + ], + "content": {} + }, { "assetStoreId": "", "name": "Dust", @@ -6259,6 +6382,7 @@ { "assetStoreId": "cddab55130dbd5a0b36f763200e876fb514aa608e1b057a136ebdb5f80006e2c", "name": "Player", + "persistentUuid": "1191f784-512d-4be4-812e-dafc9fc90438", "type": "Scene3D::Model3DObject", "variables": [ { @@ -6450,6 +6574,7 @@ { "assetStoreId": "541d82997e1d0e79b20a617cfcc249d1169d838db8512612894f18d64ea7374f", "name": "LargeBuildingF", + "persistentUuid": "c2cefe95-bc71-422b-b02c-bd5add6a5ece", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6504,6 +6629,7 @@ { "assetStoreId": "479c508ead309e45d684605c3539fd2b3a3a3a1ea8a277f102e8366873aad249", "name": "LargeBuildingA", + "persistentUuid": "7b48ac43-d7c0-4a54-9f78-3a478c31f5a9", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6558,6 +6684,7 @@ { "assetStoreId": "fcb1a484380a00837bfc40406681f434dd57cce8bdf94694b237fc809bf7b4fb", "name": "SuvLuxury", + "persistentUuid": "8c3ec4d2-5fb2-4c24-a3e0-16fedb3d34b5", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6612,6 +6739,7 @@ { "assetStoreId": "0d7e7a700fe654df077830ff50844449cdaddbb46dbe23de65f970569e6a983b", "name": "Van", + "persistentUuid": "1b6bca7b-4c49-447e-bd6f-e01f6984557c", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6701,6 +6829,7 @@ { "assetStoreId": "bbdd1d6c7d452e1847310eb327cddabe057cb893886f3a7a1af1c38e353eac92", "name": "RoadStraight", + "persistentUuid": "942e6569-1aba-4fb8-b074-8f0a7898d9e6", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6755,6 +6884,7 @@ { "assetStoreId": "ae09642f549122b398405ffda9bd787c20f0fdfcb555a4535c710a3f218c8130", "name": "RoadCrossroadPath", + "persistentUuid": "01e095c5-60d6-4098-a600-f8f1ffc71b6c", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -6830,6 +6960,7 @@ { "assetStoreId": "16fac9714ba0a9eb3c83984910c70b11affca1b4e6a8bed49c22af1d30f957da", "name": "CommonTree", + "persistentUuid": "bb29ff81-6779-40ec-9237-7e1f1c58ec30", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -7059,6 +7190,7 @@ { "assetStoreId": "0e3ee52ba8369c68fe75e3b34a056876ba39b1d0dbb9de6e83e1f2ea0e6f94ac", "name": "Coin", + "persistentUuid": "05ccb89d-e333-4fd9-bceb-ce4e2e070ad4", "type": "Scene3D::Model3DObject", "variables": [], "effects": [], @@ -7144,6 +7276,69 @@ "width": 768, "animations": [] } + }, + { + "assetStoreId": "", + "name": "NewSpotLight", + "persistentUuid": "603e3582-a594-4477-b5a4-9662dc5b1c13", + "type": "Light3D::SpotLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "content": { + "Color": "255;0;0", + "Smoothing": 1, + "Image": "", + "ShadowQuality": "Low", + "ConeAngle": 30, + "VisibilityDistanceMax": 2000, + "IsCastingShadow": true, + "Intensity": 4, + "ConeLength": 0 + } + }, + { + "assetStoreId": "", + "name": "NewMyObject", + "persistentUuid": "fec09ba1-5902-4c82-823b-3674de8a2bf6", + "type": "UntitledExtension::MyObject", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + }, + { + "assetStoreId": "", + "name": "NewMyObject2", + "persistentUuid": "87b23a22-256f-4a00-9451-786380e34c12", + "type": "UntitledExtension::MyObject2", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + }, + { + "assetStoreId": "", + "name": "NewPointLight", + "persistentUuid": "39b8b2db-dc3f-4ff4-9089-cf2218f2ec7f", + "type": "Light3D::PointLight3D", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "ShadowQuality": "Low", + "Intensity": 4, + "Color": "133;255;0" + } } ], "objectsFolderStructure": { @@ -7241,6 +7436,21 @@ }, { "objectName": "Coin" + }, + { + "objectName": "NewMyObject" + }, + { + "objectName": "NewMyObject2" + }, + { + "objectName": "NewSpotLight" + }, + { + "objectName": "NewPointLight" + }, + { + "objectName": "CarWithLight" } ] }, @@ -7282,6 +7492,82 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularFloodFill::CreateObjectsOverRectangle" + }, + "parameters": [ + "", + "NewSpotLight", + "16", + "16", + "Player.X() - 8 * (1000 - 40)", + "Player.Y() - 8 * (1000 - 40)", + "1000", + "1000", + "", + "0", + "" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::TurnAroundY" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "90" + ] + }, + { + "type": { + "value": "Scene3D::Base3DBehavior::SetZ" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "=", + "400" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SetLightCountMax" + }, + "parameters": [ + "", + "=", + "3", + "" + ] + }, + { + "type": { + "value": "Light3D::SetLightShadowCountMax" + }, + "parameters": [ + "", + "=", + "1", + "" + ] + } + ] + } ] }, { @@ -8464,6 +8750,138 @@ "parameters": [] } ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "NewSpotLight", + "30", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Scene3D::Base3DBehavior::SetRotationY" + }, + "parameters": [ + "NewSpotLight", + "Object3D", + "+", + "30 * TimeDelta()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "NewSpotLight", + "0", + "20", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::LookAtObject" + }, + "parameters": [ + "NewSpotLight", + "Player", + "Object3D", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::IsPlaying" + }, + "parameters": [ + "NewSpotLight", + "Tween", + "\"Color\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetColor" + }, + "parameters": [ + "NewSpotLight", + "=", + "\"208;2;27\"", + "" + ] + }, + { + "type": { + "value": "Tween::TweenBehavior::AddObjectColorTween2" + }, + "parameters": [ + "NewSpotLight", + "Tween", + "\"Color\"", + "\"248;231;28\"", + "\"linear\"", + "3", + "", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(NewSpotLight.Width()) + \" \" + ToString(NewSpotLight.Height()) + \" \" + ToString(NewSpotLight.Object3D::Depth())", + "\"info\"", + "" + ] + } + ] } ], "layers": [ @@ -8502,12 +8920,12 @@ "distanceFromCamera": 1500, "elevation": 40, "frustumSize": 4000, - "intensity": 0.75, + "intensity": 0.3, "minimumShadowBias": 0, "rotation": 300 }, "stringParameters": { - "color": "255;255;255", + "color": "52;100;255", "shadowQuality": "medium", "top": "Z+" }, @@ -8522,7 +8940,7 @@ "density": 0.0006 }, "stringParameters": { - "color": "239;254;255" + "color": "22;42;105" }, "booleanParameters": {} }, @@ -8531,12 +8949,12 @@ "name": "HemisphereLight", "doubleParameters": { "elevation": 80, - "intensity": 0.33, + "intensity": 0.2, "rotation": 120 }, "stringParameters": { - "groundColor": "128;128;128", - "skyColor": "255;255;255", + "groundColor": "0;0;0", + "skyColor": "52;100;255", "top": "Z+" }, "booleanParameters": {} @@ -8723,6 +9141,10 @@ { "name": "ThirdPersonCamera", "type": "ThirdPersonCamera::ThirdPersonCamera" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ] }, @@ -9283,203 +9705,888 @@ "type": "ScreenWrap::ScreenWrap" } ] - } - ], - "externalEvents": [], - "eventsFunctionsExtensions": [ + }, { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Screen Orientation Checker", - "gdevelopVersion": ">=5.5.222", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", - "name": "ScreenOrientationChecker", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", - "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "version": "0.2.2", - "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", - "origin": { - "identifier": "ScreenOrientationChecker", - "name": "gdevelop-extension-store" + "b": 83, + "disableInputWhenNotFocused": true, + "mangledName": "Untitled_32scene", + "name": "Untitled scene", + "r": 83, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 83, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.546875, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "embedded-game" }, - "tags": [ - "screen", - "orientation" + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 100, + "layer": "", + "name": "NewMyObject", + "persistentUuid": "a688ee58-a45a-41ea-9991-69edc29534d1", + "width": 100, + "x": 0, + "y": 0, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } ], - "authorIds": [ - "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + "objects": [ + { + "assetStoreId": "", + "name": "NewMyObject2", + "persistentUuid": "4d95a9bf-32e5-43fc-ad8b-774d0c9d0d8d", + "type": "UntitledExtension::MyObject2", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + }, + { + "assetStoreId": "", + "name": "NewMyObject", + "persistentUuid": "1b73ba89-d129-41e4-8383-147a19ab77bb", + "type": "UntitledExtension::MyObject", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {} + } ], - "dependencies": [], - "globalVariables": [ + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "NewMyObject2" + }, + { + "objectName": "NewMyObject" + } + ] + }, + "events": [ { - "name": "TargetOrientation", - "type": "string", - "value": "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ], - "sceneVariables": [], - "eventsFunctions": [ + "layers": [ { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", - "private": true, - "sentence": "Events are running for the editor", - "events": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "parameters": [], - "objectGroups": [] + "effects": [ + { + "effectType": "Scene3D::HemisphereLight", + "name": "3D Ambient Hemisphere Light", + "doubleParameters": { + "elevation": 40, + "intensity": 0.33, + "rotation": 300 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" + }, + "booleanParameters": {} + }, + { + "effectType": "Scene3D::DirectionalLight", + "name": "3D Sun Light", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 40, + "frustumSize": 4000, + "intensity": 0.75, + "minimumShadowBias": 0, + "rotation": 300 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } + } + ] + } + ], + "behaviorsSharedData": [ + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" }, { - "fullName": "Get game target orientation", - "functionType": "StringExpression", - "name": "ProjectOrientation", - "private": true, - "sentence": "", - "events": [ + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + } + ] + }, + { + "b": 95, + "disableInputWhenNotFocused": true, + "mangledName": "Untitled_32scene2", + "name": "Untitled scene2", + "r": 95, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 95, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.546875, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "LargeBuildingF", + "persistentUuid": "95953695-4e00-4bb9-8418-59cb2bf09ce3", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "541d82997e1d0e79b20a617cfcc249d1169d838db8512612894f18d64ea7374f", + "name": "LargeBuildingF", + "persistentUuid": "e50997fc-f8fc-4710-9b25-39c410ce2aec", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "object3D": "Object3D", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "shape": "Box", + "shapeOrientation": "Z", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeDimensionC": 0, + "density": 5, + "friction": 0.01, + "restitution": 0.01, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 17, + "masks": 17, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "shapeOffsetZ": 0, + "massCenterOffsetX": 0, + "massCenterOffsetY": 0, + "massCenterOffsetZ": 0, + "massOverride": 0 } ], - "expressionType": { - "type": "string" - }, - "parameters": [], - "objectGroups": [] - }, + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, + "depth": 282, + "height": 128, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": false, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "Large Building F2.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": 0, + "width": 384, + "animations": [] + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "LargeBuildingF" + } + ] + }, + "events": [], + "layers": [ { - "fullName": "", - "functionType": "Action", - "name": "onFirstSceneLoaded", - "sentence": "", - "events": [ + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "TargetOrientation", - "=", - "ScreenOrientationChecker::ProjectOrientation()" - ] - } - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "parameters": [], - "objectGroups": [] + "effects": [ + { + "effectType": "Scene3D::HemisphereLight", + "name": "3D Ambient Hemisphere Light", + "doubleParameters": { + "elevation": 40, + "intensity": 0.33, + "rotation": 300 + }, + "stringParameters": { + "groundColor": "127;127;127", + "skyColor": "255;255;255", + "top": "Z+" + }, + "booleanParameters": {} + }, + { + "effectType": "Scene3D::DirectionalLight", + "name": "3D Sun Light", + "doubleParameters": { + "distanceFromCamera": 1500, + "elevation": 40, + "frustumSize": 4000, + "intensity": 0.75, + "minimumShadowBias": 0, + "rotation": 300 + }, + "stringParameters": { + "color": "255;255;255", + "shadowQuality": "medium", + "top": "Z+" + }, + "booleanParameters": { + "isCastingShadow": true + } + } + ] } ], + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Physics3D", + "type": "Physics3D::Physics3DBehavior", + "gravityX": 0, + "gravityY": 0, + "gravityZ": -9.8, + "worldScale": 100 + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "CarWithLight", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { - "areaMaxX": 400, - "areaMaxY": 200, - "areaMaxZ": 0, + "areaMaxX": 84, + "areaMaxY": 45, + "areaMaxZ": 39, "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, "defaultName": "", - "description": "Automatically display a screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Set up Anchor behavior on this object so that top/bottom/left/right edges are anchored to the screen top/bottom/left/right.", - "fullName": "Screen Orientation Checker", - "isInnerAreaFollowingParentSize": true, + "description": "", + "fullName": "", + "helpPath": "", + "iconUrl": "", + "is3D": true, "isUsingLegacyInstancesRenderer": false, - "name": "ScreenOrientationChecker", + "name": "CarWithLight", + "previewIconUrl": "", "objects": [ + { + "assetStoreId": "fcb1a484380a00837bfc40406681f434dd57cce8bdf94694b237fc809bf7b4fb", + "name": "SuvLuxury2", + "persistentUuid": "3828f041-2098-4d60-96a7-eb69bbab4072", + "type": "Scene3D::Model3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "centerLocation": "ObjectCenter", + "crossfadeDuration": 0, + "depth": 84, + "height": 84, + "isCastingShadow": true, + "isReceivingShadow": true, + "keepAspectRatio": true, + "materialType": "StandardWithoutMetalness", + "modelResourceName": "Suv Luxury5.glb", + "originLocation": "ModelOrigin", + "rotationX": 90, + "rotationY": 0, + "rotationZ": -90, + "width": 84, + "animations": [] + } + }, { "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Text", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, + "name": "NewSpotLight", + "persistentUuid": "eeb6eabc-7138-4c11-b928-a4c84341087d", + "type": "Light3D::SpotLight3D", + "variant": "", "variables": [], "effects": [], "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 0, - "topEdgeAnchor": 4, - "useLegacyBottomAndRightAnchors": false - }, { "name": "Tween", "type": "Tween::TweenBehavior" } ], - "string": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, "content": { - "bold": true, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Rotate screen to play", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 30, - "lineHeight": 0, - "color": "255;255;255" + "Color": "255;0;0", + "Smoothing": 0, + "Image": "", + "Intensity": 4 } }, { - "assetStoreId": "", - "name": "BackgroundPainter", - "type": "PrimitiveDrawing::Drawer", + "assetStoreId": "351f05a136c91ee1d9d6ff4f9cfbc4d40b3744d7c7ea74212b4853862d52d974", + "name": "RedFlame", + "persistentUuid": "2bc4ffe0-28c2-4aca-89d0-02c449ec6be5", + "type": "ParticleEmitter3D::ParticleEmitter3D", + "variant": "", "variables": [], "effects": [], "behaviors": [], - "fillOpacity": 255, - "outlineSize": 0, - "outlineOpacity": 255, - "absoluteCoordinates": true, - "clearBetweenFrames": true, - "antialiasing": "none", - "fillColor": { - "r": 0, + "content": { + "EndColor": "128;0;0", + "StartColor": "160;80;40", + "StartOpacity": 204, + "SpayConeAngle": 30, + "StartSizeMin": 64, + "StartSizeMax": 64, + "EndScale": 0.375, + "Flow": 80, + "LifespanMin": 2, + "LifespanMax": 2, + "Duration": 123456, + "StartSpeedMin": 300, + "StartSpeedMax": 600, + "ShouldAutodestruct": true, + "EndOpacity": 48 + }, + "childrenContent": { + "Particle": { + "adaptCollisionMaskAutomatically": true, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Image", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "LightGlow.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "SuvLuxury2" + }, + { + "objectName": "NewSpotLight" + }, + { + "objectName": "RedFlame" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 45, + "layer": "", + "name": "SuvLuxury2", + "persistentUuid": "2effbf27-6e9a-459f-84da-7ee97fbce52c", + "width": 84, + "x": 42, + "y": 22.5, + "z": 6.6613381477509385e-15, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "NewSpotLight", + "persistentUuid": "836edb61-77b1-405d-9486-6e89f77402c4", + "width": 0, + "x": 87, + "y": 23, + "z": 24, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 32, + "layer": "", + "name": "RedFlame", + "persistentUuid": "32d80c42-1b6a-4def-a073-d647936b6f5a", + "rotationY": 90, + "width": 32, + "x": 82, + "y": 23, + "z": 24, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.587369443325651, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "embedded-game" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + } + ] + }, + { + "author": "", + "category": "Input", + "dimension": "", + "extensionNamespace": "", + "fullName": "Screen Orientation Checker", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", + "name": "ScreenOrientationChecker", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", + "shortDescription": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", + "version": "0.2.2", + "description": "Display a customizable screen asking the user to rotate their phone/tablet if not in the right orientation.", + "origin": { + "identifier": "ScreenOrientationChecker", + "name": "gdevelop-extension-store" + }, + "tags": [ + "screen", + "orientation" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "globalVariables": [ + { + "name": "TargetOrientation", + "type": "string", + "value": "" + } + ], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "Get game target orientation", + "functionType": "StringExpression", + "name": "ProjectOrientation", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "ScreenOrientationChecker::ProjectOrientation()" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "ProjectOrientation" + }, + { + "functionName": "onFirstSceneLoaded" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "Automatically display a screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Set up Anchor behavior on this object so that top/bottom/left/right edges are anchored to the screen top/bottom/left/right.", + "fullName": "Screen Orientation Checker", + "helpPath": "", + "iconUrl": "", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "ScreenOrientationChecker", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "lineHeight": 0, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 0, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, "g": 0, "b": 0 }, @@ -10389,6 +11496,32 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "DrawBackground" + }, + { + "functionName": "IsForceShown" + }, + { + "functionName": "SetIsForceShown" + }, + { + "functionName": "Message" + }, + { + "functionName": "SetMessage" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -10720,6 +11853,7 @@ { "author": "Bouh", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Gamepads (controllers)", "gdevelopVersion": ">=5.5.222", @@ -12928,12 +14062,113 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "onSceneLoaded" + }, + { + "functionName": "onScenePostEvents" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "TriggerPressure" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickRotationValue" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "AxisValue" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "C_Button_released" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "LastButtonID" + }, + { + "functionName": "C_Any_Button_pressed" + }, + { + "functionName": "LastButtonString" + }, + { + "functionName": "GamepadCount" + }, + { + "functionName": "C_Button_pressed" + }, + { + "functionName": "Deadzone" + }, + { + "functionName": "A_Set_deadzone" + }, + { + "functionName": "C_Axis_pushed" + }, + { + "functionName": "ConnectedGamepadsCount" + }, + { + "functionName": "GamepadType" + }, + { + "functionName": "C_Controller_type" + }, + { + "functionName": "C_Controller_X_is_connected" + }, + { + "functionName": "A_Vibrate_controller" + }, + { + "functionName": "A_Advanced_Vibration_Controller" + }, + { + "functionName": "A_Change_Vibration_Magnitude" + }, + { + "functionName": "C_any_button_released" + }, + { + "functionName": "WeakVibrationMagnitude" + }, + { + "functionName": "StrongVibrationMagnitude" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Control a platformer character with a gamepad.", "fullName": "Platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13417,6 +14652,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13529,8 +14772,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D platformer gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13643,6 +14889,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13745,8 +14999,11 @@ { "description": "Control a 3D physics character with a gamepad.", "fullName": "3D shooter gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -13848,6 +15105,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -13970,8 +15235,11 @@ { "description": "Control camera rotations with a gamepad.", "fullName": "First person camera gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -14212,6 +15480,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -14292,6 +15561,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -14372,6 +15642,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera gamepad mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -14452,6 +15723,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -14532,6 +15804,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -14612,6 +15885,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -14692,6 +15966,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -14772,6 +16047,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera gamepad mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -14852,6 +16128,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera gamepad mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -14888,6 +16165,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera gamepad mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera gamepad mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera gamepad mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15072,8 +16434,11 @@ { "description": "Control a 3D physics car with a gamepad.", "fullName": "3D car gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -15357,6 +16722,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -15469,8 +16842,11 @@ { "description": "Control a top-down character with a gamepad.", "fullName": "Top-down gamepad mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownGamepadMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -16048,6 +17424,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -16143,6 +17527,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": ">=5.5.222", @@ -18127,12 +19512,94 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "AcceleratedSpeed" + }, + { + "functionName": "IsButtonJustPressed" + }, + { + "functionName": "IsButtonPressed" + }, + { + "functionName": "IsButtonReleased" + }, + { + "functionName": "SetButtonState" + }, + { + "functionName": "SetDeadZone" + }, + { + "functionName": "DeadZone" + }, + { + "functionName": "AngleTo4Way" + }, + { + "functionName": "AngleTo8Way" + }, + { + "functionName": "IsAngleIn4WayDirection" + }, + { + "functionName": "IsAngleIn8WayDirection" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "folderName": "Multitouch Joystick", + "children": [ + { + "functionName": "HasTouchStartedOnScreenSide" + } + ] + } + ] + }, "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "name": "MultitouchJoystick", "objectType": "", + "previewIconUrl": "", "private": true, "eventsFunctions": [ { @@ -19031,6 +20498,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -19111,6 +20579,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -19191,6 +20660,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -19283,6 +20753,76 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "SetJoystickForce" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "SetJoystickAngle" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "Reset" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + }, + { + "functionName": "ForceStartPressing" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -19362,8 +20902,11 @@ { "description": "Detect presses made on a touchscreen on the object so it acts like a button and automatically trigger the button having the same identifier for the mapper behaviors.", "fullName": "Multitouch button", + "helpPath": "", + "iconUrl": "", "name": "MultitouchButton", "objectType": "", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -19850,6 +21393,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsJustPressed" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsReleased" + }, + { + "functionName": "SetButtonState" + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -19930,8 +21493,11 @@ { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PlatformerMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -20105,6 +21671,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20173,8 +21747,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D platformer multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Platformer3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -20269,6 +21846,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20337,8 +21922,11 @@ { "description": "Control a 3D physics character with a multitouch controller.", "fullName": "3D shooter multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "Shooter3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -20422,6 +22010,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -20490,8 +22086,11 @@ { "description": "Control camera rotations with a multitouch controller.", "fullName": "First person camera multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "FirstPersonMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -20732,6 +22331,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationSpeedMax", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationSpeedMax", "sentence": "", "events": [ @@ -20812,6 +22412,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationAcceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationAcceleration", "sentence": "", "events": [ @@ -20892,6 +22493,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "HorizontalRotationDeceleration", + "group": "First person camera multitouch controller mapper horizontal rotation configuration", "name": "SetHorizontalRotationDeceleration", "sentence": "", "events": [ @@ -20972,6 +22574,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationSpeedMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationSpeedMax", "sentence": "", "events": [ @@ -21052,6 +22655,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationAcceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationAcceleration", "sentence": "", "events": [ @@ -21132,6 +22736,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalRotationDeceleration", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalRotationDeceleration", "sentence": "", "events": [ @@ -21212,6 +22817,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMin", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMin", "sentence": "", "events": [ @@ -21292,6 +22898,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "VerticalAngleMax", + "group": "First person camera multitouch controller mapper vertical rotation configuration", "name": "SetVerticalAngleMax", "sentence": "", "events": [ @@ -21372,6 +22979,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "First person camera multitouch controller mapper position configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -21408,6 +23016,91 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromObjectEyes" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper horizontal rotation configuration", + "children": [ + { + "functionName": "HorizontalRotationSpeedMax" + }, + { + "functionName": "SetHorizontalRotationSpeedMax" + }, + { + "functionName": "HorizontalRotationAcceleration" + }, + { + "functionName": "SetHorizontalRotationAcceleration" + }, + { + "functionName": "HorizontalRotationDeceleration" + }, + { + "functionName": "SetHorizontalRotationDeceleration" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper vertical rotation configuration", + "children": [ + { + "functionName": "VerticalRotationSpeedMax" + }, + { + "functionName": "SetVerticalRotationSpeedMax" + }, + { + "functionName": "VerticalRotationAcceleration" + }, + { + "functionName": "SetVerticalRotationAcceleration" + }, + { + "functionName": "VerticalRotationDeceleration" + }, + { + "functionName": "SetVerticalRotationDeceleration" + }, + { + "functionName": "VerticalAngleMin" + }, + { + "functionName": "SetVerticalAngleMin" + }, + { + "functionName": "VerticalAngleMax" + }, + { + "functionName": "SetVerticalAngleMax" + } + ] + }, + { + "folderName": "First person camera multitouch controller mapper position configuration", + "children": [ + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -21598,8 +23291,11 @@ { "description": "Control a 3D physics car with a multitouch controller.", "fullName": "3D car multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -21712,6 +23408,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -21800,8 +23504,11 @@ { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", + "helpPath": "", + "iconUrl": "", "name": "TopDownMultitouchMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -22308,6 +24015,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -22398,8 +24113,11 @@ "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", + "helpPath": "", + "iconUrl": "", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": false, @@ -23460,6 +25178,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetControllerIdentifier", "sentence": "", "events": [ @@ -23532,6 +25251,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", + "group": "Multitouch Joystick configuration", "name": "SetJoystickIdentifier", "sentence": "", "events": [ @@ -23604,6 +25324,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", + "group": "Multitouch Joystick configuration", "name": "SetDeadZoneRadius", "sentence": "", "events": [ @@ -23637,6 +25358,85 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateConfiguration" + }, + { + "functionName": "TeleportAndPress" + }, + { + "functionName": "ParentTouchX" + }, + { + "functionName": "ParentTouchY" + }, + { + "functionName": "ActivateControl" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "JoystickForce" + }, + { + "functionName": "StickForce" + }, + { + "functionName": "StickForceX" + }, + { + "functionName": "StickForceY" + }, + { + "functionName": "JoystickAngle" + }, + { + "functionName": "StickAngle" + }, + { + "functionName": "IsDirectionPushed4Way" + }, + { + "functionName": "IsDirectionPushed8Way" + }, + { + "folderName": "Multitouch Joystick configuration", + "children": [ + { + "functionName": "ControllerIdentifier" + }, + { + "functionName": "SetControllerIdentifier" + }, + { + "functionName": "JoystickIdentifier" + }, + { + "functionName": "SetJoystickIdentifier" + }, + { + "functionName": "DeadZoneRadius" + }, + { + "functionName": "SetDeadZoneRadius" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "1", @@ -23751,6 +25551,7 @@ { "author": "", "category": "Input", + "dimension": "", "extensionNamespace": "", "fullName": "3D car keyboard mapper", "gdevelopVersion": ">=5.5.222", @@ -23775,12 +25576,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Control a 3D physics car with a keyboard.", "fullName": "3D car keyboard mapper", + "helpPath": "", + "iconUrl": "", "name": "PhysicsCar3DKeyboardMapper", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -23931,6 +25738,14 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -24003,6 +25818,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D object shake", "gdevelopVersion": ">=5.5.222", @@ -25325,12 +27141,80 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onFirstSceneLoaded" + }, + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "Noise2d" + }, + { + "functionName": "Noise3d" + }, + { + "functionName": "Noise4d" + }, + { + "functionName": "Create" + }, + { + "functionName": "Delete" + }, + { + "functionName": "DeleteAll" + }, + { + "functionName": "SetSeed" + }, + { + "functionName": "SetLoopPeriodX" + }, + { + "functionName": "SetLoopPeriodY" + }, + { + "functionName": "SetFrequency" + }, + { + "functionName": "SetOctaves" + }, + { + "functionName": "SetPersistence" + }, + { + "functionName": "SetLacunarity" + }, + { + "functionName": "Seed" + }, + { + "functionName": "Frequency" + }, + { + "functionName": "Octaves" + }, + { + "functionName": "Persistence" + }, + { + "functionName": "Lacunarity" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Shake 3D objects with translation and rotation.", "fullName": "3D shake", + "helpPath": "", + "iconUrl": "", "name": "ShakeModel3D", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -26379,6 +28263,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Frequency", + "group": "ShakeObject3D configuration", "name": "SetFrequency", "sentence": "", "events": [ @@ -26612,6 +28497,52 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "Shake" + }, + { + "functionName": "StartShaking" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + }, + { + "functionName": "IsStopping" + }, + { + "folderName": "ShakeObject3D configuration", + "children": [ + { + "functionName": "Frequency" + }, + { + "functionName": "SetFrequency" + } + ] + }, + { + "functionName": "StartEasingFactor" + }, + { + "functionName": "StopEasingFactor" + } + ] + }, "propertyDescriptors": [ { "value": "0", @@ -26844,6 +28775,7 @@ { "author": "", "category": "Camera", + "dimension": "", "extensionNamespace": "", "fullName": "Third person camera", "gdevelopVersion": ">=5.5.222", @@ -27385,12 +29317,43 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "LookFromDistanceAtPosition" + }, + { + "functionName": "LookFromDistanceAtObject" + }, + { + "functionName": "LookFromDistanceAtPosition3D" + }, + { + "folderName": "Layers and cameras", + "children": [ + { + "functionName": "LookFromDistanceAtObject3D" + } + ] + }, + { + "functionName": "RotatedX" + }, + { + "functionName": "RotatedY" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Smoothly follow an object at a distance.", "fullName": "Third person camera", + "helpPath": "", + "iconUrl": "", "name": "ThirdPersonCamera", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -28116,6 +30079,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetRotationHalfwayDuration", "sentence": "", "events": [ @@ -28218,6 +30182,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationHalfwayDuration", + "group": "Third person camera configuration", "name": "SetElevationHalfwayDuration", "sentence": "", "events": [ @@ -28320,6 +30285,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TranslationZHalfwayDuration", + "group": "Third person camera configuration", "name": "SetTranslationZHalfwayDuration", "sentence": "", "events": [ @@ -28506,6 +30472,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMax", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMax", "sentence": "", "events": [ @@ -28586,6 +30553,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "FollowFreeAreaZMin", + "group": "Third person camera configuration", "name": "SetFollowFreeAreaZMin", "sentence": "", "events": [ @@ -28666,6 +30634,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Distance", + "group": "Third person camera configuration", "name": "SetDistance", "sentence": "", "events": [ @@ -28746,6 +30715,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetX", + "group": "Third person camera configuration", "name": "SetOffsetX", "sentence": "", "events": [ @@ -28826,6 +30796,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetY", + "group": "Third person camera configuration", "name": "SetOffsetY", "sentence": "", "events": [ @@ -28906,6 +30877,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "OffsetZ", + "group": "Third person camera configuration", "name": "SetOffsetZ", "sentence": "", "events": [ @@ -28986,6 +30958,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationAngleOffset", + "group": "Third person camera configuration", "name": "SetRotationAngleOffset", "sentence": "", "events": [ @@ -29066,6 +31039,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "ElevationAngleOffset", + "group": "Third person camera configuration", "name": "SetElevationAngleOffset", "sentence": "", "events": [ @@ -29146,6 +31120,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "TargetedRotationAngle", + "group": "Third person camera configuration", "name": "SetTargetedRotationAngle", "sentence": "", "events": [ @@ -29192,6 +31167,120 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "MoveCameraCloser" + }, + { + "functionName": "DoMoveCameraCloser" + }, + { + "functionName": "JumpToTargetedRotation" + }, + { + "functionName": "RotationAngle" + }, + { + "functionName": "SetCameraRotation" + }, + { + "folderName": "Third person camera configuration", + "children": [ + { + "functionName": "RotationHalfwayDuration" + }, + { + "functionName": "SetRotationHalfwayDuration" + }, + { + "functionName": "ElevationHalfwayDuration" + }, + { + "functionName": "SetElevationHalfwayDuration" + }, + { + "functionName": "TranslationZHalfwayDuration" + }, + { + "functionName": "SetTranslationZHalfwayDuration" + }, + { + "functionName": "FollowFreeAreaZMax" + }, + { + "functionName": "SetFollowFreeAreaZMax" + }, + { + "functionName": "FollowFreeAreaZMin" + }, + { + "functionName": "SetFollowFreeAreaZMin" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SetDistance" + }, + { + "functionName": "OffsetX" + }, + { + "functionName": "SetOffsetX" + }, + { + "functionName": "OffsetY" + }, + { + "functionName": "SetOffsetY" + }, + { + "functionName": "OffsetZ" + }, + { + "functionName": "SetOffsetZ" + }, + { + "functionName": "RotationAngleOffset" + }, + { + "functionName": "SetRotationAngleOffset" + }, + { + "functionName": "ElevationAngleOffset" + }, + { + "functionName": "SetElevationAngleOffset" + }, + { + "functionName": "TargetedRotationAngle" + }, + { + "functionName": "SetTargetedRotationAngle" + } + ] + }, + { + "folderName": "Private", + "children": [ + { + "functionName": "FreeAreaZMin" + }, + { + "functionName": "FreeAreaZMax" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -29462,6 +31551,7 @@ { "author": "", "category": "Visual effect", + "dimension": "", "extensionNamespace": "", "fullName": "3D particle emitter", "gdevelopVersion": ">=5.5.222", @@ -36329,6 +38419,17 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onScenePreEvents" + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [ { @@ -36341,9 +38442,12 @@ "defaultName": "ParticleEmitter", "description": "Display a large number of particles to create visual effects.", "fullName": "3D particle emitter", + "helpPath": "", + "iconUrl": "", "is3D": true, "isUsingLegacyInstancesRenderer": true, "name": "ParticleEmitter3D", + "previewIconUrl": "", "objects": [ { "adaptCollisionMaskAutomatically": true, @@ -37395,6 +39499,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Z", + "group": "Position", "name": "SetZ", "private": true, "sentence": "", @@ -37467,6 +39572,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationX", + "group": "Angle", "name": "SetRotationX", "private": true, "sentence": "", @@ -37550,6 +39656,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "RotationY", + "group": "Angle", "name": "SetRotationY", "private": true, "sentence": "", @@ -37632,6 +39739,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartColor", + "group": "3D particle emitter color configuration", "name": "SetStartColor", "sentence": "", "events": [ @@ -37714,6 +39822,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndColor", + "group": "3D particle emitter color configuration", "name": "SetEndColor", "sentence": "", "events": [ @@ -37796,6 +39905,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartOpacity", + "group": "3D particle emitter color configuration", "name": "SetStartOpacity", "sentence": "", "events": [ @@ -37878,6 +39988,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndOpacity", + "group": "3D particle emitter color configuration", "name": "SetEndOpacity", "sentence": "", "events": [ @@ -37960,6 +40071,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Flow", + "group": "3D particle emitter configuration", "name": "SetFlow", "sentence": "", "events": [ @@ -38043,6 +40155,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMin", + "group": "3D particle emitter configuration", "name": "SetStartSizeMin", "sentence": "", "events": [ @@ -38125,6 +40238,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSizeMax", + "group": "3D particle emitter configuration", "name": "SetStartSizeMax", "sentence": "", "events": [ @@ -38208,6 +40322,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "EndScale", + "group": "3D particle emitter configuration", "name": "SetEndScale", "sentence": "", "events": [ @@ -38291,6 +40406,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMin", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMin", "sentence": "", "events": [ @@ -38373,6 +40489,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "StartSpeedMax", + "group": "3D particle emitter speed configuration", "name": "SetStartSpeedMax", "sentence": "", "events": [ @@ -38455,6 +40572,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMin", + "group": "3D particle emitter configuration", "name": "SetLifespanMin", "sentence": "", "events": [ @@ -38538,6 +40656,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "LifespanMax", + "group": "3D particle emitter configuration", "name": "SetLifespanMax", "sentence": "", "events": [ @@ -38621,6 +40740,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Duration", + "group": "3D particle emitter configuration", "name": "SetDuration", "sentence": "", "events": [ @@ -38842,6 +40962,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "SpayConeAngle", + "group": "3D particle emitter configuration", "name": "SetSpayConeAngle", "sentence": "", "events": [ @@ -38926,6 +41047,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Blending", + "group": "3D particle emitter color configuration", "name": "SetBlending", "private": true, "sentence": "", @@ -39011,6 +41133,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "GravityTop", + "group": "3D particle emitter speed configuration", "name": "SetGravityTop", "sentence": "", "events": [ @@ -39094,6 +41217,7 @@ "fullName": "", "functionType": "ActionWithOperator", "getterName": "Gravity", + "group": "3D particle emitter speed configuration", "name": "SetGravity", "sentence": "", "events": [ @@ -39263,6 +41387,201 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "RegisterInLayer" + }, + { + "functionName": "Delete" + }, + { + "functionName": "HasEnded" + }, + { + "functionName": "Restart" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "Z" + }, + { + "functionName": "SetZ" + } + ] + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "RotationX" + }, + { + "functionName": "SetRotationX" + }, + { + "functionName": "RotationY" + }, + { + "functionName": "SetRotationY" + } + ] + }, + { + "folderName": "3D particle emitter color configuration", + "children": [ + { + "functionName": "StartColor" + }, + { + "functionName": "SetStartColor" + }, + { + "functionName": "EndColor" + }, + { + "functionName": "SetEndColor" + }, + { + "functionName": "StartOpacity" + }, + { + "functionName": "SetStartOpacity" + }, + { + "functionName": "EndOpacity" + }, + { + "functionName": "SetEndOpacity" + }, + { + "functionName": "Blending" + }, + { + "functionName": "SetBlending" + } + ] + }, + { + "folderName": "3D particle emitter configuration", + "children": [ + { + "functionName": "Flow" + }, + { + "functionName": "SetFlow" + }, + { + "functionName": "StartSizeMin" + }, + { + "functionName": "SetStartSizeMin" + }, + { + "functionName": "StartSizeMax" + }, + { + "functionName": "SetStartSizeMax" + }, + { + "functionName": "EndScale" + }, + { + "functionName": "SetEndScale" + }, + { + "functionName": "LifespanMin" + }, + { + "functionName": "SetLifespanMin" + }, + { + "functionName": "LifespanMax" + }, + { + "functionName": "SetLifespanMax" + }, + { + "functionName": "Duration" + }, + { + "functionName": "SetDuration" + }, + { + "functionName": "SpayConeAngle" + }, + { + "functionName": "SetSpayConeAngle" + }, + { + "functionName": "ShouldAutodestruct" + }, + { + "functionName": "SetShouldAutodestruct" + } + ] + }, + { + "folderName": "3D particle emitter speed configuration", + "children": [ + { + "functionName": "StartSpeedMin" + }, + { + "functionName": "SetStartSpeedMin" + }, + { + "functionName": "StartSpeedMax" + }, + { + "functionName": "SetStartSpeedMax" + }, + { + "functionName": "AreParticlesRelative" + }, + { + "functionName": "SetAreParticlesRelative" + }, + { + "functionName": "GravityTop" + }, + { + "functionName": "SetGravityTop" + }, + { + "functionName": "Gravity" + }, + { + "functionName": "SetGravity" + } + ] + } + ] + }, "propertyDescriptors": [ { "value": "255;0;0", @@ -39572,177 +41891,925 @@ ] }, { - "author": "@Bouh", - "category": "User interface", + "author": "", + "category": "Visual effect", + "dimension": "3D", "extensionNamespace": "", - "fullName": "Time formatting", - "gdevelopVersion": "", + "fullName": "3D spot light", + "gdevelopVersion": ">=5.5.222", "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", - "name": "TimeFormatter", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/clock-digital.svg", - "shortDescription": "Converts seconds into standard time formats, such as HH:MM:SS. ", - "version": "0.0.2", - "description": [ - "Ideal for displaying timers on screen.", - "", - "Formats included:", - "* HH:MM:SS", - "* HH:MM:SS.000 (displays milliseconds)" - ], - "origin": { - "identifier": "TimeFormatter", - "name": "gdevelop-extension-store" - }, + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWxpZ2h0YnVsYi1vbi1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLDExSDIzVjEzSDIwVjExTTEsMTFINFYxM0gxVjExTTEzLDFWNEgxMVYxSDEzTTQuOTIsMy41TDcuMDUsNS42NEw1LjYzLDcuMDVMMy41LDQuOTNMNC45MiwzLjVNMTYuOTUsNS42M0wxOS4wNywzLjVMMjAuNSw0LjkzTDE4LjM3LDcuMDVMMTYuOTUsNS42M00xMiw2QTYsNiAwIDAsMSAxOCwxMkMxOCwxNC4yMiAxNi43OSwxNi4xNiAxNSwxNy4yVjE5QTEsMSAwIDAsMSAxNCwyMEgxMEExLDEgMCAwLDEgOSwxOVYxNy4yQzcuMjEsMTYuMTYgNiwxNC4yMiA2LDEyQTYsNiAwIDAsMSAxMiw2TTE0LDIxVjIyQTEsMSAwIDAsMSAxMywyM0gxMUExLDEgMCAwLDEgMTAsMjJWMjFIMTRNMTEsMThIMTNWMTUuODdDMTQuNzMsMTUuNDMgMTYsMTMuODYgMTYsMTJBNCw0IDAgMCwwIDEyLDhBNCw0IDAgMCwwIDgsMTJDOCwxMy44NiA5LjI3LDE1LjQzIDExLDE1Ljg3VjE4WiIgLz48L3N2Zz4=", + "name": "Light3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f237ae4e3b857c556846c7b2c0b132556fd4bcdeff217034b4d9c97dc1aab1d6_lightbulb-on-outline.svg", + "shortDescription": "Light up a cone like a flashlight.", + "version": "1.0.0", + "description": "Light up a cone like a flashlight.", "tags": [ - "time", - "timer", - "format", - "hours", - "minutes", - "seconds", - "milliseconds" + "3d", + "light" ], "authorIds": [ - "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], "sceneVariables": [], "eventsFunctions": [ { - "description": "Format time in seconds to HH:MM:SS.", - "fullName": "Format time in seconds to HH:MM:SS", - "functionType": "StringExpression", - "name": "SecondsToHHMMSS", - "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "description": "Define spot light helper classes JavaScript code.", + "fullName": "Define spot light helper classes", + "functionType": "Action", + "name": "DefineSpotLightHelperClasses", + "private": true, + "sentence": "Define spot light helper classes JavaScript code", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "var format_time = function (time_second) {\r", - " date = new Date(null);\r", - " date.setSeconds(time_second);\r", - " if (time_second >= 3600) {\r", - " return date.toISOString().substr(11, 8); // MM:SS\r", - " } else {\r", - " return date.toISOString().substr(14, 5); // HH:MM:SS\r", - " }\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + "//@ts-ignore", + "if (gdjs.__light3DExtension.spot) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight, _getIsCastingShadow: () => boolean, _getConeAngle: () => number, _getColor: () => string}} SpotLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "const coneLength = 64;", + "", + "class SpotLightHelper extends THREE.Object3D {", + " /** @type {SpotLightRuntimeObject} */", + " object;", + " /** @type {THREE.LineSegments} */", + " cone;", + " /** @type {THREE.LineSegments} */", + " centerLine;", + " /** @type {THREE.Mesh} */", + " originBox;", + "", + "\t/**", + " * @param {SpotLightRuntimeObject} object", + "\t */", + " constructor(object) {", + " super();", + " this.object = object;", + " this.type = 'SpotLightHelper';", + "", + " const coneGeometry = new THREE.BufferGeometry();", + " const conePositions = [", + " 0, 0, 0, 1, 0, 0,", + " 0, 0, 0, 1, 1, 0,", + " 0, 0, 0, 1, - 1, 0,", + " 0, 0, 0, 1, 0, 1,", + " 0, 0, 0, 1, 0, - 1", + " ];", + " for (let i = 0, j = 1, l = 32; i < l; i++ , j++) {", + " const p1 = (i / l) * Math.PI * 2;", + " const p2 = (j / l) * Math.PI * 2;", + " conePositions.push(", + " 1, Math.cos(p1), Math.sin(p1),", + " 1, Math.cos(p2), Math.sin(p2)", + " );", + " }", + " coneGeometry.setAttribute('position', new THREE.Float32BufferAttribute(conePositions, 3));", + " this.cone = new THREE.LineSegments(", + " coneGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.cone);", + " const centerLineGeometry = new THREE.BufferGeometry();", + " centerLineGeometry.setAttribute('position', new THREE.Float32BufferAttribute([", + " 0, 0, 0, coneLength, 0, 0", + " ], 3));", + " this.centerLine = new THREE.LineSegments(", + " centerLineGeometry,", + " new THREE.LineBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.centerLine);", + "", + " this.originBox = new THREE.Mesh(", + " new THREE.BoxGeometry(16, 16, 16),", + " new THREE.MeshBasicMaterial({ fog: false, toneMapped: false })", + " );", + " this.add(this.originBox);", + " this.update();", + "", + " //@ts-ignore", + " this.originBox.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + " this.cone.geometry.dispose();", + " this.cone.material.dispose();", + " this.centerLine.geometry.dispose();", + " this.centerLine.material.dispose();", + " this.originBox.geometry.dispose();", + " this.originBox.material.dispose();", + " }", + "", + " update() {", + " /** @type {number} */", + " const coneAngle = gdjs.toRad(this.object._getConeAngle());", + " const coneWidth = coneLength * Math.sin(coneAngle);", + " const coneHeight = coneLength * Math.cos(coneAngle);", + " this.cone.scale.set(coneHeight, coneWidth, coneWidth);", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.cone.material.color.set(color);", + " this.centerLine.material.color.set(color);", + " this.originBox.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class SpotLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param spotLight {THREE.SpotLight}", + " */", + " constructor(object, spotLight) {", + " this.object = object;", + " this.spotLight = spotLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.spotLight.parent;", + " this.spotLight.parent = null;", + " this.spotLight.lookAt(targetX, targetY, targetZ);", + " this.spotLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.spotLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.spotLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.spotLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.spotLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.spotLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.spotLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setConeLength(value) {", + " this.spotLight.distance = value;", + " }", + "", + " /**", + " * @param coneAngle {number}", + " */", + " setConeAngle(coneAngle) {", + " this.spotLight.angle = coneAngle * Math.PI / 180;", + " }", + "", + " /**", + " * @param smoothing {number}", + " */", + " setSmoothing(smoothing) {", + " this.spotLight.penumbra = smoothing;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " }", + " const shadow = this.spotLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.spotLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.spotLight.shadow.camera.far = value;", + " }", + "", + " /**", + " * @param resourceName {string}", + " */", + " setImage(resourceName) {", + " if (!resourceName) {", + " this.spotLight.map = null;", + " return;", + " }", + " const texture = game.getImageManager().getThreeTexture(resourceName);", + " this.spotLight.map = texture;", + " }", + "}", + "", + "", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.spot = {", + " SpotLightAdapter,", + " SpotLightHelper,", + "}" ], "parameterObjects": "", - "useStrict": false, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Time, in seconds", - "name": "TimeInSeconds", - "type": "expression" + "useStrict": true, + "eventsSheetExpanded": true } ], + "parameters": [], "objectGroups": [] }, { - "description": "Format time in seconds to HH:MM:SS.000, including milliseconds.", - "fullName": "Format time in seconds to HH:MM:SS.000", - "functionType": "StringExpression", - "name": "SecondsToHHMMSS000", - "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "description": "Define point light helper classes JavaScript code.", + "fullName": "Define point light helper classes", + "functionType": "Action", + "name": "DefinePointLightHelperClasses", + "private": true, + "sentence": "Define point light helper classes JavaScript code", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "var format_time = function (time_second) {\r", - " date = new Date(null);\r", - " date.setMilliseconds(1000*time_second);\r", - " if (time_second >= 3600) {\r", - " return date.toISOString().substr(11, 12); // MM:SS.000\r", - " } else {\r", - " return date.toISOString().substr(14, 9); // HH:MM:SS.000\r", - " }\r", - "}\r", - "\r", - "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" - ], - "parameterObjects": "", - "useStrict": false, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Time, in seconds", - "name": "TimeInSeconds", - "type": "expression" - } - ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Panel sprite button", - "gdevelopVersion": ">=5.5.230", - "helpPath": "/objects/button", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", - "name": "PanelSpriteButton", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", - "shortDescription": "A button that can be customized.", - "version": "2.1.1", - "description": [ - "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", - "", - "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." - ], - "origin": { - "identifier": "PanelSpriteButton", - "name": "gdevelop-extension-store" - }, - "tags": [ - "button", - "ui" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "changelog": [ - { - "version": "2.0.0", - "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." - } - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ + "//@ts-ignore", + "if (gdjs.__light3DExtension.point) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.PointLight, _getIsCastingShadow: () => boolean, _getColor: () => string}} PointLightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "", + "/**", + " * @extends {THREE.Mesh}", + " */", + "class PointLightHelper extends THREE.Mesh {", + " /** @type {PointLightRuntimeObject} */", + " object;", + "", + "\t/**", + " * @param {PointLightRuntimeObject} object", + "\t */", + " constructor(object) {", + "\t\tconst geometry = new THREE.SphereGeometry( 16, 4, 2 );", + "\t\tconst material = new THREE.MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );", + " super(geometry, material);", + " this.object = object;", + " this.update();", + "", + " //@ts-ignore", + " this.gdjsRuntimeObject = object;", + " }", + "", + " dispose() {", + "\t\tthis.geometry.dispose();", + "\t\tthis.material.dispose();", + " }", + "", + " update() {", + " const color = gdjs.rgbOrHexStringToNumber(this.object._getColor());", + " this.material.color.set(color);", + " }", + "}", + "", + "/**", + " * @param {string} colorString", + " * @param {THREE.Color} threeColor", + " */", + "const setThreeColor = (colorString, threeColor) => {", + " const integerColor = gdjs.rgbOrHexToRGBColor(colorString);", + " threeColor.r = integerColor[0] / 255;", + " threeColor.g = integerColor[1] / 255;", + " threeColor.b = integerColor[2] / 255;", + "};", + "", + "class PointLightAdapter {", + " /**", + " * @param object {gdjs.CustomRuntimeObject3D}", + " * @param pointLight {THREE.PointLight}", + " */", + " constructor(object, pointLight) {", + " this.object = object;", + " this.pointLight = pointLight;", + " }", + "", + " /**", + " * @param targetX {number}", + " * @param targetY {number}", + " * @param targetZ {number}", + " */", + " lookAtPosition(targetX, targetY, targetZ) {", + " // Remove from the parent to avoid the scene scale of -1 on Y to mess with the formula.", + " const parent = this.pointLight.parent;", + " this.pointLight.parent = null;", + " this.pointLight.lookAt(targetX, targetY, targetZ);", + " this.pointLight.parent = parent;", + "", + " // Angle setters update Three.js angles, so we save them first.", + " const rotationX = gdjs.toDegrees(this.pointLight.rotation.x);", + " const rotationY = gdjs.toDegrees(this.pointLight.rotation.y);", + " const rotationZ = gdjs.toDegrees(this.pointLight.rotation.z);", + " this.object.setRotationX(rotationX);", + " this.object.setRotationY(rotationY);", + " this.object.setAngle(rotationZ + 90);", + " }", + "", + " /**", + " * @param color {string}", + " */", + " setColor(color) {", + " setThreeColor(color, this.pointLight.color);", + " }", + "", + " /**", + " * @param intensity {number}", + " */", + " setIntensity(intensity) {", + " this.pointLight.intensity = intensity;", + " }", + "", + " /**", + " * @param decay {number}", + " */", + " setDecay(decay) {", + " this.pointLight.decay = decay;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setRange(value) {", + " this.pointLight.distance = value;", + " }", + "", + " /**", + " * @param isCastingShadow {boolean}", + " */", + " setCastingShadow(isCastingShadow) {", + " // This is applied by applyVisibilityAndShadow", + " }", + "", + " /**", + " * @param shadowQuality {\"Low\" | \"Medium\" | \"High\"}", + " */", + " setShadowQuality(shadowQuality) {", + " let size = 512;", + " switch (shadowQuality) {", + " case \"Low\":", + " size = 256;", + " break;", + " case \"Medium\":", + " size = 512;", + " break;", + " case \"High\":", + " size = 1024;", + " break;", + " }", + " const shadow = this.pointLight.shadow;", + " const mapSize = shadow.mapSize;", + " if (mapSize.width !== size) {", + " mapSize.set(size, size);", + "", + " // Force the recreation of the shadow map texture:", + " if (shadow.map) {", + " shadow.map.dispose();", + " shadow.map = null;", + " }", + " shadow.needsUpdate = true;", + " }", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraNearPlane(value) {", + " this.pointLight.shadow.camera.near = value;", + " }", + "", + " /**", + " * @param value {number}", + " */", + " setShadowCameraFarPlane(value) {", + " this.pointLight.shadow.camera.far = value;", + " }", + "}", + "", + "", + "", + "//@ts-ignore", + "gdjs.__light3DExtension.point = {", + " PointLightAdapter,", + " PointLightHelper,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", "private": true, - "sentence": "Events are running for the editor", + "sentence": "Define helper classes JavaScript code", "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + "//@ts-ignore", + "if (gdjs.__light3DExtension) {", + " //@ts-ignore", + " return;", + "}", + "", + "/**", + " * @typedef {gdjs.CustomRuntimeObject3D & {__cameraDistance: number, __light3D: THREE.SpotLight | THREE.PointLight, _getIsCastingShadow: () => boolean}} LightRuntimeObject", + " */", + "", + "const game = runtimeScene.getGame();", + "const isInGameEdition = game.isInGameEdition && game.isInGameEdition();", + "", + "", + "class Light3DRenderer extends gdjs.CustomRuntimeObject3DRenderer {", + "", + " constructor(", + " object,", + " instanceContainer,", + " parent", + " ) {", + " super(object, instanceContainer, parent);", + " }", + "", + " _updateThreeGroup() {", + " /** @type {LightRuntimeObject} */", + " //@ts-ignore", + " const object = this._object;", + " const threeObject3D = this.get3DRendererObject();", + "", + " threeObject3D.rotation.set(", + " gdjs.toRad(object.getRotationX()),", + " gdjs.toRad(object.getRotationY()),", + " gdjs.toRad(object.angle)", + " );", + "", + " threeObject3D.position.set(", + " object.getX(),", + " object.getY(),", + " object.getZ()", + " );", + "", + " // Force the scale to 1 because the light doesn't really has a size.", + " threeObject3D.scale.set(", + " object.isFlippedX() ? -1 : 1,", + " object.isFlippedY() ? -1 : 1,", + " object.isFlippedZ() ? -1 : 1", + " );", + "", + " threeObject3D.visible = !this._object.hidden;", + "", + " const spotLight = object.__light3D;", + "", + " const editor = game.getInGameEditor ? game.getInGameEditor() : null;", + "", + " spotLight.castShadow = false;", + " spotLight.visible = false;", + "", + " if (!object.isHidden()) {", + " let isSelected = false;", + " if (editor) {", + " const selectedObject = editor._selection.getLastSelectedObject();", + " let parentObject = object;", + " isSelected = parentObject === selectedObject;", + " while (!isSelected && parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " parentObject = parentObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " isSelected = parentObject === selectedObject;", + " }", + " }", + " let rootObject = object;", + " while (rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner) {", + " rootObject = rootObject.getInstanceContainer()", + " //@ts-ignore", + " .getOwner();", + " }", + " const runtimeScene = rootObject.getRuntimeScene();", + " let distanceSq = 0;", + " if (!isSelected) {", + " const layerName = rootObject.getLayer();", + " const cameraX = gdjs.evtTools.camera.getCameraX(runtimeScene, layerName, 0);", + " const cameraY = gdjs.evtTools.camera.getCameraY(runtimeScene, layerName, 0);", + " const cameraZ = gdjs.scene3d.camera.getCameraZ(runtimeScene, layerName, 0);", + " const deltaX = rootObject.getX() - cameraX;", + " const deltaY = rootObject.getY() - cameraY;", + " const deltaZ = rootObject.getZ() - cameraZ;", + " distanceSq = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;", + " }", + " getLightManager(", + " //@ts-ignore", + " runtimeScene", + " ).applyVisibilityAndShadow(object, distanceSq);", + " }", + "", + " // Force the visibility to be checked every frame", + " this._isContainerDirty = true;", + " }", + "}", + "", + "gdjs.registerRuntimeScenePreEventsCallback(", + " runtimeScene => {", + " getLightManager(", + " //@ts-ignore", + " runtimeScene.getScene()", + " ).clear();", + " });", + "if (gdjs.registerInGameEditorPostStepCallback) {", + " gdjs.registerInGameEditorPostStepCallback(", + " inGameEditor => {", + " getLightManager(", + " //@ts-ignore", + " inGameEditor.getEditedInstanceContainer().getScene()", + " ).clear();", + " });", + "}", + "", + "const editorLightCountMax = {", + " value: 4", + "};", + "", + "const lightCountMax = {", + " value: 20", + "};", + "", + "const editorLightShadowCountMax = {", + " value: 1", + "};", + "", + "const lightShadowCountMax = {", + " value: 4", + "};", + "", + "/**", + " * Get the platforms manager of an instance container.", + " * @param {gdjs.RuntimeScene & {__lightManager: LightManager}} runtimeScene", + " */", + "function getLightManager(runtimeScene) {", + " if (!runtimeScene.__lightManager) {", + " // Create the shared manager if necessary.", + " runtimeScene.__lightManager = isInGameEdition ?", + " new LightManager(editorLightCountMax, editorLightShadowCountMax) :", + " new LightManager(lightCountMax, lightShadowCountMax);", + " }", + " return runtimeScene.__lightManager;", + "}", + "", + "/** @type {{isInserted: boolean, removedObject: LightRuntimeObject | null}} */", + "const sortResult = { isInserted: false, removedObject: null };", + "", + "class CappedLightList {", + " /** @type {Array<{object: LightRuntimeObject, weight: number}>} */", + " objects = [];", + " /** @type {{value: number}} */", + " capacity;", + " weight = 0;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onInsertion;", + " /** @type {(object: LightRuntimeObject) => void} */", + " onDeletion;", + "", + " /**", + " * @param {{value: number}} capacity", + " * @param {(object: LightRuntimeObject) => void} onInsertion", + " * @param {(object: LightRuntimeObject) => void} onDeletion", + " */", + " constructor(capacity, onInsertion, onDeletion) {", + " this.capacity = capacity;", + " this.onInsertion = onInsertion;", + " this.onDeletion = onDeletion;", + " }", + "", + " clear() {", + " this.objects.length = 0;", + " this.weight = 0;", + " }", + "", + " /**", + " * @param object {LightRuntimeObject}", + " * @param distance {number}", + " * @param weight {number}", + " */", + " insertByDistance(object, distance, weight) {", + " let insertionIndex = 0;", + " for (let index = this.objects.length - 1; index >= 0; index--) {", + " const { object: other } = this.objects[index];", + " const otherDistance = other.__cameraDistance;", + " if (distance >= otherDistance) {", + " insertionIndex = index + 1;", + " break;", + " }", + " }", + " if (insertionIndex === this.objects.length", + " && this.weight + weight > this.capacity.value) {", + " return;", + " }", + " this.weight += weight;", + "", + " let deletedPair = null;", + " while (this.objects.length > 0 && this.weight > this.capacity.value) {", + " deletedPair = this.objects.pop();", + " const { object: removedObject, weight: otherWeight } = deletedPair;", + " this.weight -= otherWeight;", + " this.onDeletion(removedObject);", + " }", + "", + " let insertedPair;", + " if (deletedPair) {", + " insertedPair = deletedPair;", + " insertedPair.object = object;", + " insertedPair.weight = weight;", + " }", + " else {", + " insertedPair = { object, weight };", + " }", + " this.onInsertion(object);", + " this.objects.splice(insertionIndex, 0, insertedPair);", + " object.__cameraDistance = distance;", + " }", + "}", + "", + "class LightManager {", + " /** @type {CappedLightList} */", + " visibleObjects;", + " /** @type {CappedLightList} */", + " shadowObjects;", + "", + " /**", + " * @param maxCount {{value: number}}", + " * @param shadowCount {{value: number}}", + " */", + " constructor(maxCount, shadowCount) {", + " this.visibleObjects = new CappedLightList(", + " maxCount,", + " (object) => { object.__light3D.visible = true; },", + " (object) => { object.__light3D.visible = false; }", + " );", + " this.shadowObjects = new CappedLightList(", + " shadowCount,", + " (object) => { object.__light3D.castShadow = true; },", + " (object) => { object.__light3D.castShadow = false; }", + " );", + " }", + "", + " clear() {", + " this.visibleObjects.clear();", + " this.shadowObjects.clear();", + " }", + "", + " /**", + " * @param object {LightRuntimeObject}", + " * @param distance {number}", + " */", + " applyVisibilityAndShadow(object, distance) {", + " if (object._getIsCastingShadow()) {", + " this.shadowObjects.insertByDistance(object, distance,", + " //@ts-ignore", + " object.__light3D.map ? 2 : 1);", + " }", + " this.visibleObjects.insertByDistance(object, distance, 1);", + " }", + "}", + "", + "//@ts-ignore", + "gdjs.__light3DExtension = {", + " Light3DRenderer,", + " lightCountMax,", + " lightShadowCountMax,", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed simultaneously.", + "fullName": "Max lights count", + "functionType": "ExpressionAndCondition", + "name": "LightCountMax", + "sentence": "max lights count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightCountMax.value;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightCountMax", + "name": "SetLightCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightCountMax.value = value;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "the maximum number of nearest lights displayed with shadow simultaneously.", + "fullName": "Max lights with shadow count", + "functionType": "ExpressionAndCondition", + "name": "LightShadowCountMax", + "sentence": "max lights with shadow count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs.__light3DExtension.lightShadowCountMax.value;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LightShadowCountMax", + "name": "SetLightShadowCountMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "gdjs.__light3DExtension.lightShadowCountMax.value = value;" ], "parameterObjects": "", "useStrict": true, @@ -39753,36 +42820,3503 @@ "objectGroups": [] } ], - "eventsBasedBehaviors": [ + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "DefineSpotLightHelperClasses" + }, + { + "functionName": "DefinePointLightHelperClasses" + }, + { + "functionName": "LightCountMax" + }, + { + "functionName": "SetLightCountMax" + }, + { + "functionName": "LightShadowCountMax" + }, + { + "functionName": "SetLightShadowCountMax" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ { - "description": "The finite state machine used internally by the button object.", - "fullName": "Button finite state machine", - "name": "ButtonFSM", - "objectType": "", - "private": true, + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, + "defaultName": "SpotLight", + "description": "Light up a cone like a flashlight.", + "fullName": "3D spot light", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNobGlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxMEw2LDVIMThMMTUsMTBIOU0xOCw0SDZWMkgxOFY0TTksMjJWMTFIMTVWMjJIOU0xMiwxM0ExLDEgMCAwLDAgMTEsMTRBMSwxIDAgMCwwIDEyLDE1QTEsMSAwIDAsMCAxMywxNEExLDEgMCAwLDAgMTIsMTNaIiAvPjwvc3ZnPg==", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "SpotLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/b627f8e676b3aac26945b2c38db0cfa787d34d2eff23755d4eb1289452f6cd28_flashlight.svg", + "objects": [ + { + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 40, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 40, + "x": -20, + "y": -20, + "z": -20, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 9.06473532531222, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "PanelSpriteButton::IsInGameEdition" + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefineSpotLightHelperClasses" }, "parameters": [ "", "" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", + "const {", + " SpotLightAdapter,", + " SpotLightHelper,", + " //@ts-ignore", + "} = gdjs.__light3DExtension.spot;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the light.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const spotLight = new THREE.SpotLight(0xffffff);", + "spotLight.position.copy(group.position);", + "spotLight.rotation.copy(group.rotation);", + "spotLight.add(spotLight.target);", + "spotLight.target.position.x = 100;", + "spotLight.up.set(0, 0, 1);", + "spotLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__light3D = spotLight;", + "//@ts-ignore", + "object.__spotLightAdapter = new SpotLightAdapter(object, spotLight);", + "", + "const spotLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = spotLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const spotLightHelper = new SpotLightHelper(object);", + " spotLightHelper.rotation.order = 'ZYX';", + " spotLightHelper.add(spotLight);", + " spotLight3DRenderer._threeGroup = spotLightHelper;", + " layer.getRenderer().add3DRendererObject(spotLightHelper);", + "}", + "else {", + " spotLight3DRenderer._threeGroup = spotLight;", + " layer.getRenderer().add3DRendererObject(spotLight);", + "}", + "", + "spotLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this.SetColor(tint, eventsFunctionContext);", + " }", + " prototype.getColor = function() {", + " return this.Color(eventsFunctionContext);", + " }", + "}", + "" ], - "actions": [], - "events": [ + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__light3D.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update from properties.", + "fullName": "Update from properties", + "functionType": "Action", + "name": "UpdateFromProperties", + "private": true, + "sentence": "Update from properties of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetColor" + }, + "parameters": [ + "Object", + "=", + "Color", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetIntensity" + }, + "parameters": [ + "Object", + "=", + "Intensity", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetConeLength" + }, + "parameters": [ + "Object", + "=", + "ConeLength", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetConeAngle" + }, + "parameters": [ + "Object", + "=", + "ConeAngle", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetSmoothing" + }, + "parameters": [ + "Object", + "=", + "Smoothing", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::UpdateImage" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "Light3D::SpotLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "=", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update helper", + "functionType": "Action", + "name": "UpdateHelper", + "private": true, + "sentence": "Update graphical helper of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const spotLightHelper = objects[0].get3DRendererObject();", + " spotLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update image", + "functionType": "Action", + "name": "UpdateImage", + "private": true, + "sentence": "Update the image of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject3D} */\r", + "const object = objects[0];\r", + "const resourceName = object._getImage();\r", + "object.__spotLightAdapter.setImage(resourceName);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone angle of the light.", + "fullName": "Cone angle", + "functionType": "ExpressionAndCondition", + "name": "ConeAngle", + "sentence": "the cone angle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ConeAngle" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeAngle", + "name": "SetConeAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeAngle", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const coneAngle = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeAngle(coneAngle);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Color" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Color", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setColor(color);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the smoothing of the light. Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "fullName": "Smoothing", + "functionType": "ExpressionAndCondition", + "name": "Smoothing", + "sentence": "the smoothing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Smoothing" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Smoothing", + "name": "SetSmoothing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Smoothing", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setSmoothing(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Intensity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Intensity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setIntensity(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Decay" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setDecay(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Condition", + "group": "3D spot light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D spot light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up a position.", + "fullName": "Look at position", + "functionType": "Action", + "group": "Angle", + "name": "LookAtPosition", + "sentence": "_PARAM0_ look at _PARAM1_ ; _PARAM2_ ; _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const targetX = eventsFunctionContext.getArgument(\"TargetX\");\r", + "const targetY = eventsFunctionContext.getArgument(\"TargetY\");\r", + "const targetZ = eventsFunctionContext.getArgument(\"TargetZ\");\r", + "\r", + "object.__spotLightAdapter.lookAtPosition(targetX, targetY, targetZ);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Target X", + "name": "TargetX", + "type": "expression" + }, + { + "description": "Target Y", + "name": "TargetY", + "type": "expression" + }, + { + "description": "Target Z", + "name": "TargetZ", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate the light to light up an object.", + "fullName": "Look at object", + "functionType": "Action", + "group": "Angle", + "name": "LookAtObject", + "sentence": "_PARAM0_ look at _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::SpotLight3D::LookAtPosition" + }, + "parameters": [ + "Object", + "Target.CenterX()", + "Target.CenterY()", + "Target.Object3D::CenterZ()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + }, + { + "description": "Object", + "name": "Target", + "type": "objectList" + }, + { + "description": "3D capability", + "name": "Object3D", + "supplementaryInformation": "Scene3D::Base3DBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D spot light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ShadowQuality", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraNearPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraNearPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraNearPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D spot light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraFarPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D spot light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraFarPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the cone length of the light. 0 means no limit.", + "fullName": "Cone length", + "functionType": "ExpressionAndCondition", + "name": "ConeLength", + "sentence": "the cone length", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ConeLength" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ConeLength", + "name": "SetConeLength", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ConeLength", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__spotLightAdapter.setConeLength(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::SpotLight3D", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "UpdateImage" + }, + { + "folderName": "Angle", + "children": [ + { + "functionName": "LookAtPosition" + }, + { + "functionName": "LookAtObject" + } + ] + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "ConeLength" + }, + { + "functionName": "SetConeLength" + }, + { + "functionName": "ConeAngle" + }, + { + "functionName": "SetConeAngle" + }, + { + "functionName": "Smoothing" + }, + { + "functionName": "SetSmoothing" + }, + { + "folderName": "3D spot light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" + }, + { + "value": "30", + "type": "Number", + "unit": "DegreeAngle", + "label": "Cone angle", + "group": "Cone", + "name": "ConeAngle" + }, + { + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" + }, + { + "value": "1", + "type": "Number", + "label": "Smoothing", + "description": "Percent of the spotlight cone that is attenuated due to penumbra (between 0 and 1).", + "group": "Cone", + "name": "Smoothing" + }, + { + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" + }, + { + "value": "", + "type": "Resource", + "label": "Image", + "description": "Shadow casting must be enabled for the image to have any effect.", + "group": "Shadow", + "extraInformation": [ + "image" + ], + "choices": [], + "hidden": true, + "name": "Image" + }, + { + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" + }, + { + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ + { + "label": "", + "value": "Low" + }, + { + "label": "", + "value": "Medium" + }, + { + "label": "", + "value": "High" + } + ], + "name": "ShadowQuality" + }, + { + "value": "20", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Cone length", + "description": "0 means no limit.", + "group": "Cone", + "advanced": true, + "name": "ConeLength" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Color" + }, + { + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "folderName": "Cone", + "children": [ + { + "propertyName": "ConeAngle" + }, + { + "propertyName": "ConeLength" + }, + { + "propertyName": "Smoothing" + } + ] + }, + { + "folderName": "Shadow", + "children": [ + { + "propertyName": "IsCastingShadow" + }, + { + "propertyName": "ShadowQuality" + }, + { + "propertyName": "Image" + }, + { + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" + } + ] + } + ] + }, + "variants": [] + }, + { + "areaMaxX": 20, + "areaMaxY": 20, + "areaMaxZ": 20, + "areaMinX": -20, + "areaMinY": -20, + "areaMinZ": -20, + "defaultName": "PointLight", + "description": "A collection of light object for 3D.", + "fullName": "3D spot light and point light", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRvcmNoIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTguNiA5LjZDOSAxMC4yIDkuNSAxMC43IDEwLjIgMTFIMTQuMkMxNC41IDEwLjkgMTQuNyAxMC43IDE0LjkgMTAuNUMxNS45IDkuNSAxNi4zIDggMTUuOCA2LjdMMTUuNyA2LjVDMTUuNiA2LjIgMTUuNCA2IDE1LjIgNS44QzE1LjEgNS42IDE0LjkgNS41IDE0LjggNS4zQzE0LjQgNSAxNCA0LjcgMTMuNiA0LjNDMTIuNyAzLjQgMTIuNiAyIDEzLjEgMUMxMi42IDEuMSAxMi4xIDEuNCAxMS43IDEuOEMxMC4yIDMgOS42IDUuMSAxMC4zIDdWNy4yQzEwLjMgNy4zIDEwLjIgNy40IDEwLjEgNy41QzEwIDcuNiA5LjggNy41IDkuNyA3LjRMOS42IDcuM0M5IDYuNSA4LjkgNS4zIDkuMyA0LjNDOC40IDUuMSA3LjkgNi40IDggNy43QzggOCA4LjEgOC4zIDguMiA4LjZDOC4yIDguOSA4LjQgOS4zIDguNiA5LjZNMTIuMyA4LjFDMTIuNCA3LjYgMTIuMiA3LjIgMTIuMSA2LjhDMTIgNi40IDEyIDYgMTIuMiA1LjZMMTIuNSA2LjJDMTIuOSA2LjggMTMuNiA3IDEzLjggNy44VjguMUMxMy44IDguNiAxMy42IDkuMSAxMy4zIDkuNEMxMy4xIDkuNSAxMi45IDkuNyAxMi43IDkuN0MxMi4xIDkuOSAxMS40IDkuNiAxMSA5LjJDMTEuOCA5LjIgMTIuMiA4LjYgMTIuMyA4LjFNMTUgMTJWMTRIMTRMMTMgMjJIMTFMMTAgMTRIOVYxMkgxNVoiIC8+PC9zdmc+", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PointLight3D", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/bf9158c96f4346dabd9e8ae0ddd737809652797812eb50376bae62463ac7fc42_torch.svg", + "objects": [ + { + "assetStoreId": "", + "name": "Placeholder", + "persistentUuid": "6786eefd-3c18-4fcb-b3ae-95b07f953045", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 80, + "height": 80, + "depth": 80, + "enableTextureTransparency": false, + "facesOrientation": "Z", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "Basic", + "tint": "255;255;255", + "isCastingShadow": false, + "isReceivingShadow": false + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Placeholder" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 40, + "height": 40, + "layer": "", + "name": "Placeholder", + "persistentUuid": "1310c768-04d4-4133-98d9-37d836f8a990", + "width": 40, + "x": -20, + "y": -20, + "z": -20, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 9.06473532531222, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "Light3D::DefinePointLightHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const {", + " Light3DRenderer,", + " //@ts-ignore", + "} = gdjs.__light3DExtension;", + "const {", + " PointLightAdapter,", + " PointLightHelper,", + " //@ts-ignore", + "} = gdjs.__light3DExtension.point;", + "", + "/** @type {gdjs.CustomRuntimeObject3D} */", + "//@ts-ignore", + "const object = objects[0];", + "", + "const game = runtimeScene.getGame();", + "", + "// This is a hack that may break in future releases.", + "// Replace the group that would hold children objects by the light.", + "const layer = object.getInstanceContainer().getLayer(object.getLayer());", + "const group = object.getRenderer()._threeGroup;", + "layer.getRenderer().remove3DRendererObject(group);", + "", + "const pointLight = new THREE.PointLight(0xffffff);", + "pointLight.position.copy(group.position);", + "pointLight.rotation.copy(group.rotation);", + "pointLight.up.set(0, 0, 1);", + "pointLight.shadow.camera.up.set(0, 0, 1);", + "//@ts-ignore", + "object.__light3D = pointLight;", + "//@ts-ignore", + "object.__pointLightAdapter = new PointLightAdapter(object, pointLight);", + "", + "const pointLight3DRenderer = new Light3DRenderer(object, object._instanceContainer, object.getInstanceContainer());", + "object._renderer = pointLight3DRenderer;", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = new PointLightHelper(object);", + " pointLightHelper.rotation.order = 'ZYX';", + " pointLightHelper.add(pointLight);", + " pointLight3DRenderer._threeGroup = pointLightHelper;", + " layer.getRenderer().add3DRendererObject(pointLightHelper);", + "}", + "else {", + " pointLight3DRenderer._threeGroup = pointLight;", + " layer.getRenderer().add3DRendererObject(pointLight);", + "}", + "", + "pointLight.updateMatrixWorld(true);", + "", + "// Allow to tween the light color.", + "//@ts-ignore", + "if (!object.setColor && !object.getColor) {", + " const prototype = Object.getPrototypeOf(object);", + " prototype.setColor = function(tint) {", + " this.SetColor(tint, eventsFunctionContext);", + " }", + " prototype.getColor = function() {", + " return this.Color(eventsFunctionContext);", + " }", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.CustomRuntimeObject} */", + "const object = objects[0];", + "// Here runtimeScene is the gdjs.CustomRuntimeObjectInstanceContainer inside the custom object.", + "const gameScene = object.getRuntimeScene();", + "", + "object.__light3D.dispose();", + "object.get3DRendererObject().dispose();", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::UpdateFromProperties" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update from properties.", + "fullName": "Update from properties", + "functionType": "Action", + "name": "UpdateFromProperties", + "private": true, + "sentence": "Update from properties of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetColor" + }, + "parameters": [ + "Object", + "=", + "Color", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetIntensity" + }, + "parameters": [ + "Object", + "=", + "Intensity", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetDecay" + }, + "parameters": [ + "Object", + "=", + "Decay", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetRange" + }, + "parameters": [ + "Object", + "=", + "Range", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowQuality" + }, + "parameters": [ + "Object", + "=", + "ShadowQuality", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraNearPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraNearPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::SetShadowCameraFarPlane" + }, + "parameters": [ + "Object", + "=", + "ShadowCameraFarPlane", + "" + ] + }, + { + "type": { + "value": "Light3D::PointLight3D::UpdateHelper" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "=", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Light3D::PointLight3D::SetCastingShadow" + }, + "parameters": [ + "Object", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update helper", + "functionType": "Action", + "name": "UpdateHelper", + "private": true, + "sentence": "Update graphical helper of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();", + "if (game.isInGameEdition && game.isInGameEdition()) {", + " const pointLightHelper = objects[0].get3DRendererObject();", + " pointLightHelper.update();", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the color of the light.", + "fullName": "Color", + "functionType": "ExpressionAndCondition", + "name": "Color", + "sentence": "the color", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Color" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Color", + "name": "SetColor", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "Color", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const color = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setColor(color);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the intensity of the light.", + "fullName": "Intensity", + "functionType": "ExpressionAndCondition", + "name": "Intensity", + "sentence": "the intensity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Intensity" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Intensity", + "name": "SetIntensity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Intensity", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setIntensity(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the decay of the light. The amount the light dims along the distance of the light.", + "fullName": "Decay", + "functionType": "ExpressionAndCondition", + "name": "Decay", + "sentence": "the decay", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Decay" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Decay", + "name": "SetDecay", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Decay", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setDecay(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Condition", + "group": "3D point light shadow configuration", + "name": "IsCastingShadow", + "sentence": "_PARAM0_ casting shadows", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the light is casting shadows.", + "fullName": "Shadow casting", + "functionType": "Action", + "group": "3D point light shadow configuration", + "name": "SetCastingShadow", + "sentence": "_PARAM0_ casting shadows: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsCastingShadow", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setCastingShadow(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Shadow casting", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow quality of the light.", + "fullName": "Shadow quality", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowQuality", + "sentence": "the shadow quality", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ShadowQuality" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Low\",\"Medium\",\"High\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowQuality", + "group": "3D point light shadow configuration", + "name": "SetShadowQuality", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "ShadowQuality", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowQuality(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera near plane of the light.", + "fullName": "Shadow camera near plane", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowCameraNearPlane", + "sentence": "the shadow camera near plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraNearPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraNearPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraNearPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraNearPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowCameraNearPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the shadow camera far plane of the light.", + "fullName": "Shadow camera far plane", + "functionType": "ExpressionAndCondition", + "group": "3D point light shadow configuration", + "name": "ShadowCameraFarPlane", + "sentence": "the shadow camera far plane", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ShadowCameraFarPlane" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShadowCameraFarPlane", + "group": "3D point light shadow configuration", + "name": "SetShadowCameraFarPlane", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ShadowCameraFarPlane", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setShadowCameraFarPlane(value);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the range of the light. 0 means no limit.", + "fullName": "Range", + "functionType": "ExpressionAndCondition", + "name": "Range", + "sentence": "the range", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Range" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Range", + "name": "SetRange", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Range", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];\r", + "const value = eventsFunctionContext.getArgument(\"Value\");\r", + "\r", + "object.__pointLightAdapter.setRange(value);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Light3D::PointLight3D", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onDestroy" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "UpdateFromProperties" + }, + { + "functionName": "UpdateHelper" + }, + { + "functionName": "Color" + }, + { + "functionName": "SetColor" + }, + { + "functionName": "Intensity" + }, + { + "functionName": "SetIntensity" + }, + { + "functionName": "Decay" + }, + { + "functionName": "SetDecay" + }, + { + "functionName": "Range" + }, + { + "functionName": "SetRange" + }, + { + "folderName": "3D point light shadow configuration", + "children": [ + { + "functionName": "IsCastingShadow" + }, + { + "functionName": "SetCastingShadow" + }, + { + "functionName": "ShadowQuality" + }, + { + "functionName": "SetShadowQuality" + }, + { + "functionName": "ShadowCameraNearPlane" + }, + { + "functionName": "SetShadowCameraNearPlane" + }, + { + "functionName": "ShadowCameraFarPlane" + }, + { + "functionName": "SetShadowCameraFarPlane" + } + ] + } + ] + }, + "propertyDescriptors": [ + { + "value": "255;255;255", + "type": "Color", + "label": "Color", + "name": "Color" + }, + { + "value": "1", + "type": "Number", + "label": "Intensity", + "name": "Intensity" + }, + { + "value": "2", + "type": "Number", + "label": "Decay", + "description": "The amount the light dims along the distance of the light.", + "name": "Decay" + }, + { + "value": "true", + "type": "Boolean", + "label": "Shadow casting", + "group": "Shadow", + "name": "IsCastingShadow" + }, + { + "value": "Medium", + "type": "Choice", + "label": "Shadow quality", + "group": "Shadow", + "choices": [ + { + "label": "", + "value": "Low" + }, + { + "label": "", + "value": "Medium" + }, + { + "label": "", + "value": "High" + } + ], + "name": "ShadowQuality" + }, + { + "value": "20", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera near plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraNearPlane" + }, + { + "value": "2000", + "type": "Number", + "unit": "Pixel", + "label": "Shadow camera far plane", + "group": "Shadow", + "advanced": true, + "name": "ShadowCameraFarPlane" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Range", + "description": "0 means no limit.", + "advanced": true, + "name": "Range" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Color" + }, + { + "propertyName": "Intensity" + }, + { + "propertyName": "Decay" + }, + { + "propertyName": "Range" + }, + { + "folderName": "Shadow", + "children": [ + { + "propertyName": "IsCastingShadow" + }, + { + "propertyName": "ShadowQuality" + }, + { + "propertyName": "ShadowCameraNearPlane" + }, + { + "propertyName": "ShadowCameraFarPlane" + } + ] + } + ] + }, + "variants": [] + } + ] + }, + { + "author": "@Bouh", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Time formatting", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", + "name": "TimeFormatter", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/clock-digital.svg", + "shortDescription": "Converts seconds into standard time formats, such as HH:MM:SS. ", + "version": "0.0.2", + "description": [ + "Ideal for displaying timers on screen.", + "", + "Formats included:", + "* HH:MM:SS", + "* HH:MM:SS.000 (displays milliseconds)" + ], + "origin": { + "identifier": "TimeFormatter", + "name": "gdevelop-extension-store" + }, + "tags": [ + "time", + "timer", + "format", + "hours", + "minutes", + "seconds", + "milliseconds" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Format time in seconds to HH:MM:SS.", + "fullName": "Format time in seconds to HH:MM:SS", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setSeconds(time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 8); // MM:SS\r", + " } else {\r", + " return date.toISOString().substr(14, 5); // HH:MM:SS\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + ], + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Format time in seconds to HH:MM:SS.000, including milliseconds.", + "fullName": "Format time in seconds to HH:MM:SS.000", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS000", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setMilliseconds(1000*time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 12); // MM:SS.000\r", + " } else {\r", + " return date.toISOString().substr(14, 9); // HH:MM:SS.000\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + ], + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "SecondsToHHMMSS" + }, + { + "functionName": "SecondsToHHMMSS000" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "gdevelopVersion": ">=5.5.230", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteButton", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", + "shortDescription": "A button that can be customized.", + "version": "2.1.1", + "description": [ + "A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "", + "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." + ], + "origin": { + "identifier": "PanelSpriteButton", + "name": "gdevelop-extension-store" + }, + "tags": [ + "button", + "ui" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "changelog": [ + { + "version": "2.0.0", + "breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes." + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "helpPath": "", + "iconUrl": "", + "name": "ButtonFSM", + "objectType": "", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ { "colorB": 228, "colorG": 176, @@ -40853,6 +47387,41 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "onDeActivate" + }, + { + "functionName": "ResetState" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "IsPressedOutside" + }, + { + "functionName": "TouchId" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -40956,9 +47525,12 @@ "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "helpPath": "", + "iconUrl": "", "isInnerAreaFollowingParentSize": true, "isUsingLegacyInstancesRenderer": false, "name": "PanelSpriteButton", + "previewIconUrl": "", "objects": [ { "assetStoreId": "", @@ -42377,6 +48949,56 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "onHotReloading" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsIdle" + }, + { + "functionName": "IsClicked" + }, + { + "functionName": "IsHovered" + }, + { + "functionName": "IsFocused" + }, + { + "functionName": "IsPressed" + }, + { + "functionName": "SetLabelText" + }, + { + "functionName": "SetLabelTextOp" + }, + { + "functionName": "LabelText" + }, + { + "functionName": "Activate" + }, + { + "functionName": "IsActivated" + }, + { + "functionName": "LabelOffset" + }, + { + "functionName": "SetLabelOffset" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -43255,6 +49877,7 @@ { "author": "D8H", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Stick objects to others", "gdevelopVersion": ">=5.5.222", @@ -43620,12 +50243,26 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "IsStuck" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", "fullName": "Sticker", + "helpPath": "", + "iconUrl": "", "name": "Sticker", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -43881,6 +50518,29 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Stick" + }, + { + "functionName": "Unstick" + }, + { + "functionName": "onDestroy" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -43913,6 +50573,7 @@ { "author": "Tristan Rhodes (tristan@victrisgames.com), Entropy", "category": "Movement", + "dimension": "", "extensionNamespace": "", "fullName": "Screen wrap", "gdevelopVersion": ">=5.5.222", @@ -43947,12 +50608,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "Teleport the object when leaving one side of the screen so that it immediately reappears on the opposite side, maintaining speed and trajectory.", "fullName": "Screen Wrap", + "helpPath": "", + "iconUrl": "", "name": "ScreenWrap", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -44969,6 +51636,59 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "IsHorizontalWrapping" + }, + { + "functionName": "IsVerticalWrapping" + }, + { + "functionName": "EnableHorizontalWrapping" + }, + { + "functionName": "EnableVerticalWrapping" + }, + { + "functionName": "BorderTop" + }, + { + "functionName": "BorderLeft" + }, + { + "functionName": "BorderRight" + }, + { + "functionName": "BorderBottom" + }, + { + "functionName": "TriggerOffset" + }, + { + "functionName": "SetTopBorder" + }, + { + "functionName": "SetLeftBorder" + }, + { + "functionName": "SetBottomBorder" + }, + { + "functionName": "SetRightBorder" + }, + { + "functionName": "SetTriggerOffset" + } + ] + }, "propertyDescriptors": [ { "value": "true", @@ -45050,8 +51770,11 @@ { "description": "Teleport the object when leaving one side of the screen so that it immediately reappears on the opposite side, maintaining speed and trajectory.", "fullName": "Screen Wrap (physics objects)", + "helpPath": "", + "iconUrl": "", "name": "ScreenWrapPhysics", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -46281,6 +53004,65 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPreEvents" + }, + { + "functionName": "IsHorizontalWrapping" + }, + { + "functionName": "IsVerticalWrapping" + }, + { + "functionName": "EnableHorizontalWrapping" + }, + { + "functionName": "EnableVerticalWrapping" + }, + { + "functionName": "BorderTop" + }, + { + "functionName": "BorderLeft" + }, + { + "functionName": "BorderRight" + }, + { + "functionName": "BorderBottom" + }, + { + "functionName": "TriggerOffset" + }, + { + "functionName": "SetTopBorder" + }, + { + "functionName": "SetLeftBorder" + }, + { + "functionName": "SetBottomBorder" + }, + { + "functionName": "SetRightBorder" + }, + { + "functionName": "SetTriggerOffset" + }, + { + "functionName": "SaveCurrentVelocities" + }, + { + "functionName": "ApplySavedVelocities" + } + ] + }, "propertyDescriptors": [ { "value": "", @@ -46408,6 +53190,7 @@ { "author": "Silver-Streak, @Bouh, Tristan Rhodes", "category": "Game mechanic", + "dimension": "", "extensionNamespace": "", "fullName": "Object \"Is On Screen\" Detection", "gdevelopVersion": "", @@ -46442,12 +53225,18 @@ "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, "eventsBasedBehaviors": [ { "description": "This behavior provides a condition to check if the object is located within the visible portion of its layer's camera. The condition also allows for specifying padding to the virtual screen border.\nNote that object visibility, such as being hidden or 0 opacity, is not considered (but you can use those existing conditions in addition to this behavior).", "fullName": "Is on screen", + "helpPath": "", + "iconUrl": "", "name": "InOnScreen", "objectType": "", + "previewIconUrl": "", "quickCustomizationVisibility": "hidden", "eventsFunctions": [ { @@ -46532,6 +53321,14 @@ ] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsOnScreen" + } + ] + }, "propertyDescriptors": [], "propertiesFolderStructure": { "folderName": "__ROOT" @@ -46543,6 +53340,7 @@ { "author": "", "category": "General", + "dimension": "", "extensionNamespace": "", "fullName": "3D collision", "gdevelopVersion": ">=5.5.222", @@ -47451,12 +54249,63 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "DefineHelperClasses" + }, + { + "functionName": "onFirstSceneLoaded" + }, + { + "folderName": "Position", + "children": [ + { + "functionName": "AreWithinDistance" + }, + { + "functionName": "Distance" + }, + { + "functionName": "SqDistance" + }, + { + "functionName": "DistanceToPosition" + }, + { + "functionName": "SqDistanceToPosition" + }, + { + "functionName": "SeparateFromObjects" + } + ] + }, + { + "folderName": "Objects", + "children": [ + { + "functionName": "PickNearest" + } + ] + }, + { + "folderName": "Collision", + "children": [ + { + "functionName": "AreInCollision" + } + ] + } + ] + }, "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { "author": "", "category": "", + "dimension": "", "extensionNamespace": "", "fullName": "", "gdevelopVersion": "", @@ -47540,12 +54389,23 @@ "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onScenePreEvents" + } + ] + }, "eventsBasedBehaviors": [ { "description": "Rotate continuously and make a sound when deleted.", "fullName": "Collectible", + "helpPath": "", + "iconUrl": "", "name": "Collectible", "objectType": "Scene3D::Model3DObject", + "previewIconUrl": "", "eventsFunctions": [ { "fullName": "", @@ -47603,1091 +54463,1699 @@ ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", - "type": "object" - }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Collectible::Collectible", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Rotating the coins in game." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Rotate" + }, + "parameters": [ + "Object", + "RotationSpeed", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Scene3D::Model3DObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Collectible::Collectible", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onDestroy" + }, + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "50", + "type": "Number", + "unit": "AngularSpeed", + "label": "Rotation speed", + "name": "RotationSpeed" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "RotationSpeed" + } + ] + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "dimension": "", + "extensionNamespace": "", + "fullName": "Leaderboard dialog", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", + "name": "LeaderboardDialog", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", + "shortDescription": "Display the player score and allow to submit it to a leaderboard.", + "version": "1.0.1", + "description": "Display the player score and allow to submit it to a leaderboard.", + "origin": { + "identifier": "LeaderboardDialog", + "name": "gdevelop-extension-store" + }, + "tags": [ + "" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Check if the events are running for the editor.", + "fullName": "Editor is running", + "functionType": "Condition", + "name": "IsInGameEdition", + "private": true, + "sentence": "Events are running for the editor", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const game = runtimeScene.getGame();\r", + "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a formated time for a given timestamp", + "fullName": "Format time", + "functionType": "StringExpression", + "name": "FormatTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(Time)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"MM:SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"SS.ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::ToFixed(Time, 3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"ms\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "ToString(floor(Time * 1000))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"HH:MM:SS.ms\"" + ] + } + ], + "actions": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Collectible::Collectible", - "type": "behavior" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" + ] } - ], - "objectGroups": [] + ] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "StringVariable" }, - "comment": "Rotating the coins in game." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Rotate" - }, - "parameters": [ - "Object", - "RotationSpeed", - "" - ] - } + "parameters": [ + "Format", + "=", + "\"HH:MM:SS\"" ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Scene3D::Model3DObject", - "type": "object" - }, + "actions": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Collectible::Collectible", - "type": "behavior" + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" + ] } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ + "expressionType": { + "type": "string" + }, + "parameters": [ { - "value": "50", - "type": "Number", - "unit": "AngularSpeed", - "label": "Rotation speed", - "name": "RotationSpeed" + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Format", + "name": "Format", + "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", + "type": "stringWithSelector" } ], - "propertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "RotationSpeed" - } - ] - } - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "User interface", - "extensionNamespace": "", - "fullName": "Leaderboard dialog", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=", - "name": "LeaderboardDialog", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/4b89b420c0ed9c540a7f00c5735a31af0db2160679d3fab2170df3681c3ac38c_trophy.svg", - "shortDescription": "Display the player score and allow to submit it to a leaderboard.", - "version": "1.0.1", - "description": "Display the player score and allow to submit it to a leaderboard.", - "origin": { - "identifier": "LeaderboardDialog", - "name": "gdevelop-extension-store" - }, - "tags": [ - "" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ + "objectGroups": [] + }, { - "description": "Check if the events are running for the editor.", - "fullName": "Editor is running", - "functionType": "Condition", - "name": "IsInGameEdition", + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "To fixed", + "functionType": "StringExpression", + "name": "ToFixed", "private": true, - "sentence": "Events are running for the editor", + "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const game = runtimeScene.getGame();\r", - "eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();" + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" ], "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ], - "parameters": [], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], "objectGroups": [] }, { - "description": "Return a formated time for a given timestamp", - "fullName": "Format time", + "fullName": "Pad start", "functionType": "StringExpression", - "name": "FormatTime", + "name": "PadStart", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [ + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const value = eventsFunctionContext.getArgument(\"Value\");", + "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", + "const padString = eventsFunctionContext.getArgument(\"PadString\");", + "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Text", + "name": "Value", + "type": "string" + }, + { + "description": "Target length", + "name": "TargetLength", + "type": "expression" + }, + { + "description": "Pad string", + "name": "PadString", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsInGameEdition" + }, + { + "functionName": "FormatTime" + }, + { + "functionName": "ToFixed" + }, + { + "functionName": "PadStart" + } + ] + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "LeaderboardDialog", + "description": "Displays the player score and allows to submit it to a leaderboard.", + "fullName": "Leaderboard dialog", + "helpPath": "", + "iconUrl": "", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "LeaderboardDialog", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Score:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "ToString(Time)" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"MM:SS.ms\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" - ] - } - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"MM:SS\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" - ] - } - ] + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StringVariable" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + }, + { + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" }, - "parameters": [ - "Format", - "=", - "\"SS\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnString" + { + "objectName": "BitmapScoreLabel" }, - "parameters": [ - "LeaderboardDialog::ToFixed(Time, 3)" - ] - } - ] - }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] + }, + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"SS.ms\"" - ] - } - ], - "actions": [ + "name": "RetryTextButton" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::ToFixed(Time, 3)" - ] + "name": "BackTextButton" + }, + { + "name": "NextTextButton" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Titles", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"ms\"" - ] - } - ], - "actions": [ + "name": "Title" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "ToString(floor(Time * 1000))" - ] + "name": "BitmapTitle" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"HH:MM:SS.ms\"" - ] - } - ], - "actions": [ + "name": "ScoreLabel" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(LeaderboardDialog::ToFixed(mod(Time, 60), 3), 6, \"0\")" - ] + "name": "BitmapScoreLabel" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "BestScoreLabels", + "objects": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"HH:MM:SS\"" - ] - } - ], - "actions": [ + "name": "BestScoreLabel" + }, { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "LeaderboardDialog::PadStart(ToString(floor(Time / 3600)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time / 60), 60)), 2, \"0\") + \":\" + LeaderboardDialog::PadStart(ToString(mod(floor(Time), 60)), 2, \"0\")" - ] + "name": "BitmapBestScoreLabel" } ] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Time", - "name": "Time", - "type": "expression" - }, - { - "description": "Format", - "name": "Format", - "supplementaryInformation": "[\"MM:SS.ms\",\"MM:SS\",\"SS\",\"SS.ms\",\"ms\",\"HH:MM:SS.ms\",\"HH:MM:SS\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Formats a number to a string with the specified number of decimal places.", - "fullName": "To fixed", - "functionType": "StringExpression", - "name": "ToFixed", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - }, + "layers": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", - "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", - "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "effects": [] } ], - "expressionType": { - "type": "string" - }, - "parameters": [ + "instances": [ { - "description": "The value to be rounded", - "name": "ValueToBeRounded", - "type": "expression" + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Number of decimal places", - "name": "NumberOfDecimalPlaces", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "fullName": "Pad start", - "functionType": "StringExpression", - "name": "PadStart", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const value = eventsFunctionContext.getArgument(\"Value\");", - "const targetLength = eventsFunctionContext.getArgument(\"TargetLength\");", - "const padString = eventsFunctionContext.getArgument(\"PadString\");", - "eventsFunctionContext.returnValue = value.padStart(targetLength, padString);" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Text", - "name": "Value", - "type": "string" + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Target length", - "name": "TargetLength", - "type": "expression" + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "description": "Pad string", - "name": "PadString", - "type": "string" + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [ - { - "areaMaxX": 688, - "areaMaxY": 480, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "defaultName": "LeaderboardDialog", - "description": "Displays the player score and allows to submit it to a leaderboard.", - "fullName": "Leaderboard dialog", - "isInnerAreaFollowingParentSize": true, - "isUsingLegacyInstancesRenderer": false, - "name": "LeaderboardDialog", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Score:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Score:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.0174418604651163, + "windowMask": false, + "selectedLayer": "" + }, + "eventsFunctions": [ { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } + ] + } + ] } ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Send" - } + "objectGroups": [] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RetryTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "LeaderboardDialog::IsInGameEdition" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitTextButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Restart" - } + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [ + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - ] + ], + "objectGroups": [] }, { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Title", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabels", + "Text", + "=", + "ScoreLabelText + Object.FormatScore(Value)" + ] + } + ] } ], - "string": "Game over", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game over", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "BackTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Back" - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [] + "objectGroups": [] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "NextTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ + "description": "the best score of the object.", + "fullName": "Best score", + "functionType": "ExpressionAndCondition", + "name": "BestScore", + "sentence": "the best score", + "events": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "BestScore" + ] + } + ] } ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Next" - } - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "BestScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Best:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 + "expressionType": { + "type": "expression" }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Best:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "BitmapTitle", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ + "parameters": [ { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "content": { - "text": "Game over", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "top" - } - }, - { - "assetStoreId": "", - "name": "BitmapScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Score:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } + "objectGroups": [] }, { - "assetStoreId": "", - "name": "BitmapBestScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Best:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Bitmap labels", - "children": [ - { - "objectName": "BitmapTitle" - }, - { - "objectName": "BitmapScoreLabel" - }, - { - "objectName": "BitmapBestScoreLabel" - } - ] - }, - { - "objectName": "Title" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "BestScoreLabel" - }, - { - "objectName": "Medal" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitTextButton" - }, - { - "objectName": "RetryTextButton" - }, - { - "objectName": "BackTextButton" - }, - { - "objectName": "NextTextButton" - }, - { - "objectName": "Panel" - } - ] - }, - "objectsGroups": [ - { - "name": "ActionTextButton", - "objects": [ - { - "name": "RetryTextButton" - }, + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BestScore", + "name": "SetBestScore", + "sentence": "", + "events": [ { - "name": "BackTextButton" - }, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "BestScore", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "BestScoreLabels", + "Text", + "=", + "BestScoreLabelText + Object.FormatScore(Value)" + ] + } + ] + } + ], + "parameters": [ { - "name": "NextTextButton" + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } - ] + ], + "objectGroups": [] }, { - "name": "Titles", - "objects": [ + "description": "Return the formated score.", + "fullName": "Format score", + "functionType": "StringExpression", + "name": "FormatScore", + "private": true, + "sentence": "", + "events": [ { - "name": "Title" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" + ] + } + ] }, { - "name": "BitmapTitle" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Format", + "!=", + "\"Number\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" + ] + } + ] } - ] - }, - { - "name": "ScoreLabels", - "objects": [ + ], + "expressionType": { + "type": "string" + }, + "parameters": [ { - "name": "ScoreLabel" + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" }, { - "name": "BitmapScoreLabel" + "description": "Score", + "name": "Value", + "type": "expression" } - ] + ], + "objectGroups": [] }, { - "name": "BestScoreLabels", - "objects": [ - { - "name": "BestScoreLabel" - }, + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ { - "name": "BitmapBestScoreLabel" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + ], + "expressionType": { + "type": "string" + }, + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" } ], - "effects": [] - } - ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 71, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", - "width": 606, - "x": 36, - "y": 41, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", - "width": 360, - "x": 40, - "y": 160, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RetryTextButton", - "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", - "width": 0, - "x": 224, - "y": 320, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 48, - "height": 106, - "layer": "", - "name": "SubmitTextButton", - "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", - "width": 216, - "x": 432, - "y": 150, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "objectGroups": [] }, - { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, - "layer": "", - "name": "Panel", - "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", - "width": 688, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "editionSettings": { - "grid": false, - "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridOffsetX": 0, - "gridOffsetY": 0, - "gridColor": 10401023, - "gridAlpha": 0.8, - "snap": false, - "zoomFactor": 1.0174418604651163, - "windowMask": false, - "selectedLayer": "" - }, - "eventsFunctions": [ { "fullName": "", - "functionType": "Action", - "name": "onCreated", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", "sentence": "", "events": [ { @@ -48696,38 +56164,113 @@ "actions": [ { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + "value": "SetStringVariable" }, "parameters": [ - "Object", + "DefaultPlayerName", "=", - "0", - "" + "Value" ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] }, { "type": { - "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + "value": "StringVariable" }, "parameters": [ - "Object", - "=", "DefaultPlayerName", - "" + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" ] } ] - }, + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "LeaderboardDialog::IsInGameEdition" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "", + "RetryTextButton", "" ] } @@ -48735,45 +56278,18 @@ "actions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "PlayerAuthentication::HideAuthenticationBanner" }, "parameters": [ "" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -48790,188 +56306,149 @@ "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "Check if the next button of the dialog is clicked.", + "fullName": "Next button clicked", + "functionType": "Condition", + "name": "IsNextClicked", + "sentence": "Next button of _PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "LeaderboardDialog::IsInGameEdition" + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, "parameters": [ - "", + "NextTextButton", "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the back button of the dialog is clicked.", + "fullName": "Back button clicked", + "functionType": "Condition", + "name": "IsBackClicked", + "sentence": "Back button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + "parameters": [ + "BackTextButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitTextButton", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "LeaderboardId", - "Score", - "PlayerNameInput.Text()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "LeaderboardId", - "yes" - ] - } - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -48988,11 +56465,11 @@ "objectGroups": [] }, { - "description": "the score.", - "fullName": "Score", + "description": "the leaderboard of the object.", + "fullName": "Leaderboard", "functionType": "ExpressionAndCondition", - "name": "Score", - "sentence": "the score", + "name": "LeaderboardId", + "sentence": "the leaderboard", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -49000,17 +56477,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "Score" + "LeaderboardId" ] } ] } ], "expressionType": { - "type": "expression" + "type": "leaderboardId" }, "parameters": [ { @@ -49025,8 +56502,8 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "Score", - "name": "SetScore", + "getterName": "LeaderboardId", + "name": "SetLeaderboardId", "sentence": "", "events": [ { @@ -49035,24 +56512,13 @@ "actions": [ { "type": { - "value": "SetNumberVariable" + "value": "SetStringVariable" }, "parameters": [ - "Score", + "LeaderboardId", "=", "Value" ] - }, - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "ScoreLabels", - "Text", - "=", - "ScoreLabelText + Object.FormatScore(Value)" - ] } ] } @@ -49068,11 +56534,12 @@ "objectGroups": [] }, { - "description": "the best score of the object.", - "fullName": "Best score", + "description": "the title of the object.", + "fullName": "Title", "functionType": "ExpressionAndCondition", - "name": "BestScore", - "sentence": "the best score", + "name": "Title", + "private": true, + "sentence": "the title", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -49080,17 +56547,17 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "SetReturnString" }, "parameters": [ - "BestScore" + "Title.Text::Value()" ] } ] } ], "expressionType": { - "type": "expression" + "type": "string" }, "parameters": [ { @@ -49105,33 +56572,23 @@ { "fullName": "", "functionType": "ActionWithOperator", - "getterName": "BestScore", - "name": "SetBestScore", + "getterName": "Title", + "name": "SetTitle", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "BestScore", - "=", - "Value" - ] - }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "BestScoreLabels", + "Title", "Text", "=", - "BestScoreLabelText + Object.FormatScore(Value)" + "Value" ] } ] @@ -49146,358 +56603,1004 @@ } ], "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "onCreated" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "Score" + }, + { + "functionName": "SetScore" + }, + { + "functionName": "BestScore" + }, + { + "functionName": "SetBestScore" + }, + { + "functionName": "FormatScore" + }, + { + "functionName": "DefaultPlayerName" + }, + { + "functionName": "SetDefaultPlayerName" + }, + { + "functionName": "PlayerName" + }, + { + "functionName": "IsRestartClicked" + }, + { + "functionName": "IsNextClicked" + }, + { + "functionName": "IsBackClicked" + }, + { + "functionName": "IsScoreSubmitted" + }, + { + "functionName": "LeaderboardId" + }, + { + "functionName": "SetLeaderboardId" + }, + { + "functionName": "Title" + }, + { + "functionName": "SetTitle" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "name": "DefaultPlayerName" }, { - "description": "Return the formated score.", - "fullName": "Format score", - "functionType": "StringExpression", - "name": "FormatScore", - "private": true, - "sentence": "", - "events": [ + "value": "", + "type": "LeaderboardId", + "label": "Leaderboard", + "name": "LeaderboardId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "hidden": true, + "name": "Score" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Best score", + "hidden": true, + "name": "BestScore" + }, + { + "value": "Number", + "type": "Choice", + "label": "Format", + "group": "Score format", + "choices": [ + { + "label": "Number", + "value": "Number" + }, + { + "label": "MM:SS.ms", + "value": "MM:SS.ms" + }, + { + "label": "MM:SS", + "value": "MM:SS" + }, + { + "label": "SS.ms", + "value": "SS.ms" + }, + { + "label": "SS", + "value": "SS" + }, + { + "label": "ms", + "value": "ms" + }, + { + "label": "HH:MM:SS.ms", + "value": "HH:MM:SS.ms" + }, + { + "label": "HH:MM:SS", + "value": "HH:MM:SS" + } + ], + "name": "Format" + }, + { + "value": "", + "type": "String", + "label": "Prefix", + "group": "Score format", + "name": "Prefix" + }, + { + "value": "", + "type": "String", + "label": "Suffix", + "group": "Score format", + "name": "Suffix" + }, + { + "value": "3", + "type": "Number", + "label": "Round to decimal point", + "group": "Score format", + "name": "NumberDecimalPoint" + }, + { + "value": "Score: ", + "type": "String", + "label": "Score label", + "name": "ScoreLabelText" + }, + { + "value": "Best: ", + "type": "String", + "label": "Best score label", + "name": "BestScoreLabelText" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "DefaultPlayerName" + }, + { + "propertyName": "LeaderboardId" + }, + { + "propertyName": "Score" + }, + { + "propertyName": "BestScore" + }, + { + "folderName": "Score format", + "children": [ + { + "propertyName": "Format" + }, + { + "propertyName": "Prefix" + }, + { + "propertyName": "Suffix" + }, + { + "propertyName": "NumberDecimalPoint" + } + ] + }, + { + "propertyName": "ScoreLabelText" + }, + { + "propertyName": "BestScoreLabelText" + } + ] + }, + "variants": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "name": "Grey and yellow", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Time:", + "font": "Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "Chango-Regular.ttf", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Send" + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RetryTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Restart" + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "assets\\Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "string": "Game over", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Game over", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "lineHeight": 0, + "color": "72;72;79" + } + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "BackTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "=", - "\"Number\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ - { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Prefix + ToString(roundTo(Value, NumberDecimalPoint)) + Suffix" - ] - } - ] + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Back" + } }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Medal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [] + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "NextTextButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Yellow button 2", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "Format", - "!=", - "\"Number\"" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } ], - "actions": [ + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25, + "LabelText": "Next" + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "BestScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Best:", + "font": "", + "textAlignment": "", + "characterSize": 40, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Best:", + "font": "", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "lineHeight": 0, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "BitmapTitle", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "Prefix + LeaderboardDialog::FormatTime(Value, Format) + Suffix" - ] + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false } - ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ + ], + "content": { + "text": "Game over", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "top" + } + }, { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "assetStoreId": "", + "name": "BitmapScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Score:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } }, { - "description": "Score", - "name": "Value", - "type": "expression" + "assetStoreId": "", + "name": "BitmapBestScoreLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "text": "Best:", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "left", + "verticalTextAlignment": "top" + } } ], - "objectGroups": [] - }, - { - "description": "the default player name.", - "fullName": "Default player name", - "functionType": "ExpressionAndCondition", - "name": "DefaultPlayerName", - "sentence": "the default player name", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnString" + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "Bitmap labels", + "children": [ + { + "objectName": "BitmapTitle" }, - "parameters": [ - "DefaultPlayerName" - ] - } - ] - } - ], - "expressionType": { - "type": "string" + { + "objectName": "BitmapScoreLabel" + }, + { + "objectName": "BitmapBestScoreLabel" + } + ] + }, + { + "objectName": "Title" + }, + { + "objectName": "ScoreLabel" + }, + { + "objectName": "BestScoreLabel" + }, + { + "objectName": "Medal" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitTextButton" + }, + { + "objectName": "RetryTextButton" + }, + { + "objectName": "BackTextButton" + }, + { + "objectName": "NextTextButton" + }, + { + "objectName": "Panel" + } + ] }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "DefaultPlayerName", - "name": "SetDefaultPlayerName", - "sentence": "", - "events": [ + "objectsGroups": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "ActionTextButton", + "objects": [ { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "DefaultPlayerName", - "=", - "Value" - ] + "name": "RetryTextButton" + }, + { + "name": "BackTextButton" + }, + { + "name": "NextTextButton" } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "name": "Titles", + "objects": [ { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] + "name": "Title" }, { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "DefaultPlayerName", - "!=", - "\"0\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "DefaultPlayerName" - ] + "name": "BitmapTitle" } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the player name.", - "fullName": "Player name", - "functionType": "ExpressionAndCondition", - "name": "PlayerName", - "sentence": "the player name", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "name": "ScoreLabels", + "objects": [ { - "type": { - "value": "SetReturnString" - }, - "parameters": [ - "PlayerNameInput.Text::Value()" - ] + "name": "ScoreLabel" + }, + { + "name": "BitmapScoreLabel" } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the restart button of the dialog is clicked.", - "fullName": "Restart button clicked", - "functionType": "Condition", - "name": "IsRestartClicked", - "sentence": "Restart button of _PARAM0_ is clicked", - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "RetryTextButton", - "" - ] - } - ], - "actions": [ + "name": "BestScoreLabels", + "objects": [ { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] + "name": "BestScoreLabel" }, { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "name": "BitmapBestScoreLabel" } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the next button of the dialog is clicked.", - "fullName": "Next button clicked", - "functionType": "Condition", - "name": "IsNextClicked", - "sentence": "Next button of _PARAM0_ is clicked", - "events": [ + "layers": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "NextTextButton", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } - ] + ], + "effects": [] } ], - "parameters": [ + "instances": [ { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" + "angle": 0, + "customSize": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RetryTextButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitTextButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], - "objectGroups": [] - }, + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.0174418604651163, + "windowMask": false, + "selectedLayer": "" + } + } + ] + } + ] + }, + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "AirControl3D", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Turn and move objects forward.", + "fullName": "3D air control", + "helpPath": "", + "iconUrl": "", + "name": "AirControl3D", + "objectType": "", + "previewIconUrl": "", + "quickCustomizationVisibility": "hidden", + "eventsFunctions": [ { - "description": "Check if the back button of the dialog is clicked.", - "fullName": "Back button clicked", - "functionType": "Condition", - "name": "IsBackClicked", - "sentence": "Back button of _PARAM0_ is clicked", + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "BackTextButton", - "" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveBackward", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveForward", + "True", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveBackward", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForce", + "=", + "-Force" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasPressedMoveForward", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentForce", + "=", + "Force" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Physics3D::Physics3DBehavior::ApplyForceAtCenter" + }, + "parameters": [ + "Object", + "Physics3D", + "XFromAngleAndDistance(Object.Angle(), CurrentForce)", + "YFromAngleAndDistance(Object.Angle(), CurrentForce)", + "0" + ] + } + ] + } + ], + "variables": [ + { + "name": "CurrentForce", + "type": "number", + "value": 0 + } ] } ] @@ -49507,196 +57610,133 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], "objectGroups": [] }, { - "description": "Check if the score has been sucessfully submitted by the dialog.", - "fullName": "Score is submitted", - "functionType": "Condition", - "name": "IsScoreSubmitted", - "sentence": "_PARAM0_ submitted a score", + "description": "Simulate a press of the move backward key.", + "fullName": "Simulate move backward key press", + "functionType": "Action", + "group": "Top-down walk state", + "name": "SimulateMoveBackwardKey", + "sentence": "Simulate pressing move backward key for _PARAM0_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] - }, - { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "LeaderboardId" + "HadPressedMoveBackward", + "True", + "" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "True" + "HasPressedMoveBackwardLast", + "True", + "" ] } ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the leaderboard of the object.", - "fullName": "Leaderboard", - "functionType": "ExpressionAndCondition", - "name": "LeaderboardId", - "sentence": "the leaderboard", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetBooleanVariable" }, "parameters": [ - "LeaderboardId" + "HasPressedMoveBackward", + "True", + "" ] } ] } ], - "expressionType": { - "type": "leaderboardId" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "LeaderboardId", - "name": "SetLeaderboardId", - "sentence": "", + "description": "Simulate a press of the move forward key.", + "fullName": "Simulate move forward key press", + "functionType": "Action", + "group": "Top-down walk state", + "name": "SimulateMoveForwardKey", + "sentence": "Simulate pressing move forward key for _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "SetStringVariable" + "inverted": true, + "value": "BooleanVariable" }, "parameters": [ - "LeaderboardId", - "=", - "Value" + "HadPressedMoveForward", + "True", + "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "description": "the title of the object.", - "fullName": "Title", - "functionType": "ExpressionAndCondition", - "name": "Title", - "private": true, - "sentence": "the title", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "SetReturnString" + "value": "SetBooleanVariable" }, "parameters": [ - "Title.Text::Value()" + "HasPressedMoveBackwardLast", + "False", + "" ] } ] - } - ], - "expressionType": { - "type": "string" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "Title", - "name": "SetTitle", - "sentence": "", - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "SetBooleanVariable" }, "parameters": [ - "Title", - "Text", - "=", - "Value" + "HasPressedMoveForward", + "True", + "" ] } ] @@ -49705,1179 +57745,951 @@ "parameters": [ { "description": "Object", - "name": "Object", - "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", - "type": "object" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Default player name", - "name": "DefaultPlayerName" - }, - { - "value": "", - "type": "LeaderboardId", - "label": "Leaderboard", - "name": "LeaderboardId" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "hidden": true, - "name": "Score" - }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "Best score", - "hidden": true, - "name": "BestScore" - }, - { - "value": "Number", - "type": "Choice", - "label": "Format", - "group": "Score format", - "choices": [ - { - "label": "Number", - "value": "Number" - }, - { - "label": "MM:SS.ms", - "value": "MM:SS.ms" - }, - { - "label": "MM:SS", - "value": "MM:SS" - }, - { - "label": "SS.ms", - "value": "SS.ms" - }, - { - "label": "SS", - "value": "SS" - }, - { - "label": "ms", - "value": "ms" - }, - { - "label": "HH:MM:SS.ms", - "value": "HH:MM:SS.ms" + "name": "Object", + "type": "object" }, { - "label": "HH:MM:SS", - "value": "HH:MM:SS" + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AirControl3D::AirControl3D", + "type": "behavior" } ], - "name": "Format" - }, - { - "value": "", - "type": "String", - "label": "Prefix", - "group": "Score format", - "name": "Prefix" - }, + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPreEvents" + }, + { + "folderName": "Top-down walk state", + "children": [ + { + "functionName": "SimulateMoveBackwardKey" + }, + { + "functionName": "SimulateMoveForwardKey" + } + ] + } + ] + }, + "propertyDescriptors": [ { "value": "", - "type": "String", - "label": "Suffix", - "group": "Score format", - "name": "Suffix" + "type": "Behavior", + "label": "3D physics engine", + "extraInformation": [ + "Physics3D::Physics3DBehavior" + ], + "choices": [], + "name": "Physics3D" }, { - "value": "3", + "value": "4000", "type": "Number", - "label": "Round to decimal point", - "group": "Score format", - "name": "NumberDecimalPoint" + "unit": "Newton", + "label": "Force", + "name": "Force" }, { - "value": "Score: ", - "type": "String", - "label": "Score label", - "name": "ScoreLabelText" + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasPressedMoveForward" }, { - "value": "Best: ", - "type": "String", - "label": "Best score label", - "name": "BestScoreLabelText" + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "HasPressedMoveBackward" } ], "propertiesFolderStructure": { "folderName": "__ROOT", "children": [ { - "propertyName": "DefaultPlayerName" - }, - { - "propertyName": "LeaderboardId" + "propertyName": "Physics3D" }, { - "propertyName": "Score" + "propertyName": "Force" }, { - "propertyName": "BestScore" + "propertyName": "HasPressedMoveForward" }, { - "folderName": "Score format", - "children": [ - { - "propertyName": "Format" - }, - { - "propertyName": "Prefix" - }, - { - "propertyName": "Suffix" - }, - { - "propertyName": "NumberDecimalPoint" - } - ] - }, + "propertyName": "HasPressedMoveBackward" + } + ] + }, + "sharedPropertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "", + "hidden": true, + "name": "Cos" + }, + { + "value": "0", + "type": "Number", + "label": "", + "name": "Sin" + } + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ { - "propertyName": "ScoreLabelText" + "propertyName": "Cos" }, { - "propertyName": "BestScoreLabelText" + "propertyName": "Sin" } ] - }, - "variants": [ - { - "areaMaxX": 688, - "areaMaxY": 480, - "areaMaxZ": 48, - "areaMinX": 0, - "areaMinY": 0, - "areaMinZ": 0, - "name": "Grey and yellow", - "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Time:", - "font": "Chango-Regular.ttf", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Time:", - "font": "Chango-Regular.ttf", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "Chango-Regular.ttf", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 0, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Send" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RetryTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Restart" - } - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 1, - "useLegacyBottomAndRightAnchors": false - } - ] - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "Title", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "string": "Game over", - "font": "", - "textAlignment": "center", - "characterSize": 60, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Game over", - "font": "", - "textAlignment": "center", - "verticalTextAlignment": "top", - "characterSize": 60, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "BackTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Back" - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Medal", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [] - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "NextTextButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variant": "Yellow button 2", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 2, - "leftEdgeAnchor": 4, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25, - "LabelText": "Next" - } - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "BestScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Best:", - "font": "", - "textAlignment": "", - "characterSize": 40, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "content": { - "bold": false, - "isOutlineEnabled": false, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "255;255;255", - "outlineThickness": 2, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Best:", - "font": "", - "textAlignment": "", - "verticalTextAlignment": "top", - "characterSize": 40, - "lineHeight": 0, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "BitmapTitle", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Anchor", - "type": "AnchorBehavior::AnchorBehavior", - "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 1, - "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 2, - "topEdgeAnchor": 0, - "useLegacyBottomAndRightAnchors": false - } - ], - "content": { - "text": "Game over", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "center", - "verticalTextAlignment": "top" - } - }, + } + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "", + "dimension": "", + "extensionNamespace": "", + "fullName": "", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "", + "name": "UntitledExtension", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 100, + "areaMaxY": 100, + "areaMaxZ": 100, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "", + "fullName": "", + "helpPath": "", + "iconUrl": "", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "MyObject", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "name": "New3DBox", + "persistentUuid": "6bc25717-cae1-4924-8624-86120af32b61", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 100, + "height": 100, + "depth": 100, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "New3DBox" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "assetStoreId": "", - "name": "BitmapScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Score:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } - }, + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "New3DBox", + "persistentUuid": "8915f36f-608f-4f98-abad-b884378980c8", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 4.180511245667042, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + }, + { + "areaMaxX": 50, + "areaMaxY": 50, + "areaMaxZ": 50, + "areaMinX": -50, + "areaMinY": -50, + "areaMinZ": -50, + "defaultName": "", + "description": "", + "fullName": "", + "helpPath": "", + "iconUrl": "", + "is3D": true, + "isUsingLegacyInstancesRenderer": false, + "name": "MyObject2", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "name": "New3DBox", + "persistentUuid": "6bc25717-cae1-4924-8624-86120af32b61", + "type": "Scene3D::Cube3DObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "width": 100, + "height": 100, + "depth": 100, + "enableTextureTransparency": false, + "facesOrientation": "Y", + "frontFaceResourceName": "", + "backFaceResourceName": "", + "backFaceUpThroughWhichAxisRotation": "X", + "leftFaceResourceName": "", + "rightFaceResourceName": "", + "topFaceResourceName": "", + "bottomFaceResourceName": "", + "frontFaceVisible": true, + "backFaceVisible": true, + "leftFaceVisible": true, + "rightFaceVisible": true, + "topFaceVisible": true, + "bottomFaceVisible": true, + "frontFaceResourceRepeat": false, + "backFaceResourceRepeat": false, + "leftFaceResourceRepeat": false, + "rightFaceResourceRepeat": false, + "topFaceResourceRepeat": false, + "bottomFaceResourceRepeat": false, + "materialType": "StandardWithoutMetalness", + "tint": "255;255;255", + "isCastingShadow": true, + "isReceivingShadow": true + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "New3DBox" + } + ] + }, + "objectsGroups": [], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera2DPlaneMaxDrawingDistance": 5000, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { - "assetStoreId": "", - "name": "BitmapBestScoreLabel", - "type": "BitmapText::BitmapTextObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "text": "Best:", - "opacity": 255, - "scale": 1, - "fontSize": 20, - "tint": "255;255;255", - "bitmapFontResourceName": "", - "textureAtlasResourceName": "", - "align": "left", - "verticalTextAlignment": "top" - } + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 } ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "folderName": "Bitmap labels", - "children": [ - { - "objectName": "BitmapTitle" - }, - { - "objectName": "BitmapScoreLabel" - }, - { - "objectName": "BitmapBestScoreLabel" - } - ] - }, - { - "objectName": "Title" - }, - { - "objectName": "ScoreLabel" - }, - { - "objectName": "BestScoreLabel" - }, - { - "objectName": "Medal" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitTextButton" - }, - { - "objectName": "RetryTextButton" - }, - { - "objectName": "BackTextButton" - }, - { - "objectName": "NextTextButton" - }, - { - "objectName": "Panel" - } - ] + "effects": [] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "New3DBox", + "persistentUuid": "8915f36f-608f-4f98-abad-b884378980c8", + "width": 0, + "x": -50, + "y": -50, + "z": -50, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 5.2729153475416, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + }, + "variants": [] + } + ] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Game mechanic", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Rectangular flood fill", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGc+DQoJPHJlY3QgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz4NCgk8cmVjdCB4PSIxMiIgeT0iMTIiIHdpZHRoPSI4IiBoZWlnaHQ9IjgiLz4NCgk8cmVjdCB4PSIyIiB5PSIxMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxyZWN0IHg9IjEyIiB5PSIyMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxyZWN0IHg9IjIyIiB5PSIxMiIgd2lkdGg9IjgiIGhlaWdodD0iOCIvPg0KCTxwYXRoIGQ9Ik0yMiwyMnY4aDdjMC42LDAsMS0wLjQsMS0xdi03SDIyeiIvPg0KCTxwYXRoIGQ9Ik0xMCwyMkgydjdjMCwwLjYsMC40LDEsMSwxaDdWMjJ6Ii8+DQoJPHBhdGggZD0iTTEwLDEwVjJIM0MyLjQsMiwyLDIuNCwyLDN2N0gxMHoiLz4NCgk8cGF0aCBkPSJNMjIsMTBoOFYzYzAtMC42LTAuNC0xLTEtMWgtN1YxMHoiLz4NCjwvZz4NCjwvc3ZnPg0K", + "name": "RectangularFloodFill", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Graphic Design/Graphic Design_grid.svg", + "shortDescription": "Create objects as a grid to cover a rectangular area or an other object.", + "version": "2.1.0", + "description": [ + "This extension can be used to create multiple copies of an object in a wide variety of 2D arrangements, including:", + "- horizontal row(s)", + "- vertical column(s)", + "- a solid rectangle or square", + "- an evenly spaced grid", + "- a grid with different spacing between rows and columns", + "", + "How To Use:", + "- Place target objects in the scene in the places you want fill objects to be created", + "- This action only needs to be run once (at the beginning of the scene or using \"Trigger Once\")", + "", + "Object variables (automatically added on Fill objects): ", + "- \"CreationID\" (number)", + "- \"RowID\" (number)", + "- \"ColumnID\" (number)", + "", + "Tips:", + "- Use fill objects that are the same size as the scene editor grid. This will make sure the fill objects fit exactly inside the target objects.", + "- Hide target objects at the beginning of the scene if you don't want them to be visible.", + "- Keep the default origin point (top-left corner) on fill objects them to line up exactly with target objects.", + "", + "Watch this [tutorial video](https://youtu.be/rlGSlNSRR9w) to see examples of how to use this extension." + ], + "origin": { + "identifier": "RectangularFloodFill", + "name": "gdevelop-extension-store" + }, + "tags": [ + "create", + "grid" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "changelog": [ + { + "version": "2.0.0", + "breaking": [ + "- The action no longer set \"BatchID\" variables. It can be done on the created objects after calling the action.", + "- Spacing parameters have been inverted." + ] + } + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Create fill objects that cover the rectangular area of target objects.", + "fullName": "Create objects to flood fill other objects", + "functionType": "Action", + "name": "RectangularFloodFill", + "sentence": "Create _PARAM2_ to cover _PARAM1_ with _PARAM3_ pixels between columns and _PARAM4_ pixels between rows on layer: _PARAM5_ at Z-order: _PARAM6_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "objectsGroups": [ + "comment": "Create a temp object to determine size of fill object, then delete it" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "ActionTextButton", - "objects": [ - { - "name": "RetryTextButton" - }, - { - "name": "BackTextButton" - }, - { - "name": "NextTextButton" - } + "type": { + "value": "Create" + }, + "parameters": [ + "", + "FillObject", + "0", + "0", + "" ] }, { - "name": "Titles", - "objects": [ - { - "name": "Title" - }, - { - "name": "BitmapTitle" - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectWidth", + "=", + "FillObject.Width()" ] }, { - "name": "ScoreLabels", - "objects": [ - { - "name": "ScoreLabel" - }, - { - "name": "BitmapScoreLabel" - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectHeight", + "=", + "FillObject.Height()" ] }, { - "name": "BestScoreLabels", - "objects": [ - { - "name": "BestScoreLabel" - }, - { - "name": "BitmapBestScoreLabel" - } + "type": { + "value": "Delete" + }, + "parameters": [ + "FillObject", + "Floor" ] } ], - "layers": [ + "events": [ { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera2DPlaneMaxDrawingDistance": 5000, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "cameraType": "", - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create permanent objects using the Create Multiple Copies of Object extension" + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "TargetObject", + "conditions": [], + "actions": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 + "type": { + "value": "RectangularFloodFill::CreateObjectsOverRectangle" + }, + "parameters": [ + "", + "FillObject", + "floor(TargetObject.Width() / (ObjectWidth + SpaceBetweenColumns))", + "floor(TargetObject.Height() / (ObjectHeight + SpaceBetweenRows))", + "TargetObject.CenterX() - TargetObject.Width() / 2", + "TargetObject.CenterY() - TargetObject.Height() / 2", + "SpaceBetweenColumns", + "SpaceBetweenRows", + "Layer", + "Zorder", + "Zorder" + ] } - ], - "effects": [] + ] } ], - "instances": [ - { - "angle": 0, - "customSize": false, - "height": 71, - "layer": "", - "name": "ScoreLabel", - "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", - "width": 606, - "x": 36, - "y": 41, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, + "variables": [ { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", - "width": 360, - "x": 40, - "y": 160, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "name": "ObjectWidth", + "type": "number", + "value": 0 }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RetryTextButton", - "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", - "width": 0, - "x": 224, - "y": 320, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "name": "ObjectHeight", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Target object", + "longDescription": "Rectangular area that will be covered by fill objects", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Fill object", + "longDescription": "Object that is created to cover the rectangular area of target objects", + "name": "FillObject", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Space between columns (pixels)", + "name": "SpaceBetweenColumns", + "type": "expression" + }, + { + "description": "Space between rows (pixels)", + "name": "SpaceBetweenRows", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + }, + { + "description": "Z order", + "name": "Zorder", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Create multiple copies of an object.", + "fullName": "Create objects to flood fill a rectanglular area", + "functionType": "Action", + "name": "CreateObjectsOverRectangle", + "sentence": "Create _PARAM2_ columns and _PARAM3_ rows of _PARAM1_ with top-left corner at _PARAM4_ ; _PARAM5_ and _PARAM6_ pixels between columns and _PARAM7_ pixels between rows on layer: _PARAM8_ at Z-order: _PARAM9_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Temp object is created to record its width and height (which is needed to calculate spacing)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Object", + "0", + "0", + "" + ] }, { - "angle": 0, - "customSize": true, - "depth": 48, - "height": 106, - "layer": "", - "name": "SubmitTextButton", - "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", - "width": 216, - "x": 432, - "y": 150, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectWidth", + "=", + "Object.Width()" + ] }, { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, - "layer": "", - "name": "Panel", - "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", - "width": 688, - "x": 0, - "y": 0, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "ObjectHeight", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object", + "Floor" + ] } ], - "editionSettings": { - "grid": false, - "gridType": "rectangular", - "gridWidth": 32, - "gridHeight": 32, - "gridOffsetX": 0, - "gridOffsetY": 0, - "gridColor": 10401023, - "gridAlpha": 0.8, - "snap": false, - "zoomFactor": 1.0174418604651163, - "windowMask": false, - "selectedLayer": "" - } - } - ] - } - ] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "", - "gdevelopVersion": "", - "helpPath": "", - "iconUrl": "", - "name": "AirControl3D", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Turn and move objects forward.", - "fullName": "3D air control", - "name": "AirControl3D", - "objectType": "", - "quickCustomizationVisibility": "hidden", - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Starting at top left, create objects in grid." + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "NumberOfRows", + "conditions": [], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "SetNumberVariable" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "x", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "NumberOfColumns", + "conditions": [], + "actions": [ { "type": { - "value": "BooleanVariable" + "value": "Create" }, "parameters": [ - "HasPressedMoveBackward", - "True", - "" + "", + "Object", + "StartingPositionX + x * (ObjectWidth + ColumnSpacing)", + "StartingPositionY + y * (ObjectHeight + RowSpacing)", + "Layer" ] }, { "type": { - "value": "BooleanVariable" + "value": "ModVarObjet" }, "parameters": [ - "HasPressedMoveForward", - "True", - "" + "Object", + "RowID", + "=", + "y + 1" ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentForce", - "=", - "-Force" - ] - } + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "ColumnID", + "=", + "x + 1" ] }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "CreationID", + "=", + "CreationID" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "x", + "+", + "1" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CreationID", + "+", + "1" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "NumberVariable" }, "parameters": [ - "HasPressedMoveForward", - "True", - "" + "Zorder", + "!=", + "0" ] } ], "actions": [ { "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "CurrentForce", - "=", - "Force" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Physics3D::Physics3DBehavior::ApplyForceAtCenter" + "value": "ChangePlan" }, "parameters": [ "Object", - "Physics3D", - "XFromAngleAndDistance(Object.Angle(), CurrentForce)", - "YFromAngleAndDistance(Object.Angle(), CurrentForce)", - "0" + "=", + "Zorder" ] } ] } - ], - "variables": [ + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "name": "CurrentForce", - "type": "number", - "value": 0 + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "y", + "+", + "1" + ] } ] } ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Simulate a press of the move backward key.", - "fullName": "Simulate move backward key press", - "functionType": "Action", - "group": "Top-down walk state", - "name": "SimulateMoveBackwardKey", - "sentence": "Simulate pressing move backward key for _PARAM0_", - "events": [ + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "HadPressedMoveBackward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackwardLast", - "True", - "" - ] - } - ] + "name": "ObjectWidth", + "type": "number", + "value": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackward", - "True", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "name": "ObjectHeight", + "type": "number", + "value": 0 }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Simulate a press of the move forward key.", - "fullName": "Simulate move forward key press", - "functionType": "Action", - "group": "Top-down walk state", - "name": "SimulateMoveForwardKey", - "sentence": "Simulate pressing move forward key for _PARAM0_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "BooleanVariable" - }, - "parameters": [ - "HadPressedMoveForward", - "True", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveBackwardLast", - "False", - "" - ] - } - ] + "name": "x", + "type": "number", + "value": 0 }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "HasPressedMoveForward", - "True", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" + "name": "y", + "type": "number", + "value": 0 }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "AirControl3D::AirControl3D", - "type": "behavior" + "name": "CreationID", + "type": "number", + "value": 1 } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ + "parameters": [ { - "value": "", - "type": "Behavior", - "label": "3D physics engine", - "extraInformation": [ - "Physics3D::Physics3DBehavior" - ], - "choices": [], - "name": "Physics3D" + "description": "Object", + "name": "Object", + "type": "objectListOrEmptyIfJustDeclared" }, { - "value": "4000", - "type": "Number", - "unit": "Newton", - "label": "Force", - "name": "Force" + "description": "Number of columns (default: 1)", + "name": "NumberOfColumns", + "type": "expression" }, { - "value": "", - "type": "Boolean", - "label": "", - "hidden": true, - "name": "HasPressedMoveForward" + "description": "Number of rows (default: 1)", + "name": "NumberOfRows", + "type": "expression" }, { - "value": "", - "type": "Boolean", - "label": "", - "hidden": true, - "name": "HasPressedMoveBackward" - } - ], - "propertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "Physics3D" - }, - { - "propertyName": "Force" - }, - { - "propertyName": "HasPressedMoveForward" - }, - { - "propertyName": "HasPressedMoveBackward" - } - ] - }, - "sharedPropertyDescriptors": [ + "description": "Top-left starting position (X) (default: 0)", + "name": "StartingPositionX", + "type": "expression" + }, { - "value": "0", - "type": "Number", - "label": "", - "hidden": true, - "name": "Cos" + "description": "Top-left starting position (Y) (default: 0)", + "name": "StartingPositionY", + "type": "expression" }, { - "value": "0", - "type": "Number", - "label": "", - "name": "Sin" + "description": "Amount of space between columns (default: 0)", + "name": "ColumnSpacing", + "type": "expression" + }, + { + "description": "Amount of space between rows (default: 0)", + "name": "RowSpacing", + "type": "expression" + }, + { + "description": "Layer", + "name": "Layer", + "type": "layer" + }, + { + "description": "Z order", + "name": "Zorder", + "type": "expression" } ], - "sharedPropertiesFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "propertyName": "Cos" - }, - { - "propertyName": "Sin" - } - ] - } + "objectGroups": [] } ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "RectangularFloodFill" + }, + { + "functionName": "CreateObjectsOverRectangle" + } + ] + }, + "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], diff --git a/examples/3d-car-coin-hunt/assets/LightGlow.png b/examples/3d-car-coin-hunt/assets/LightGlow.png new file mode 100644 index 000000000..871c194cc Binary files /dev/null and b/examples/3d-car-coin-hunt/assets/LightGlow.png differ