From 54cb32762047be775c0d3fcebddeecefe45972ca Mon Sep 17 00:00:00 2001 From: Jesse Howard Date: Thu, 13 Aug 2026 20:07:54 -0400 Subject: [PATCH] Transition work --- WorldOfSolariaV1.json | 4968 +++++++++++++++++++- WorldOfSolariaV1.json.autosave | 2 +- assets/8BitOperatorPlus8Regular_Edited.fnt | 95 + assets/8BitOperatorPlus8Regular_Edited.png | Bin 0 -> 4317 bytes assets/Small Blue Button_Hovered.png | Bin 0 -> 292 bytes assets/Small Blue Button_Idle.png | Bin 0 -> 230 bytes assets/Small Blue Button_Pressed.png | Bin 0 -> 4559 bytes assets/tempTitle.png | Bin 132357 -> 118644 bytes 8 files changed, 4928 insertions(+), 137 deletions(-) create mode 100644 assets/8BitOperatorPlus8Regular_Edited.fnt create mode 100644 assets/8BitOperatorPlus8Regular_Edited.png create mode 100644 assets/Small Blue Button_Hovered.png create mode 100644 assets/Small Blue Button_Idle.png create mode 100644 assets/Small Blue Button_Pressed.png diff --git a/WorldOfSolariaV1.json b/WorldOfSolariaV1.json index a0c4dad..b6e1364 100644 --- a/WorldOfSolariaV1.json +++ b/WorldOfSolariaV1.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 279, + "build": 274, "major": 5, "minor": 6, "revision": 0 @@ -139,6 +139,65 @@ "name": "assets/tempTitle.png", "smoothed": false, "userAdded": false + }, + { + "file": "assets/8BitOperatorPlus8Regular_Edited.png", + "kind": "image", + "metadata": "", + "name": "assets\\8BitOperatorPlus8Regular_Edited.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/15c1797cbcb41c3a753b6bbb21cfa60284cfaf81c9891c3abf78a8e0e1cacf59_8BitOperatorPlus8Regular_Edited.png", + "name": "8BitOperatorPlus8Regular_Edited.png" + } + }, + { + "file": "assets/Small Blue Button_Hovered.png", + "kind": "image", + "metadata": "", + "name": "assets\\Small Blue Button_Hovered.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/f80ae062891a0a4612c0160ed931165461392019f89a8545f28c195f645ebc48_Small Blue Button_Hovered.png", + "name": "Small Blue Button_Hovered.png" + } + }, + { + "file": "assets/Small Blue Button_Idle.png", + "kind": "image", + "metadata": "", + "name": "assets\\Small Blue Button_Idle.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/c22b15c77047f1545806141e1129900bdc985d191b7ab5ebaae834a90c270ed2_Small Blue Button_Idle.png", + "name": "Small Blue Button_Idle.png" + } + }, + { + "file": "assets/Small Blue Button_Pressed.png", + "kind": "image", + "metadata": "", + "name": "assets\\Small Blue Button_Pressed.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/9e01b09016c6a200b53a55cac3cf34f083785eb6b9f55de490a71ad352858b36_Small Blue Button_Pressed.png", + "name": "Small Blue Button_Pressed.png" + } + }, + { + "file": "assets/8BitOperatorPlus8Regular_Edited.fnt", + "kind": "bitmapFont", + "metadata": "", + "name": "assets\\8BitOperatorPlus8Regular_Edited.fnt", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/6b410f07a3a02e721a49d41795e84b56707ef28ac4d095d55f1fd1093760e134_8BitOperatorPlus8Regular_Edited.fnt", + "name": "8BitOperatorPlus8Regular_Edited.fnt" + } } ] }, @@ -202,15 +261,15 @@ ], "layouts": [ { - "b": 255, + "b": 14, "disableInputWhenNotFocused": true, "mangledName": "Splash", "name": "Splash", - "r": 247, + "r": 14, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", - "v": 249, + "v": 14, "uiSettings": { "grid": true, "gridType": "rectangular", @@ -343,6 +402,13 @@ ] }, "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Functions" + }, { "colorB": 228, "colorG": 176, @@ -365,14 +431,6 @@ } ], "actions": [ - { - "type": { - "value": "CenterWindow" - }, - "parameters": [ - "" - ] - }, { "type": { "value": "SetWindowSize" @@ -386,16 +444,18 @@ }, { "type": { - "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" + "value": "CenterWindow" }, "parameters": [ - "shp_fade", - "FlashTransitionPainter", - "\"0;0;0\"", - "1", - "\"Flash\"", - "\"Backward\"", - "255", + "" + ] + }, + { + "type": { + "value": "AdvancedWindow::SetResizable" + }, + "parameters": [ + "", "" ] }, @@ -673,6 +733,54 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "btn_login", + "persistentUuid": "1094a52f-c2c7-43fd-9c08-fd6d96bf9310", + "width": 0, + "x": 208, + "y": 352, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "btn_register", + "persistentUuid": "985c1bc0-a895-4ac6-8cfb-27f8999e9fa1", + "width": 0, + "x": 400, + "y": 352, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "btn_settings", + "persistentUuid": "e0c76744-0bfc-491c-8182-c8f0dc1d5d73", + "width": 0, + "x": 688, + "y": 16, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -736,6 +844,48 @@ ] } ] + }, + { + "assetStoreId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf", + "name": "btn_login", + "persistentUuid": "510c8083-e726-45db-abbd-3ce87aeaa45f", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Small Blue Button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LabelText": "Login", + "PressedLabelOffsetY": 2 + } + }, + { + "assetStoreId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf", + "name": "btn_register", + "persistentUuid": "dfc9eada-5314-4e7b-ba3c-fdde292f095b", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Small Blue Button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LabelText": "Register", + "PressedLabelOffsetY": 2 + } + }, + { + "assetStoreId": "90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0", + "name": "btn_settings", + "persistentUuid": "4ce8f8a6-d5f7-44d7-8681-c71ba077bf4b", + "type": "PanelSpriteButton::PanelSpriteButton", + "variant": "Tiny Blue Button", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LabelText": "Settings", + "PressedLabelOffsetY": 2 + } } ], "objectsFolderStructure": { @@ -743,75 +893,25 @@ "children": [ { "objectName": "spr_tempTitle" + }, + { + "objectName": "btn_login" + }, + { + "objectName": "btn_register" + }, + { + "objectName": "btn_settings" } ] }, "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Scene Start", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneJustBegins" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CenterWindow" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "SetWindowSize" - }, - "parameters": [ - "", - "768", - "432", - "" - ] - }, - { - "type": { - "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" - }, - "parameters": [ - "shp_fade", - "FlashTransitionPainter", - "\"0;0;0\"", - "1", - "\"Flash\"", - "\"Backward\"", - "255", - "" - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Functions" } ], "layers": [ @@ -940,25 +1040,6 @@ } ], "actions": [ - { - "type": { - "value": "CenterWindow" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "SetWindowSize" - }, - "parameters": [ - "", - "768", - "432", - "" - ] - }, { "type": { "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" @@ -974,29 +1055,6 @@ "" ] }, - { - "type": { - "value": "Wait" - }, - "parameters": [ - "3" - ] - }, - { - "type": { - "value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect" - }, - "parameters": [ - "shp_fade", - "FlashTransitionPainter", - "\"0;0;0\"", - "1", - "\"Flash\"", - "\"Forward\"", - "255", - "" - ] - }, { "type": { "value": "Wait" @@ -1004,16 +1062,6 @@ "parameters": [ "1" ] - }, - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Title\"", - "" - ] } ] } @@ -13152,6 +13200,4654 @@ } ], "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Labeled 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": "Resizeable button with a label.", + "version": "2.2.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, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The \"Validated\" state only last one frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldCheckHovering", + "True", + "" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "False", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "TouchId", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(TouchId, Object.Layer(), 0)", + "TouchY(TouchId, Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "StartedTouchOrMouseId(Index)" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Index", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "MouseIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "TouchIsInside", + "True", + "" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "TouchId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "TouchId", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TouchId" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "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", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "choices": [ + { + "label": "Idle", + "value": "Idle" + }, + { + "label": "Hovered", + "value": "Hovered" + }, + { + "label": "PressedInside", + "value": "PressedInside" + }, + { + "label": "PressedOutside", + "value": "PressedOutside" + }, + { + "label": "Validated", + "value": "Validated" + } + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "hidden": true, + "name": "Index" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "ShouldCheckHovering" + }, + { + "propertyName": "State" + }, + { + "propertyName": "TouchId" + }, + { + "propertyName": "TouchIsInside" + }, + { + "propertyName": "MouseIsInside" + }, + { + "propertyName": "Index" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover text style", + "helpPath": "", + "iconUrl": "", + "name": "TextStyleState", + "objectType": "TextObject::Text", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "IdleFontSize", + "=", + "Object.FontSize()" + ] + }, + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "HoverFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoverFontSize", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetFontSize" + }, + "parameters": [ + "Object", + "=", + "IdleFontSize" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableShadowOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ShowShadow" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldEnableOutlineOnHover", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::Text::SetOutlineEnabled" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.TextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._color.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::TextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Outline on hover", + "name": "ShouldEnableOutlineOnHover" + }, + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "Boolean", + "label": "Enable shadow on hover", + "name": "ShouldEnableShadowOnHover" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Hover font size", + "name": "HoverFontSize" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Idle font size", + "hidden": true, + "name": "IdleFontSize" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverFontSize" + }, + { + "propertyName": "IdleFontSize" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + }, + { + "propertyName": "ShouldEnableOutlineOnHover" + }, + { + "propertyName": "ShouldEnableShadowOnHover" + } + ] + } + }, + { + "description": "Change the text style when the button is hovered.", + "fullName": "Hover bitmap text style", + "helpPath": "", + "iconUrl": "", + "name": "BitmapTextStyleState", + "objectType": "BitmapText::BitmapTextObject", + "previewIconUrl": "", + "private": true, + "eventsFunctions": [ + { + "description": "Check if isHovered.", + "fullName": "IsHovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ isHovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if isHovered.", + "fullName": "IsHovered", + "functionType": "Action", + "name": "SetIsHovered", + "sentence": "_PARAM0_ isHovered: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleColor", + "=", + "Object.Behavior::Color()" + ] + }, + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "HoverColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "IdleText", + "=", + "Object.Text::Value()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "HoverPrefix + Object.Text::Value() + HoverSuffix" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "IsHovered", + "True", + "" + ] + }, + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "Value", + "False", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "IsHovered", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverColor", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BitmapText::SetTint" + }, + "parameters": [ + "Object", + "IdleColor" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverPrefix", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "HoverSuffix", + "!=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "IdleText" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsHovered", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the text color", + "fullName": "Text color", + "functionType": "StringExpression", + "name": "Color", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.BitmapTextRuntimeObject} */", + "const object = eventsFunctionContext.getObjects(\"Object\")[0];", + "", + "eventsFunctionContext.returnValue = object._tint.join(\";\");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "BitmapText::BitmapTextObject", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "IsHovered" + }, + { + "functionName": "SetIsHovered" + }, + { + "functionName": "Color" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Color", + "label": "Hover color", + "name": "HoverColor" + }, + { + "value": "", + "type": "String", + "label": "Hover prefix", + "name": "HoverPrefix" + }, + { + "value": "", + "type": "String", + "label": "Hover suffix", + "name": "HoverSuffix" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "String", + "label": "Idle text", + "hidden": true, + "name": "IdleText" + }, + { + "value": "", + "type": "Color", + "label": "Idle color", + "hidden": true, + "name": "IdleColor" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "IsHovered" + }, + { + "propertyName": "HoverPrefix" + }, + { + "propertyName": "HoverSuffix" + }, + { + "propertyName": "IdleText" + }, + { + "propertyName": "HoverColor" + }, + { + "propertyName": "IdleColor" + } + ] + } + } + ], + "eventsBasedObjects": [ + { + "areaMaxX": 256, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreTag": "menu buttons", + "defaultName": "Button", + "description": "Button with a label.", + "fullName": "Labeled button", + "helpPath": "", + "iconUrl": "", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "PanelSpriteButton", + "previewIconUrl": "", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" + } + ], + "content": { + "text": "Text", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "", + "textureAtlasResourceName": "", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "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": 1, + "height": 64, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 256, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "layer": "", + "name": "Label", + "persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226", + "width": 256, + "x": 0, + "y": 32, + "zOrder": 2, + "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": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + }, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Hovered", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Pressed", + "Resizable", + "Idle.Width()", + "Idle.Height()" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "Hovered", + "=", + "1" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "Pressed", + "=", + "1" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "LabelText" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Show" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectOpacityTween2" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"", + "0", + "\"linear\"", + "HoveredFadeOutDuration", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Hovered" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "OpacityCapability::OpacityBehavior::Value" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Show" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "HoveredFadeOutDuration", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "OpacityCapability::OpacityBehavior::SetValue" + }, + "parameters": [ + "Hovered", + "Opacity", + "=", + "255" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "PressedLabelOffsetY", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Show" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::TextStyleState::SetIsHovered" + }, + "parameters": [ + "Label", + "TextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered" + }, + "parameters": [ + "BitmapLabel", + "BitmapTextStyleState", + "yes", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Show" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Hide" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "private": true, + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "Value", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelText", + "name": "SetLabelTextOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Labels", + "Text", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the label text.", + "fullName": "Label text", + "functionType": "ExpressionAndCondition", + "name": "LabelText", + "sentence": "the label text", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Labels.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "BooleanVariable" + }, + "parameters": [ + "ShouldActivate", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the labelOffset of the object.", + "fullName": "LabelOffset", + "functionType": "ExpressionAndCondition", + "name": "LabelOffset", + "private": true, + "sentence": "the labelOffset", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "LabelOffset" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LabelOffset", + "name": "SetLabelOffset", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Labels", + "+", + "Value - LabelOffset" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "LabelOffset", + "=", + "Value" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "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": "", + "type": "MultilineString", + "label": "Label", + "name": "LabelText" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Hovered fade out duration", + "group": "States", + "name": "HoveredFadeOutDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Label offset on Y axis when pressed", + "group": "States", + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "group": "States", + "hidden": true, + "name": "LabelOffset" + }, + { + "value": "", + "type": "Choice", + "label": "", + "choices": [ + { + "label": "Label.Text=LabelText", + "value": "Label.Text=LabelText" + }, + { + "label": "BitmapLabel.Text=LabelText", + "value": "BitmapLabel.Text=LabelText" + } + ], + "hidden": true, + "name": "_PropertyMapping" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "LabelText" + }, + { + "propertyName": "_PropertyMapping" + }, + { + "folderName": "States", + "children": [ + { + "propertyName": "HoveredFadeOutDuration" + }, + { + "propertyName": "PressedLabelOffsetY" + }, + { + "propertyName": "LabelOffset" + } + ] + } + ] + }, + "variants": [ + { + "areaMaxX": 128, + "areaMaxY": 48, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf", + "assetStoreOriginalName": "Small Blue Button", + "name": "Small Blue Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 5, + "height": 32, + "leftMargin": 3, + "name": "Idle", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Idle.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 5, + "height": 32, + "leftMargin": 3, + "name": "Hovered", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Hovered.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 32, + "leftMargin": 3, + "name": "Pressed", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Pressed.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" + } + ], + "content": { + "text": "Button", + "opacity": 255, + "scale": 1, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "assets\\8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "assets\\8BitOperatorPlus8Regular_Edited.png", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "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": 1, + "height": 48, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 128, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 48, + "keepRatio": true, + "layer": "", + "name": "BitmapLabel", + "persistentUuid": "c3c3200d-dec4-4ac4-9dc5-4715d8989830", + "width": 128, + "x": 5, + "y": 26, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + }, + { + "areaMaxX": 68, + "areaMaxY": 28, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "assetStoreAssetId": "90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0", + "assetStoreOriginalName": "Tiny Blue Button", + "name": "Tiny Blue Button", + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "TextStyleState", + "type": "PanelSpriteButton::TextStyleState", + "ShouldEnableOutlineOnHover": false, + "HoverColor": "", + "ShouldEnableShadowOnHover": false, + "HoverFontSize": 0, + "IsHovered": false, + "IdleFontSize": 0, + "IdleColor": "" + } + ], + "string": "Text", + "font": "", + "textAlignment": "center", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + }, + "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": "Text", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "center", + "characterSize": 20, + "lineHeight": 0, + "color": "0;0;0" + } + }, + { + "assetStoreId": "", + "bottomMargin": 5, + "height": 32, + "leftMargin": 3, + "name": "Idle", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Idle.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 5, + "height": 32, + "leftMargin": 3, + "name": "Hovered", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Hovered.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 3, + "height": 32, + "leftMargin": 3, + "name": "Pressed", + "rightMargin": 3, + "texture": "assets\\Small Blue Button_Pressed.png", + "tiled": false, + "topMargin": 3, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "", + "name": "BitmapLabel", + "type": "BitmapText::BitmapTextObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 4, + "topEdgeAnchor": 4, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "BitmapTextStyleState", + "type": "PanelSpriteButton::BitmapTextStyleState", + "HoverColor": "", + "HoverPrefix": "", + "HoverSuffix": "", + "IsHovered": false, + "IdleText": "", + "IdleColor": "" + } + ], + "content": { + "text": "Button", + "opacity": 255, + "scale": 0.5, + "fontSize": 20, + "tint": "255;255;255", + "bitmapFontResourceName": "assets\\8BitOperatorPlus8Regular_Edited.fnt", + "textureAtlasResourceName": "assets\\8BitOperatorPlus8Regular_Edited.png", + "align": "center", + "verticalTextAlignment": "center" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "BitmapLabel" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + }, + "objectsGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + }, + { + "name": "Labels", + "objects": [ + { + "name": "Label" + }, + { + "name": "BitmapLabel" + } + ] + } + ], + "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": 1, + "height": 28, + "layer": "", + "name": "Idle", + "persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6", + "width": 68, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1.04, + "height": 28, + "layer": "", + "name": "BitmapLabel", + "persistentUuid": "c3c3200d-dec4-4ac4-9dc5-4715d8989830", + "width": 64, + "x": 5, + "y": 14, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "editionSettings": [] + } + ] + } + ] } ], "externalLayouts": [ diff --git a/WorldOfSolariaV1.json.autosave b/WorldOfSolariaV1.json.autosave index c7d561e..77a6ab6 100644 --- a/WorldOfSolariaV1.json.autosave +++ b/WorldOfSolariaV1.json.autosave @@ -1 +1 @@ -{"firstLayout":"","gdVersion":{"build":279,"major":5,"minor":6,"revision":0},"initialGDVersion":"5.6.279","properties":{"adaptGameResolutionAtRuntime":true,"antialiasingMode":"MSAA","antialisingEnabledOnMobile":false,"folderProject":false,"orientation":"landscape","packageName":"com.example.gamename","pixelsRounding":true,"projectUuid":"459bb859-e4c7-45fe-a4a8-13e8403e786f","scaleMode":"nearest","sizeOnStartupMode":"adaptWidth","templateSlug":"","version":"1.0.0","name":"WorldOfSolariaV1","description":"","author":"","windowWidth":768,"windowHeight":432,"latestCompilationDirectory":"","maxFPS":60,"minFPS":20,"verticalSync":false,"platformSpecificAssets":{"android-icon-144":"","android-icon-192":"","android-icon-36":"","android-icon-48":"","android-icon-72":"","android-icon-96":"","android-windowSplashScreenAnimatedIcon":"","desktop-icon-512":"","ios-icon-100":"","ios-icon-1024":"","ios-icon-114":"","ios-icon-120":"","ios-icon-144":"","ios-icon-152":"","ios-icon-167":"","ios-icon-180":"","ios-icon-20":"","ios-icon-29":"","ios-icon-40":"","ios-icon-50":"","ios-icon-57":"","ios-icon-58":"","ios-icon-60":"","ios-icon-72":"","ios-icon-76":"","ios-icon-80":"","ios-icon-87":""},"loadingScreen":{"backgroundColor":0,"backgroundFadeInDuration":0.2,"backgroundImageResourceName":"","gdevelopLogoStyle":"light","logoAndProgressFadeInDuration":0.2,"logoAndProgressLogoFadeInDelay":0.0,"minDuration":1.5,"progressBarColor":16777215,"progressBarHeight":20.0,"progressBarMaxWidth":200.0,"progressBarMinWidth":40.0,"progressBarWidthPercent":30.0,"showGDevelopSplash":true,"showProgressBar":true},"watermark":{"placement":"bottom-left","showWatermark":true},"authorIds":[],"authorUsernames":[],"categories":[],"playableDevices":[],"extensionProperties":[],"platforms":[{"name":"GDevelop JS platform"}],"currentPlatform":"GDevelop JS platform"},"resources":{"resources":[{"file":"assets/NewSprite.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"NewSprite","smoothed":false,"userAdded":false},{"file":"assets/tempLogo.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"tempLogo","smoothed":false,"userAdded":false},{"file":"assets/tempLogo.png","kind":"image","metadata":"","name":"assets/tempLogo.png","smoothed":false,"userAdded":false},{"file":"assets/tempLogo3.png","kind":"image","metadata":"","name":"assets/tempLogo3.png","smoothed":false,"userAdded":false},{"file":"assets/NewSprite2.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"NewSprite2","smoothed":false,"userAdded":false},{"file":"assets/tempTitle.png","kind":"image","metadata":"","name":"assets/tempTitle.png","smoothed":false,"userAdded":false}]},"objects":[{"assetStoreId":"","name":"shp_fade","persistentUuid":"7c029e6d-47df-4889-bb1b-6130d9888e56","type":"PrimitiveDrawing::Drawer","variables":[],"effects":[],"behaviors":[{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter","Progress":0.0,"Duration":0.0,"Type":"","Direction":"","MaxOpacity":255.0}],"fillOpacity":255.0,"outlineSize":1,"outlineOpacity":255.0,"absoluteCoordinates":false,"clearBetweenFrames":true,"antialiasing":"none","fillColor":{"r":255.0,"g":255.0,"b":255.0},"outlineColor":{"r":0.0,"g":0.0,"b":0.0}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Fade","children":[{"objectName":"shp_fade"}]}]},"objectsGroups":[],"variables":[{"name":"host","type":"string","value":""}],"layouts":[{"b":255,"disableInputWhenNotFocused":true,"mangledName":"Splash","name":"Splash","r":247,"standardSortMethod":true,"stopSoundsOnStartup":true,"title":"","v":249,"uiSettings":{"grid":true,"gridType":"rectangular","gridWidth":16.0,"gridHeight":16.0,"gridDepth":32.0,"gridOffsetX":0.0,"gridOffsetY":0.0,"gridOffsetZ":0.0,"gridColor":10401023.0,"gridAlpha":0.8,"snap":true,"zoomFactor":1.1726229638177635,"windowMask":false,"selectedLayer":"","gameEditorMode":"instances-editor"},"objectsGroups":[],"variables":[],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":224.0,"keepRatio":true,"layer":"","name":"spr_studioLogo","persistentUuid":"a65e3907-a834-4122-b84c-e184ed30d7a5","width":480.0,"x":144.0,"y":96.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"shp_fade","persistentUuid":"43c12b31-9f4a-4fd7-970e-a848140da139","width":0.0,"x":640.0,"y":0.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"spr_studioLogo","persistentUuid":"d8d7a523-1dfa-4cd4-9080-3d6c7deb792f","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"tempLogo","useMultipleDirections":false,"directions":[{"looping":false,"metadata":"{\"pskl\":{}}","timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"tempLogo","points":[],"originPoint":{"name":"origine","x":0.0,"y":0.0},"centerPoint":{"automatic":true,"name":"centre","x":0.0,"y":0.0},"customCollisionMask":[[{"x":0.0,"y":0.0},{"x":640.0,"y":0.0},{"x":640.0,"y":304.0},{"x":0.0,"y":304.0}]]}]}]}]}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Sprites","children":[{"objectName":"spr_studioLogo"}]}]},"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Scene Start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneJustBegins"},"parameters":[""]}],"actions":[{"type":{"value":"CenterWindow"},"parameters":[""]},{"type":{"value":"SetWindowSize"},"parameters":["","768","432",""]},{"type":{"value":"FlashTransitionPainter::FlashTransitionPainter::PaintEffect"},"parameters":["shp_fade","FlashTransitionPainter","\"0;0;0\"","1","\"Flash\"","\"Backward\"","255",""]},{"type":{"value":"Wait"},"parameters":["3"]},{"type":{"value":"FlashTransitionPainter::FlashTransitionPainter::PaintEffect"},"parameters":["shp_fade","FlashTransitionPainter","\"0;0;0\"","1","\"Flash\"","\"Forward\"","255",""]},{"type":{"value":"Wait"},"parameters":["1"]},{"type":{"value":"Scene"},"parameters":["","\"Title\"",""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Host Device","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SystemInfo::HasTouchScreen"},"parameters":[""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["host","=","\"touchscreen\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SystemInfo::IsNativeDesktopApp"},"parameters":[""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["host","=","\"desktop\""]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[{"effectType":"Scene3D::HemisphereLight","name":"3D Ambient Hemisphere Light","doubleParameters":{"elevation":40.0,"intensity":0.33,"rotation":300.0},"stringParameters":{"groundColor":"127;127;127","skyColor":"255;255;255","top":"Z+"},"booleanParameters":{}},{"effectType":"Scene3D::DirectionalLight","name":"3D Sun Light","doubleParameters":{"distanceFromCamera":1500.0,"elevation":40.0,"frustumSize":4000.0,"intensity":0.75,"minimumShadowBias":0.0,"rotation":300.0},"stringParameters":{"color":"255;255;255","shadowQuality":"medium","top":"Z+"},"booleanParameters":{"isCastingShadow":true}}]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"}]},{"b":255,"disableInputWhenNotFocused":true,"mangledName":"Title","name":"Title","r":247,"standardSortMethod":true,"stopSoundsOnStartup":true,"title":"","v":249,"uiSettings":{},"objectsGroups":[],"variables":[],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":432.0,"keepRatio":true,"layer":"","name":"spr_tempTitle","persistentUuid":"7c69ad43-c862-4f49-b2a0-f7aa2a009e17","width":768.0,"x":0.0,"y":0.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"shp_fade","persistentUuid":"b2376dc0-a75e-41fc-b571-46598d263229","width":0.0,"x":768.0,"y":0.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"spr_tempTitle","persistentUuid":"d772eb58-a6cd-4786-9454-1d305a42c932","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"assets/tempTitle.png","points":[],"originPoint":{"name":"origine","x":0.0,"y":0.0},"centerPoint":{"automatic":true,"name":"centre","x":0.0,"y":0.0},"customCollisionMask":[[{"x":0.0,"y":0.0},{"x":640.0,"y":0.0},{"x":640.0,"y":480.0},{"x":0.0,"y":480.0}]]}]}]}]}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"spr_tempTitle"}]},"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Scene Start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneJustBegins"},"parameters":[""]}],"actions":[{"type":{"value":"CenterWindow"},"parameters":[""]},{"type":{"value":"SetWindowSize"},"parameters":["","768","432",""]},{"type":{"value":"FlashTransitionPainter::FlashTransitionPainter::PaintEffect"},"parameters":["shp_fade","FlashTransitionPainter","\"0;0;0\"","1","\"Flash\"","\"Backward\"","255",""]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[{"effectType":"Scene3D::HemisphereLight","name":"3D Ambient Hemisphere Light","doubleParameters":{"elevation":40.0,"intensity":0.33,"rotation":300.0},"stringParameters":{"groundColor":"127;127;127","skyColor":"255;255;255","top":"Z+"},"booleanParameters":{}},{"effectType":"Scene3D::DirectionalLight","name":"3D Sun Light","doubleParameters":{"distanceFromCamera":1500.0,"elevation":40.0,"frustumSize":4000.0,"intensity":0.75,"minimumShadowBias":0.0,"rotation":300.0},"stringParameters":{"color":"255;255;255","shadowQuality":"medium","top":"Z+"},"booleanParameters":{"isCastingShadow":true}}]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"}]}],"externalEvents":[],"eventsFunctionsExtensions":[{"author":"Bouh","category":"Input","dimension":"","extensionNamespace":"","fullName":"Gamepads (controllers)","gdevelopVersion":">=5.5.222","helpPath":"/all-features/gamepad","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=","name":"Gamepads","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg","shortDescription":"Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.","version":"0.9.2","description":["Add support for gamepads (or other physical controllers).","","It gives access to:","- button presses,","- axis positions and force,","- trigger pressure,","- configurable deadzone,","- vibration,","- automatic \"gamepad mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the gamepad (it works by reading the gamepad state and simulating controls). No need for additional events to make it work once the behaviors are set up.","","The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))."],"origin":{"identifier":"Gamepads","name":"gdevelop-extension-store"},"tags":["controllers","gamepads","joysticks","axis","xbox","ps4","platformer","platform","top-down"],"authorIds":["2OwwM8ToR9dx9RJ2sAKTcrLmCB92","taRwmWxwAFYFL9yyBwB3cwBw0BO2","mnImQKdn8nQxwzkS5D6a1JB27V23","IWykYNRvhCZBN3vEgKEbBPOR3Oc2"],"dependencies":[],"globalVariables":[],"sceneVariables":[{"name":"Buttons","type":"structure","children":[{"name":"A or Cross","type":"string","value":"A"},{"name":"B or Circle","type":"string","value":"B"},{"name":"LB or L1","type":"string","value":"LB"},{"name":"LT or L2","type":"string","value":"LT"},{"name":"RB or R1","type":"string","value":"RB"},{"name":"RT or R2","type":"string","value":"RT"},{"name":"X or Square","type":"string","value":"X"},{"name":"Y or Triangle","type":"string","value":"Y"}]}],"eventsFunctions":[{"fullName":"","functionType":"Action","name":"onFirstSceneLoaded","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["if (gdjs._extensionController) {\r"," return;\r","}\r","\r","/**\r"," * Associate controller button ids to button names\r"," */\r","const controllerButtonNames = {\r"," \"XBOX\": {\r"," 0: \"A\",\r"," 1: \"B\",\r"," 2: \"X\",\r"," 3: \"Y\",\r"," 4: \"LB\",\r"," 5: \"RB\",\r"," 6: \"LT\",\r"," 7: \"RT\",\r"," 8: \"BACK\",\r"," 9: \"START\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"NONE\",\r"," 17: \"NONE\"\r"," },\r"," \"PS4\": {\r"," 0: \"CROSS\",\r"," 1: \"CIRCLE\",\r"," 2: \"SQUARE\",\r"," 3: \"TRIANGLE\",\r"," 4: \"L1\",\r"," 5: \"R1\",\r"," 6: \"L2\",\r"," 7: \"R2\",\r"," 8: \"SHARE\",\r"," 9: \"OPTIONS\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"PS_BUTTON\",\r"," 17: \"CLICK_TOUCHPAD\"\r"," }\r","};\r","\r","/**\r"," * @param {number} playerId\r"," */\r","function getGamepad(playerId) {\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," return gamepads[playerId];\r","}\r","\r","/** @type {{[playerId: number]: Player}} */\r","const players = {};\r","\r","/**\r"," * @param {number} playerId\r"," */\r","function getPlayer(playerId) {\r"," let player = players[playerId];\r"," if (!player) {\r"," player = new Player(playerId);\r"," players[playerId] = player;\r"," }\r"," return player;\r","}\r","\r","class Player {\r"," /** @type {number} */\r"," playerId;\r"," mapping = 'DEFAULT';\r"," lastButtonUsed = -1;\r"," deadzone = 0.2;\r"," /** @type {{[buttonId: number]: ButtonState}} */\r"," buttonStates = {};\r"," rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r","\r"," /**\r"," * @param {number} playerId\r"," */\r"," constructor(playerId) {\r"," this.playerId = playerId;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," getButtonState(buttonId) {\r"," let buttonState = this.buttonStates[buttonId];\r"," if (!buttonState) {\r"," buttonState = new ButtonState();\r"," this.buttonStates[buttonId] = buttonState;\r"," }\r"," return buttonState;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonPressed(buttonId) {\r"," return this.getButtonState(buttonId).isPressed;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonJustPressed(buttonId) {\r"," return this.getButtonState(buttonId).isJustPressed();\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonReleased(buttonId) {\r"," return this.getButtonState(buttonId).isReleased();\r"," }\r","\r"," isAnyButtonReleased() {\r"," for (const buttonId in this.buttonStates) {\r"," const buttonState = this.buttonStates[buttonId];\r"," if (buttonState.isReleased()) {\r"," return true;\r"," }\r"," }\r"," return false;\r"," }\r","\r"," isAnyButtonPressed() {\r"," for (const buttonId in this.buttonStates) {\r"," const buttonState = this.buttonStates[buttonId];\r"," if (buttonState.isPressed) {\r"," return true;\r"," }\r"," }\r"," return false;\r"," }\r","}\r","\r","class ButtonState {\r"," wasPressed = false;\r"," isPressed = false;\r","\r"," isReleased() {\r"," return this.wasPressed && !this.isPressed;\r"," }\r","\r"," isJustPressed() {\r"," return !this.wasPressed && this.isPressed;\r"," }\r","}\r","\r","// Async tasks are run before everything.\r","// This is a hack to make sure that button states are updated\r","// before mapping behavior events.\r","const frameBeginningTask = new class extends gdjs.AsyncTask {\r"," update() {\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," const gamepad = gamepads[playerId];\r"," if (gamepad == null) {\r"," // The gamepad is not connected.\r"," continue;\r"," }\r"," const player = getPlayer(playerId);\r","\r"," for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r"," const buttonState = player.getButtonState(buttonId);\r"," buttonState.wasPressed = buttonState.isPressed;\r"," buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r"," if (buttonState.isJustPressed()) {\r"," player.lastButtonUsed = buttonId;\r"," }\r"," }\r"," }\r"," return false;\r"," }\r","}();\r","\r","/**\r"," * @param {gdjs.RuntimeScene} runtimeScene\r"," */\r","function addFrameBeginningTaskIfNeeded(runtimeScene) {\r"," const taskManager = runtimeScene.getAsyncTasksManager();\r"," for (const taskWithCallback of taskManager.tasksWithCallback) {\r"," if (taskWithCallback.asyncTask === frameBeginningTask) {\r"," return;\r"," }\r"," }\r"," // Async tasks are run before everything.\r"," // This is a hack to make sure that button states are updated\r"," // before mapping behavior events.\r"," taskManager.addTask(frameBeginningTask);\r","}\r","\r","/**\r"," * @param {gdjs.RuntimeScene} runtimeScene\r"," */\r","function onScenePostEvents(runtimeScene) {\r"," addFrameBeginningTaskIfNeeded(runtimeScene);\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," let gamepad = gamepads[playerId];\r"," if (gamepad == null) {\r"," // The gamepad is not connected.\r"," continue;\r"," }\r"," const player = getPlayer(playerId);\r"," const rumble = player.rumble;\r"," rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r"," if (rumble.duration - rumble.elapsedTime <= 0 &&\r"," (rumble.weakMagnitude || rumble.strongMagnitude)\r"," ) {\r"," rumble.weakMagnitude = 0;\r"," rumble.strongMagnitude = 0;\r"," }\r"," }\r","}\r","\r","/**\r"," * @param {string} type\r"," * @param {number} buttonId\r"," */\r","function getInputString(type, buttonId) {\r"," if (!controllerButtonNames[type]) {\r"," return \"UNKNOWN_BUTTON\";\r"," }\r"," return controllerButtonNames[type][buttonId];\r","}\r","\r","function getButtonId(buttonName) {\r"," switch (buttonName) {\r"," case 'A':\r"," case 'CROSS':\r"," return 0;\r"," case 'B':\r"," case 'CIRCLE':\r"," return 1;\r"," case 'X':\r"," case 'SQUARE':\r"," return 2;\r"," case 'Y':\r"," case 'TRIANGLE':\r"," return 3;\r"," case 'LB':\r"," case 'L1':\r"," return 4;\r"," case 'RB':\r"," case 'R1':\r"," return 5;\r"," case 'LT':\r"," case 'L2':\r"," return 6;\r"," case 'RT':\r"," case 'R2':\r"," return 7;\r"," case 'UP':\r"," return 12;\r"," case 'DOWN':\r"," return 13;\r"," case 'LEFT':\r"," return 14;\r"," case 'RIGHT':\r"," return 15;\r"," case 'BACK':\r"," case 'SHARE':\r"," return 8;\r"," case 'START':\r"," case 'OPTIONS':\r"," return 9;\r"," case 'CLICK_STICK_LEFT':\r"," return 10;\r"," case 'CLICK_STICK_RIGHT':\r"," return 11;\r"," //PS4\r"," case 'PS_BUTTON':\r"," return 16;\r"," case 'CLICK_TOUCHPAD':\r"," return 17;\r"," default:\r"," console.error('The gamepad button: ' + buttonName + ' is not valid.');\r"," return null;\r"," }\r","}\r","\r","/**\r"," * @param {number} playerId\r"," * @param {string} directionName\r"," * @param {number} axisValueX\r"," * @param {number} axisValueY\r"," */\r","function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r"," switch (directionName) {\r"," case 'LEFT':\r"," return getNormalizedAxisValue(axisValueX, playerId) < 0;\r"," case 'RIGHT':\r"," return getNormalizedAxisValue(axisValueX, playerId) > 0;\r"," case 'UP':\r"," return getNormalizedAxisValue(axisValueY, playerId) < 0;\r"," case 'DOWN':\r"," return getNormalizedAxisValue(axisValueY, playerId) > 0;\r"," case 'ANY':\r"," return getNormalizedAxisValue(axisValueX, playerId) < 0\r"," || getNormalizedAxisValue(axisValueX, playerId) > 0\r"," || getNormalizedAxisValue(axisValueY, playerId) < 0\r"," || getNormalizedAxisValue(axisValueY, playerId) > 0\r"," default:\r"," console.error('The value stick direction is not valid.');\r"," return false;\r"," }\r","}\r","\r","/**\r"," * @param {number} deltaX\r"," * @param {number} deltaY\r"," */\r","function axisToAngle(deltaX, deltaY) {\r"," const rad = Math.atan2(deltaY, deltaX);\r"," const deg = rad * (180 / Math.PI);\r"," return deg;\r","}\r","\r","/**\r"," * @param {{id: string}} gamepad\r"," */\r","function isXbox(gamepad) {\r"," return (gamepad ? (\r"," gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r"," // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r"," // name reported in Firefox corresponding to the driver being used by the controller\r"," // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r"," ) : false);\r","}\r","\r","/**\r"," * Returns the new value taking into account the dead zone for the player_ID given\r"," * @param {number} value\r"," * @param {number} playerID\r"," */\r","function getNormalizedAxisValue(value, playerID) {\r"," // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r","\r"," // Anything smaller than this is assumed to be 0,0\r"," const deadzone = getPlayer(playerID).deadzone;\r","\r"," if (Math.abs(value) < deadzone) {\r"," return 0;\r"," } else {\r"," // We're outside the dead zone, but we'd like to smooth\r"," // this value out so it still runs nicely between 0..1.\r"," // That is, we don't want it to jump suddenly from 0 to\r"," // deadzone.\r","\r"," // Remap value from\r"," // deadzone..1 to 0..(1-deadzone)\r"," // or from\r"," // -1..-deadzone to -(1-deadzone)..0\r"," value = value - Math.sign(value) * deadzone;\r","\r"," // Remap value from\r"," // 0..(1-deadzone) to 0..1\r"," // or from\r"," // -(1-deadzone)..0 to -1..0\r"," return value / (1 - deadzone);\r"," }\r","}\r","\r","gdjs._extensionController = {\r"," getPlayer,\r"," controllerButtonNames,\r"," getInputString,\r"," getButtonId,\r"," axisToAngle,\r"," isXbox,\r"," getNormalizedAxisValue,\r"," isAxisPushed,\r"," getGamepad,\r"," onScenePostEvents,\r"," frameBeginningTask,\r"," addFrameBeginningTaskIfNeeded,\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onSceneLoaded","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":"gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);","parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"parameters":[],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onScenePostEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["gdjs._extensionController.onScenePostEvents(runtimeScene);",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"fullName":"Accelerated speed","functionType":"Expression","name":"AcceleratedSpeed","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","CurrentSpeed"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed","<","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Reduce the speed to match the stick force."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","TargetedSpeed"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","TargetedSpeed"]},{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","-","Acceleration * TimeDelta()"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Turn back at least as fast as it would stop."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed",">","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Reduce the speed to match the stick force."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","TargetedSpeed"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","TargetedSpeed"]},{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","+","Acceleration * TimeDelta()"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Turn back at least as fast as it would stop."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed","=","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(0, CurrentSpeed + Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(0, CurrentSpeed - Acceleration * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)"]}]}],"variables":[{"name":"AcceleratedSpeed","type":"number","value":0.0}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Current speed","name":"CurrentSpeed","type":"expression"},{"description":"Targeted speed","name":"TargetedSpeed","type":"expression"},{"description":"Max speed","name":"SpeedMax","type":"expression"},{"description":"Acceleration","name":"Acceleration","type":"expression"},{"description":"Deceleration","name":"Deceleration","type":"expression"}],"objectGroups":[]},{"description":"Get the value of the pressure on a gamepad trigger.","fullName":"Pressure on a gamepad trigger","functionType":"Expression","name":"TriggerPressure","sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r","\r","if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r"," console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","switch (trigger) {\r"," case 'LT':\r"," case 'L2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r"," break;\r","\r"," case 'RT':\r"," case 'R2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r"," break;\r","\r"," default:\r"," eventsFunctionContext.returnValue = -1;\r"," break;\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Trigger button","name":"Trigger","supplementaryInformation":"[\"LT\",\"RT\",\"L2\",\"R2\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"the force of gamepad stick (from 0 to 1).","fullName":"Stick force","functionType":"ExpressionAndCondition","name":"StickForce","sentence":"the gamepad _PARAM1_ _PARAM2_ stick force","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { getNormalizedAxisValue } = gdjs._extensionController;\r","\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r","\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","\r","eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r"," Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r"," Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Value of a stick rotation (deprecated)","functionType":"Expression","name":"StickRotationValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["Gamepads::StickAngle(PlayerId, Stick)"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Stick angle","functionType":"Expression","name":"StickAngle","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { getNormalizedAxisValue } = gdjs._extensionController;\r","\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r","\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","\r","eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r"," getNormalizedAxisValue(axisValueX, playerId),\r"," getNormalizedAxisValue(axisValueY, playerId));"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the value of axis of a gamepad stick.","fullName":"Value of a gamepad axis (deprecated)","functionType":"Expression","name":"AxisValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r"," console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","let parameterError = false;\r","switch (stick) {\r"," case 'LEFT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," default:\r"," break;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).","fullName":"Stick X force","functionType":"Expression","name":"StickForceX","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisIndex = stick === 'right' ? 2 : 0;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).","fullName":"Stick Y force","functionType":"Expression","name":"StickForceY","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisIndex = stick === 'right' ? 3 : 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button released","functionType":"Condition","name":"C_Button_released","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r","\r","let buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"Button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Check if a button was just pressed on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button just pressed","functionType":"Condition","name":"IsButtonJustPressed","sentence":"Button _PARAM2_ of gamepad _PARAM1_ was just pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r","\r","let buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"Button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the index of the last pressed button of a gamepad.","fullName":"Last pressed button (id)","functionType":"Expression","name":"LastButtonID","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Check if any button is pressed on a gamepad.","fullName":"Any gamepad button pressed","functionType":"Condition","name":"C_Any_Button_pressed","sentence":"Any button of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Last pressed button (string)","functionType":"StringExpression","name":"LastButtonString","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Controller type","name":"controller_type","supplementaryInformation":"[\"Xbox\",\"PS4\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of gamepads.","fullName":"Gamepad count","functionType":"Expression","name":"GamepadCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r","let lastGamepadIndex = -1;\r","for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," // Gamepads can be disconnected and become null\r"," if (gamepads[playerId]) {\r"," lastGamepadIndex = playerId\r"," }\r","}\r","eventsFunctionContext.returnValue = lastGamepadIndex + 1;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button pressed","functionType":"Condition","name":"C_Button_pressed","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r","\r","const buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.","fullName":"Gamepad deadzone for sticks","functionType":"Expression","name":"Deadzone","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.","fullName":"Set gamepad deadzone for sticks","functionType":"Action","name":"A_Set_deadzone","sentence":"Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r","\r","// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r","gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Deadzone for sticks, 0.2 by default (0 to 1)","name":"deadzone","type":"expression"}],"objectGroups":[]},{"description":"Check if a stick of a gamepad is pushed in a given direction.","fullName":"Gamepad stick pushed (axis)","functionType":"Condition","name":"C_Axis_pushed","sentence":"_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r"," console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of connected gamepads.","fullName":"Connected gamepads count","functionType":"Expression","name":"ConnectedGamepadsCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r","let connectedGamepadCount = 0;\r","for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," // Gamepads can be disconnected and become null\r"," if (gamepads[playerId]) {\r"," connectedGamepadCount++;\r"," }\r","}\r","eventsFunctionContext.returnValue = connectedGamepadCount;\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Return a string containing informations about the specified gamepad.","fullName":"Gamepad type","functionType":"StringExpression","name":"GamepadType","sentence":"Player _PARAM1_ use _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.","fullName":"Gamepad type","functionType":"Condition","name":"C_Controller_type","sentence":"Gamepad _PARAM1_ is a _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","if (controllerType == \"XBOX\") {"," eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);","} else {"," eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)","name":"controller_type","type":"string"}],"objectGroups":[]},{"description":"Check if a gamepad is connected.","fullName":"Gamepad connected","functionType":"Condition","name":"C_Controller_X_is_connected","sentence":"Gamepad _PARAM1_ is plugged and connected","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];","// If gamepad was disconnected it will be null (so this will return false)","// If gamepad was never connected it will be undefined (so this will return false)","eventsFunctionContext.returnValue = !!gamepads[playerId];"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.","fullName":"Gamepad vibration","functionType":"Action","name":"A_Vibrate_controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: 1.0,"," strongMagnitude: 1.0"," });","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"}],"objectGroups":[]},{"description":"Generate an advanced vibration on the specified controller. Incompatible with Firefox.","fullName":"Advanced gamepad vibration","functionType":"Action","name":"A_Advanced_Vibration_Controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { clamp } = gdjs.evtTools.common;","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);","const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","const player = gdjs._extensionController.getPlayer(playerId)","player.rumble.duration = duration;","player.rumble.elapsedTime = 0;","player.rumble.weakMagnitude = weakRumbleMagnitude;","player.rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"description":"Change a vibration on the specified controller. Incompatible with Firefox.","fullName":"Change gamepad active vibration","functionType":"Action","name":"A_Change_Vibration_Magnitude","sentence":"Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { clamp } = gdjs.evtTools.common;","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const player = gdjs._extensionController.getPlayer(playerId);","const elapsedTime = player.rumble.elapsedTime || 0;","const originalDuration = player.rumble.duration || 1;","const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);","const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","if (originalDuration - elapsedTime <= 0) return;","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: 1000 * (originalDuration - elapsedTime),"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","","player.rumble.weakMagnitude = weakRumbleMagnitude;","player.rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"description":"Check if any button is released on a gamepad.","fullName":"Any gamepad button released","functionType":"Condition","name":"C_any_button_released","sentence":"Any button of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isAnyButtonReleased();"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the weak vibration motor on the gamepad of a player.","fullName":"Weak rumble magnitude","functionType":"Expression","name":"WeakVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the strong vibration motor on the gamepad of a player.","fullName":"Strong rumble magnitude","functionType":"Expression","name":"StrongVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"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":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::PlatformerGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Platformer character behavior","extraInformation":["PlatformBehavior::PlatformerObjectBehavior"],"choices":[],"name":"PlatformerCharacter"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PlatformerCharacter"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"JumpButton"}]}]}},{"description":"Control a 3D physics character with a gamepad.","fullName":"3D platformer gamepad mapper","helpPath":"","iconUrl":"","name":"Platformer3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::StickForce"},"parameters":["",">","0","GamepadIdentifier","JoystickIdentifier",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SetForwardAngle"},"parameters":["Object","PhysicsCharacter3D","=","Gamepads::StickAngle(GamepadIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())"]},{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateStick"},"parameters":["Object","PhysicsCharacter3D","-90","Gamepads::StickForce(GamepadIdentifier, JoystickIdentifier)"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateJumpKey"},"parameters":["Object","PhysicsCharacter3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::Platformer3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics character","extraInformation":["Physics3D::PhysicsCharacter3D"],"choices":[],"name":"PhysicsCharacter3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Left","type":"Choice","label":"Walk joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"JoystickIdentifier"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCharacter3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"JoystickIdentifier"},{"propertyName":"JumpButton"}]}]}},{"description":"Control a 3D physics character with a gamepad.","fullName":"3D shooter gamepad mapper","helpPath":"","iconUrl":"","name":"Shooter3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::StickForce"},"parameters":["",">","0","GamepadIdentifier","WalkStick",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateStick"},"parameters":["Object","PhysicsCharacter3D","Gamepads::StickAngle(GamepadIdentifier, WalkStick)","Gamepads::StickForce(GamepadIdentifier, WalkStick)"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateJumpKey"},"parameters":["Object","PhysicsCharacter3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::Shooter3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics character","extraInformation":["Physics3D::PhysicsCharacter3D"],"choices":[],"name":"PhysicsCharacter3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Left","type":"Choice","label":"Walk joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"WalkStick"},{"value":"Right","type":"Choice","label":"Camera joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"CameraStick"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCharacter3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"WalkStick"},{"propertyName":"CameraStick"},{"propertyName":"JumpButton"}]}]}},{"description":"Control camera rotations with a gamepad.","fullName":"First person camera gamepad mapper","helpPath":"","iconUrl":"","name":"FirstPersonGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"TODO It's probably a bad idea to rotate the object around Y."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentRotationSpeedZ","=","Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)"]},{"type":{"value":"SetAngle"},"parameters":["Object","+","CurrentRotationSpeedZ * TimeDelta()"]},{"type":{"value":"SetNumberVariable"},"parameters":["CurrentRotationSpeedY","=","Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)"]},{"type":{"value":"Scene3D::Base3DBehavior::SetRotationY"},"parameters":["Object","Object3D","+","CurrentRotationSpeedY * TimeDelta()"]},{"type":{"value":"Scene3D::Base3DBehavior::SetRotationY"},"parameters":["Object","Object3D","=","clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)"]},{"type":{"value":"Gamepads::FirstPersonGamepadMapper::LookFromObjectEyes"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.","fullName":"Look through object eyes","functionType":"Action","group":"Layers and cameras","name":"LookFromObjectEyes","private":true,"sentence":"Move the camera to look though _PARAM0_ eyes","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"CenterCameraOnObject"},"parameters":["","Object","","Object.Layer()",""]},{"type":{"value":"Scene3D::SetCameraZ"},"parameters":["","=","Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ","",""]},{"type":{"value":"Scene3D::SetCameraRotationX"},"parameters":["","=","- Object.Object3D::RotationY() + 90","GetArgumentAsString(\"Layer\")",""]},{"type":{"value":"Scene3D::SetCameraRotationY"},"parameters":["","=","Object.Object3D::RotationX()","GetArgumentAsString(\"Layer\")",""]},{"type":{"value":"SetCameraAngle"},"parameters":["","=","Object.Angle() + 90","Object.Layer()",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum horizontal rotation speed of the object.","fullName":"Maximum horizontal rotation speed","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationSpeedMax","sentence":"the maximum horizontal rotation speed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationSpeedMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationSpeedMax","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationSpeedMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationSpeedMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the horizontal rotation acceleration of the object.","fullName":"Horizontal rotation acceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationAcceleration","sentence":"the horizontal rotation acceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationAcceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationAcceleration","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationAcceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationAcceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the horizontal rotation deceleration of the object.","fullName":"Horizontal rotation deceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationDeceleration","sentence":"the horizontal rotation deceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationDeceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationDeceleration","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationDeceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationDeceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum vertical rotation speed of the object.","fullName":"Maximum vertical rotation speed","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationSpeedMax","sentence":"the maximum vertical rotation speed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationSpeedMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationSpeedMax","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationSpeedMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationSpeedMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the vertical rotation acceleration of the object.","fullName":"Vertical rotation acceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationAcceleration","sentence":"the vertical rotation acceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationAcceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationAcceleration","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationAcceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationAcceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the vertical rotation deceleration of the object.","fullName":"Vertical rotation deceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationDeceleration","sentence":"the vertical rotation deceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationDeceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationDeceleration","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationDeceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationDeceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the minimum vertical camera angle of the object.","fullName":"Minimum vertical camera angle","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalAngleMin","sentence":"the minimum vertical camera angle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalAngleMin"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalAngleMin","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalAngleMin","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalAngleMin","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum vertical camera angle of the object.","fullName":"Maximum vertical camera angle","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalAngleMax","sentence":"the maximum vertical camera angle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalAngleMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalAngleMax","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalAngleMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalAngleMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the z position offset of the object.","fullName":"Z position offset","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper position configuration","name":"OffsetZ","sentence":"the z position offset","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["OffsetZ"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetZ","group":"First person camera gamepad mapper position configuration","name":"SetOffsetZ","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OffsetZ","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"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":"","type":"Behavior","label":"3D capability","extraInformation":["Scene3D::Base3DBehavior"],"choices":[],"name":"Object3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Right","type":"Choice","label":"Camera joystick","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"CameraStick"},{"value":"180","type":"Number","unit":"AngularSpeed","label":"Maximum rotation speed","group":"Horizontal rotation","name":"HorizontalRotationSpeedMax"},{"value":"360","type":"Number","label":"Rotation acceleration","group":"Horizontal rotation","name":"HorizontalRotationAcceleration"},{"value":"720","type":"Number","label":"Rotation deceleration","group":"Horizontal rotation","name":"HorizontalRotationDeceleration"},{"value":"120","type":"Number","unit":"AngularSpeed","label":"Maximum rotation speed","group":"Vertical rotation","name":"VerticalRotationSpeedMax"},{"value":"240","type":"Number","label":"Rotation acceleration","group":"Vertical rotation","name":"VerticalRotationAcceleration"},{"value":"480","type":"Number","label":"Rotation deceleration","group":"Vertical rotation","name":"VerticalRotationDeceleration"},{"value":"-90","type":"Number","unit":"DegreeAngle","label":"Minimum angle","group":"Vertical rotation","name":"VerticalAngleMin"},{"value":"90","type":"Number","unit":"DegreeAngle","label":"Maximum angle","group":"Vertical rotation","name":"VerticalAngleMax"},{"value":"0","type":"Number","unit":"Pixel","label":"Z position offset","group":"Position","name":"OffsetZ"},{"value":"0","type":"Number","unit":"AngularSpeed","label":"Current rotation speed Z","hidden":true,"name":"CurrentRotationSpeedZ"},{"value":"0","type":"Number","unit":"AngularSpeed","label":"Current rotation speed Y","hidden":true,"name":"CurrentRotationSpeedY"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"Object3D"},{"propertyName":"GamepadIdentifier"},{"propertyName":"CameraStick"},{"folderName":"Horizontal rotation","children":[{"propertyName":"HorizontalRotationSpeedMax"},{"propertyName":"HorizontalRotationAcceleration"},{"propertyName":"HorizontalRotationDeceleration"}]},{"folderName":"Vertical rotation","children":[{"propertyName":"VerticalRotationSpeedMax"},{"propertyName":"VerticalRotationAcceleration"},{"propertyName":"VerticalRotationDeceleration"},{"propertyName":"VerticalAngleMin"},{"propertyName":"VerticalAngleMax"}]},{"folderName":"Position","children":[{"propertyName":"OffsetZ"}]},{"propertyName":"CurrentRotationSpeedZ"},{"propertyName":"CurrentRotationSpeedY"}]}},{"description":"Control a 3D physics car with a gamepad.","fullName":"3D car gamepad mapper","helpPath":"","iconUrl":"","name":"PhysicsCar3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateLeftKey"},"parameters":["Object","PhysicsCar3D"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateRightKey"},"parameters":["Object","PhysicsCar3D"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","1","\"Left\"","\"Any\"",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateSteeringStick"},"parameters":["Object","PhysicsCar3D","Gamepads::StickForceX(GamepadIdentifier, \"Left\")"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","1","\"Right\"","\"Any\"",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateSteeringStick"},"parameters":["Object","PhysicsCar3D","Gamepads::StickForceX(GamepadIdentifier, \"Right\")"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"LT\"","\"Up\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"RT\"","\"Up\""]}]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateAcceleratorStick"},"parameters":["Object","PhysicsCar3D","Gamepads::TriggerPressure(GamepadIdentifier, \"RT\") - Gamepads::TriggerPressure(GamepadIdentifier, \"LT\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[HandBrakeButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateHandBrakeKey"},"parameters":["Object","PhysicsCar3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::PhysicsCar3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics car","extraInformation":["Physics3D::PhysicsCar3D"],"choices":[],"name":"PhysicsCar3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"B or Circle","type":"Choice","label":"Hand brake button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"HandBrakeButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCar3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"HandBrakeButton"}]}]}},{"description":"Control a top-down character with a gamepad.","fullName":"Top-down gamepad mapper","helpPath":"","iconUrl":"","name":"TopDownGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")","Gamepads::StickForce(GamepadIdentifier, \"Left\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")","sign(Gamepads::StickForce(GamepadIdentifier, \"Left\"))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Right\")","Gamepads::StickForce(GamepadIdentifier, \"Right\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","sign(Gamepads::StickForce(GamepadIdentifier, \"Right\"))","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::TopDownGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Top-down movement behavior","extraInformation":["TopDownMovementBehavior::TopDownMovementBehavior"],"choices":[],"name":"TopDownMovement"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"Analog","type":"Choice","label":"Stick mode","group":"Controls","choices":[{"label":"Analog","value":"Analog"},{"label":"360°","value":"360°"},{"label":"8 Directions","value":"8 Directions"}],"name":"StickMode"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"TopDownMovement"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"StickMode"}]}]}}],"eventsBasedObjects":[]},{"author":"","category":"Camera","dimension":"2D","extensionNamespace":"","fullName":"Smooth Camera","gdevelopVersion":">=5.5.222","helpPath":"/tutorials/follow-player-with-camera/","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=","name":"SmoothCamera","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg","shortDescription":"Smoothly scroll to follow an object.","version":"0.4.5","description":["The camera follows an object according to:","- a frame rate independent catch-up speed to make the scrolling from smooth to strong","- a maximum speed to do linear following ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) or slow down the camera when teleporting the object","- a follow-free zone to avoid scrolling on small movements","- an offset to see further in one direction","- an extra delay and catch-up speed to give an impression of speed (useful for dash)","- position forecasting and delay to simulate a cameraman response time","","A platformer dedicated behavior allows to switch of settings when the character is in air or on the floor. This can be used to stabilize the camera when jumping."],"origin":{"identifier":"SmoothCamera","name":"gdevelop-extension-store"},"tags":["camera","scrolling","follow","smooth","platformer","platform"],"authorIds":["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"],"dependencies":[],"globalVariables":[],"sceneVariables":[],"eventsFunctions":[],"eventsFunctionsFolderStructure":{"folderName":"__ROOT"},"eventsBasedBehaviors":[{"description":"Smoothly scroll to follow an object.","fullName":"Smooth Camera","helpPath":"","iconUrl":"","name":"SmoothCamera","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Update private properties through setters to check their values and initialize state."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetLeftwardSpeed"},"parameters":["Object","Behavior","LeftwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetRightwardSpeed"},"parameters":["Object","Behavior","RightwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","Behavior","UpwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","Behavior","DownwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetLeftwardSpeedMax"},"parameters":["Object","Behavior","LeftwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetRightwardSpeedMax"},"parameters":["Object","Behavior","RightwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","Behavior","UpwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","Behavior","DownwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaLeft"},"parameters":["Object","Behavior","FollowFreeAreaLeft","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaRight"},"parameters":["Object","Behavior","FollowFreeAreaRight","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","Behavior","FollowFreeAreaTop","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","Behavior","FollowFreeAreaBottom","log(1 - )"]},{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelay","=","CameraDelay"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BooleanVariable"},"parameters":["IsCalledManually","True",""]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::DoMoveCameraCloser"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera closer to the object. This action must be called after the object has moved for the frame.","fullName":"Move the camera closer","functionType":"Action","name":"MoveCameraCloser","sentence":"Move the camera closer to _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsCalledManually","True",""]},{"type":{"value":"SmoothCamera::SmoothCamera::DoMoveCameraCloser"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera closer to the object.","fullName":"Do move the camera closer","functionType":"Action","name":"DoMoveCameraCloser","private":true,"sentence":"Do move the camera closer _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::UpdateDelayedPosition"},"parameters":["Object","Behavior",""]},{"type":{"value":"SmoothCamera::SmoothCamera::UpdateForecastedPosition"},"parameters":["Object","Behavior",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["FollowOnX","True",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OldX","=","CameraX(Object.Layer(), 0)"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["",">","Object.Behavior::FreeAreaRight()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * LogLeftwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["","<","OldX - LeftwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","OldX - LeftwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["","<","Object.Behavior::FreeAreaLeft()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * LogRightwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["",">","OldX + RightwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","OldX + RightwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["FollowOnY","True",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OldY","=","CameraY(Object.Layer(), 0)"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["",">","Object.Behavior::FreeAreaBottom()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * LogUpwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["","<","OldY - UpwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","OldY - UpwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["","<","Object.Behavior::FreeAreaTop()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * LogDownwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["",">","OldY + DownwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","OldY + DownwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Delay the camera according to a maximum speed and catch up the delay.","fullName":"Wait and catch up","functionType":"Action","name":"WaitAndCatchUp","sentence":"Delay the camera of _PARAM0_ during: _PARAM2_ seconds according to the maximum speed _PARAM3_;_PARAM4_ seconds and catch up in _PARAM5_ seconds","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Maybe the catch-up show be done in constant pixel speed instead of constant time speed."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["WaitingEnd","=","TimeFromStart() + NewWaitingDuration"]},{"type":{"value":"SetNumberVariable"},"parameters":["WaitingSpeedXMax","=","NewWaitingSpeedXMax"]},{"type":{"value":"SetNumberVariable"},"parameters":["WaitingSpeedYMax","=","NewWaitingSpeedYMax"]},{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelayCatchUpDuration","=","NewCatchUpDuration"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Wait and catch up\"","\"info\"","\"SmoothCamera\""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Waiting duration (in seconds)","name":"NewWaitingDuration","type":"expression"},{"description":"Waiting maximum camera target speed X","name":"NewWaitingSpeedXMax","type":"expression"},{"description":"Waiting maximum camera target speed Y","name":"NewWaitingSpeedYMax","type":"expression"},{"description":"Catch up duration (in seconds)","name":"NewCatchUpDuration","type":"expression"}],"objectGroups":[]},{"description":"Draw the targeted and actual camera position.","fullName":"Draw debug","functionType":"Action","name":"DrawDebug","sentence":"Draw targeted and actual camera position for _PARAM0_ on _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["ShapePainter","=","0"]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Path used by the forecasting","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]},{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"245;166;35\""]},{"type":{"value":"PrimitiveDrawing::BeginFillPath"},"parameters":["ShapePainter","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[0])"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::PathLineTo"},"parameters":["ShapePainter","Object.Variable(__SmoothCamera.ForecastHistoryX[Index])","Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::EndFillPath"},"parameters":["ShapePainter"]}]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Follow-free area.","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaLeft","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaRight","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaTop","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaBottom","!=","0"]}]}],"actions":[{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"126;211;33\""]},{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["ShapePainter","Object.Behavior::FreeAreaLeft() - 1","Object.Behavior::FreeAreaTop() - 1","Object.Behavior::FreeAreaRight() + 1","Object.Behavior::FreeAreaBottom() + 1"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Linear regression vector used by the forecasting.","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"208;2;27\""]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","ProjectedOldestX","ProjectedOldestY","ProjectedNewestX","ProjectedNewestY","1"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Targeted and actual camera position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::Circle"},"parameters":["ShapePainter","ForecastedX","ForecastedY","3"]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","CameraX(Object.Layer(), 0)","CameraY(Object.Layer(), 0) - 4","CameraX(Object.Layer(), 0)","CameraY(Object.Layer(), 0) + 4","1"]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","CameraX(Object.Layer(), 0) - 4","CameraY(Object.Layer(), 0)","CameraX(Object.Layer(), 0) + 4","CameraY(Object.Layer(), 0)","1"]}]}],"parameters":[]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Shape painter","name":"ShapePainter","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"objectList"}],"objectGroups":[]},{"description":"Enable or disable the following on X axis.","fullName":"Follow on X","functionType":"Action","group":"Camera configuration","name":"SetFollowOnX","sentence":"The camera follows _PARAM0_ on X axis: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnX","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnX","True",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow on X axis","name":"Value","type":"yesorno"}],"objectGroups":[]},{"description":"Enable or disable the following on Y axis.","fullName":"Follow on Y","functionType":"Action","group":"Camera configuration","name":"SetFollowOnY","sentence":"The camera follows _PARAM0_ on Y axis: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnY","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnY","True",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow on Y axis","name":"Value","type":"yesorno"}],"objectGroups":[]},{"description":"Change the camera follow free area right border.","fullName":"Follow free area right border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaRight","sentence":"Change the camera follow free area right border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaRight","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area right border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area left border.","fullName":"Follow free area left border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaLeft","sentence":"Change the camera follow free area left border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaLeft","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area left border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area top border.","fullName":"Follow free area top border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaTop","sentence":"Change the camera follow free area top border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaTop","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area top border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area bottom border.","fullName":"Follow free area bottom border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaBottom","sentence":"Change the camera follow free area bottom border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaBottom","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area bottom border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera leftward maximum speed (in pixels per second).","fullName":"Leftward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetLeftwardSpeedMax","sentence":"Change the camera leftward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["LeftwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Leftward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera rightward maximum speed (in pixels per second).","fullName":"Rightward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetRightwardSpeedMax","sentence":"Change the camera rightward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["RightwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Rightward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera upward maximum speed (in pixels per second).","fullName":"Upward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetUpwardSpeedMax","sentence":"Change the camera upward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["UpwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Upward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera downward maximum speed (in pixels per second).","fullName":"Downward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetDownwardSpeedMax","sentence":"Change the camera downward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DownwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Downward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera leftward catch-up speed (in ratio per second).","fullName":"Leftward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetLeftwardSpeed","sentence":"Change the camera leftward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["LeftwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogLeftwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Leftward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera rightward catch-up speed (in ratio per second).","fullName":"Rightward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetRightwardSpeed","sentence":"Change the camera rightward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["RightwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogRightwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Rightward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera downward catch-up speed (in ratio per second).","fullName":"Downward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetDownwardSpeed","sentence":"Change the camera downward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DownwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogDownwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Downward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera upward catch-up speed (in ratio per second).","fullName":"Upward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetUpwardSpeed","sentence":"Change the camera upward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["UpwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogUpwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Upward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"the camera offset on X axis of the object. This is not the current difference between the object and the camera position.","fullName":"Camera offset X","functionType":"ExpressionAndCondition","group":"Camera configuration","name":"OffsetX","sentence":"the camera offset on X axis","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraOffsetX"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetX","group":"Camera configuration","name":"SetOffsetXOp","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraOffsetX","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Change the camera offset on X axis of an object.","fullName":"Camera Offset X","functionType":"Action","group":"Camera configuration","name":"SetOffsetX","private":true,"sentence":"Change the camera offset on X axis of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Deprecated use SetOffsetXOp instead."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetOffsetXOp"},"parameters":["Object","Behavior","=","Value",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera offset X","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"the camera offset on Y axis of the object. This is not the current difference between the object and the camera position.","fullName":"Camera offset Y","functionType":"ExpressionAndCondition","group":"Camera configuration","name":"OffsetY","sentence":"the camera offset on Y axis","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraOffsetY"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetY","group":"Camera configuration","name":"SetOffsetYOp","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraOffsetY","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Change the camera offset on Y axis of an object.","fullName":"Camera Offset Y","functionType":"Action","group":"Camera configuration","name":"SetOffsetY","private":true,"sentence":"Change the camera offset on Y axis of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Deprecated use SetOffsetYOp instead."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetOffsetYOp"},"parameters":["Object","Behavior","=","CameraOffsetY",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera offset Y","name":"CameraOffsetY","type":"expression"}],"objectGroups":[]},{"description":"Change the camera forecast time (in seconds).","fullName":"Forecast time","functionType":"Action","group":"Camera configuration","name":"SetForecastTime","sentence":"Change the camera forecast time of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastTime","=","min(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Forecast time","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera delay (in seconds).","fullName":"Camera delay","functionType":"Action","group":"Camera configuration","name":"SetCameraDelay","sentence":"Change the camera delay of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelay","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera delay","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Return follow free area left border X.","fullName":"Free area left","functionType":"Expression","group":"Private","name":"FreeAreaLeft","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedX + CameraOffsetX - FollowFreeAreaLeft"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area right border X.","fullName":"Free area right","functionType":"Expression","group":"Private","name":"FreeAreaRight","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedX + CameraOffsetX + FollowFreeAreaRight"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area bottom border Y.","fullName":"Free area bottom","functionType":"Expression","group":"Private","name":"FreeAreaBottom","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedY + CameraOffsetY + FollowFreeAreaBottom"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area top border Y.","fullName":"Free area top","functionType":"Expression","group":"Private","name":"FreeAreaTop","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedY + CameraOffsetY - FollowFreeAreaTop"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Update delayed position and delayed history. This is called in doStepPreEvents.","fullName":"Update delayed position","functionType":"Action","group":"Private","name":"UpdateDelayedPosition","private":true,"sentence":"Update delayed position and delayed history of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)","=","0"]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectTime","TimeFromStart()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectX","DelayedCenterX"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectY","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Use the object center when no delay is asked."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","Object.CenterX()"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","Object.CenterY()"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::AddForecastHistoryPosition"},"parameters":["Object","Behavior","TimeFromStart()","Object.CenterX()","Object.CenterY()",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]},{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectTime","TimeFromStart()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectX","Object.CenterX()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectY","Object.CenterY()"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting."},{"infiniteLoopWarning":true,"type":"BuiltinCommonInstructions::While","whileConditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)",">=","2"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ObjectTime[1]","<","TimeFromStart() - Object.Behavior::CurrentDelay()"]}],"conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::AddForecastHistoryPosition"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ObjectTime[0])","Object.Variable(__SmoothCamera.ObjectX[0])","Object.Variable(__SmoothCamera.ObjectY[0])",""]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectTime","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectX","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectY","0"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Don't move the camera if there is not enough history."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","Object.Variable(__SmoothCamera.ObjectX[0])"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","Object.Variable(__SmoothCamera.ObjectY[0])"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)",">=","2"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ObjectTime[0]","<","TimeFromStart() - Object.Behavior::CurrentDelay()"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraExtraDelay","+","max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Extra delay: \" + ToString(CameraExtraDelay)","\"info\"","\"SmoothCamera\""]}]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The time with delay is now between the first 2 indexes"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]},{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectTime"]},{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectX"]},{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectY"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelayCatchUpSpeed","=","CameraExtraDelay / CameraDelayCatchUpDuration"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Start to catch up\"","\"info\"","\"SmoothCamera\""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"NumberVariable"},"parameters":["CameraExtraDelay",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraExtraDelay","=","max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Catching up delay: \" + ToString(CameraExtraDelay)","\"info\"","\"SmoothCamera\""]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Check if the camera following target is delayed from the object.","fullName":"Camera is delayed","functionType":"Condition","name":"IsDelayed","private":true,"sentence":"The camera of _PARAM0_ is delayed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.Behavior::CurrentDelay()",">","0"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return the current camera delay.","fullName":"Current delay","functionType":"Expression","name":"CurrentDelay","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraDelay + CameraExtraDelay"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Check if the camera following is waiting at a reduced speed.","fullName":"Camera is waiting","functionType":"Condition","name":"IsWaiting","private":true,"sentence":"The camera of _PARAM0_ is waiting","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["WaitingEnd",">","TimeFromStart()"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Add a position to the history for forecasting. This is called 2 times in UpadteDelayedPosition.","fullName":"Add forecast history position","functionType":"Action","group":"Private","name":"AddForecastHistoryPosition","private":true,"sentence":"Add the time:_PARAM2_ and position: _PARAM3_; _PARAM4_ to the forecast history of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["ForecastHistoryDuration",">","0"]},{"type":{"value":"NumberVariable"},"parameters":["ForecastTime",">","0"]}]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime","Time"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryX","ObjectX"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryY","ObjectY"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions."},{"infiniteLoopWarning":true,"type":"BuiltinCommonInstructions::While","whileConditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">=","3"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime[0]","<","TimeFromStart() - CameraDelay - CameraExtraDelay - ForecastHistoryDuration"]}],"conditions":[],"actions":[{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryX","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryY","0"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Time","name":"Time","type":"expression"},{"description":"Object X","name":"ObjectX","type":"expression"},{"description":"Object Y","name":"ObjectY","type":"expression"}],"objectGroups":[]},{"description":"Update forecasted position. This is called in doStepPreEvents.","fullName":"Update forecasted position","functionType":"Action","group":"Private","name":"UpdateForecastedPosition","private":true,"sentence":"Update forecasted position of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","DelayedCenterX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">=","2"]},{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["ForecastHistoryDuration",">","0"]},{"type":{"value":"NumberVariable"},"parameters":["ForecastTime",">","0"]}]}],"actions":[],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Mean X","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","+","Object.Variable(__SmoothCamera.ForecastHistoryX[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","/","Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Mean Y","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","+","Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","/","Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Mean: \" + ToString(ForecastHistoryMeanX) + \" \" + ToString(ForecastHistoryMeanY)","",""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Variance and Covariance","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceX","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceY","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryCovariance","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceX","+","pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceY","+","pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryCovariance","+","(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Variances: \" + ToString(ForecastHistoryVarianceX) + \" \" + ToString(ForecastHistoryVarianceY) + \" \" + ToString(ForecastHistoryCovariance)","\"info\"","\"SmoothCamera\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)","<","1"]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceY)","<","1"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","DelayedCenterX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)",">=","1"]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceY)",">=","1"]}]}],"actions":[],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Linear function parameters","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)",">=","abs(ForecastHistoryVarianceY)"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearA","=","ForecastHistoryCovariance / ForecastHistoryVarianceX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearB","=","ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)","\"info\"","\"SmoothCamera\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Projection","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::ProjectHistoryEnds"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[0])","Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])","Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])",""]}]}],"parameters":[]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Axis permutation to avoid a ratio between 2 numbers near 0."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)","<","abs(ForecastHistoryVarianceY)"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearA","=","ForecastHistoryCovariance / ForecastHistoryVarianceY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearB","=","ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)","\"info\"","\"SmoothCamera\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Projection","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::ProjectHistoryEnds"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ForecastHistoryY[0])","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])","Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Permute back axis"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","ProjectedOldestX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestX","=","ProjectedOldestY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestY","=","Index"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","ProjectedNewestX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestX","=","ProjectedNewestY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestY","=","Index"]}]}],"parameters":[]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Oldest: \" + ToString(ProjectedOldestX) + \" \" + ToString(ProjectedOldestY)","\"info\"","\"SmoothCamera\""]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Newest: \" + ToString(ProjectedNewestX) + \" \" + ToString(ProjectedNewestY)","\"info\"","\"SmoothCamera\""]}]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Forecasted position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Forecasted: \" + ToString(ForecastedX) + \" \" + ToString(ForecastedY)","\"info\"","\"SmoothCamera\""]}]}],"parameters":[]}],"parameters":[]}]}],"parameters":[]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Project history ends position to have the vector on the line from linear regression. This function is only called by UpdateForecastedPosition.","fullName":"Project history ends","functionType":"Action","group":"Private","name":"ProjectHistoryEnds","private":true,"sentence":"Project history oldest: _PARAM2_;_PARAM3_ and newest position: _PARAM4_;_PARAM5_ of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestX","=","(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestY","=","NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestX","=","(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestY","=","OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"OldestX","name":"OldestX","type":"expression"},{"description":"OldestY","name":"OldestY","type":"expression"},{"description":"Newest X","name":"NewestX","type":"expression"},{"description":"Newest Y","name":"NewestY","type":"expression"}],"objectGroups":[]},{"description":"Return the ratio between forecast time and the duration of the history. This function is only called by UpdateForecastedPosition.","fullName":"Forecast time ratio","functionType":"Expression","group":"Private","name":"ForecastTimeRatio","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["- ForecastTime / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"onCreated"},{"functionName":"doStepPreEvents"},{"functionName":"MoveCameraCloser"},{"functionName":"DoMoveCameraCloser"},{"functionName":"WaitAndCatchUp"},{"functionName":"DrawDebug"},{"folderName":"Camera configuration","children":[{"functionName":"SetFollowOnX"},{"functionName":"SetFollowOnY"},{"functionName":"SetFollowFreeAreaRight"},{"functionName":"SetFollowFreeAreaLeft"},{"functionName":"SetFollowFreeAreaTop"},{"functionName":"SetFollowFreeAreaBottom"},{"functionName":"SetLeftwardSpeedMax"},{"functionName":"SetRightwardSpeedMax"},{"functionName":"SetUpwardSpeedMax"},{"functionName":"SetDownwardSpeedMax"},{"functionName":"SetLeftwardSpeed"},{"functionName":"SetRightwardSpeed"},{"functionName":"SetDownwardSpeed"},{"functionName":"SetUpwardSpeed"},{"functionName":"OffsetX"},{"functionName":"SetOffsetXOp"},{"functionName":"SetOffsetX"},{"functionName":"OffsetY"},{"functionName":"SetOffsetYOp"},{"functionName":"SetOffsetY"},{"functionName":"SetForecastTime"},{"functionName":"SetCameraDelay"}]},{"folderName":"Private","children":[{"functionName":"FreeAreaLeft"},{"functionName":"FreeAreaRight"},{"functionName":"FreeAreaBottom"},{"functionName":"FreeAreaTop"},{"functionName":"UpdateDelayedPosition"},{"functionName":"AddForecastHistoryPosition"},{"functionName":"UpdateForecastedPosition"},{"functionName":"ProjectHistoryEnds"},{"functionName":"ForecastTimeRatio"}]},{"functionName":"IsDelayed"},{"functionName":"CurrentDelay"},{"functionName":"IsWaiting"}]},"propertyDescriptors":[{"value":"0.9","type":"Number","label":"Leftward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"LeftwardSpeed"},{"value":"0.9","type":"Number","label":"Rightward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"RightwardSpeed"},{"value":"0.9","type":"Number","label":"Upward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"UpwardSpeed"},{"value":"0.9","type":"Number","label":"Downward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"DownwardSpeed"},{"value":"true","type":"Boolean","label":"Follow on X axis","name":"FollowOnX"},{"value":"true","type":"Boolean","label":"Follow on Y axis","name":"FollowOnY"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area left border","group":"Position","advanced":true,"name":"FollowFreeAreaLeft"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area right border","group":"Position","advanced":true,"name":"FollowFreeAreaRight"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top border","group":"Position","advanced":true,"name":"FollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom border","group":"Position","advanced":true,"name":"FollowFreeAreaBottom"},{"value":"0","type":"Number","unit":"Pixel","label":"Camera offset X","group":"Position","advanced":true,"name":"CameraOffsetX"},{"value":"0","type":"Number","unit":"Pixel","label":"Camera offset Y","group":"Position","advanced":true,"name":"CameraOffsetY"},{"value":"0","type":"Number","unit":"Second","label":"Camera delay","group":"Timing","deprecated":true,"name":"CameraDelay"},{"value":"0","type":"Number","unit":"Second","label":"Forecast time","group":"Timing","deprecated":true,"name":"ForecastTime"},{"value":"0","type":"Number","unit":"Second","label":"Forecast history duration","group":"Timing","deprecated":true,"name":"ForecastHistoryDuration"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogLeftwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogRightwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogDownwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogUpwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"DelayedCenterX"},{"value":"","type":"Number","label":"","hidden":true,"name":"DelayedCenterY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryMeanX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryMeanY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryVarianceX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryCovariance"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryLinearA"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryLinearB"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastedX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastedY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedNewestX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedNewestY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedOldestX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedOldestY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryVarianceY"},{"value":"","type":"Number","label":"Index (local variable)","hidden":true,"name":"Index"},{"value":"0","type":"Number","label":"","hidden":true,"name":"CameraDelayCatchUpSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"CameraExtraDelay"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingSpeedXMax"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingSpeedYMax"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingEnd"},{"value":"","type":"Number","label":"","hidden":true,"name":"CameraDelayCatchUpDuration"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Leftward maximum speed","group":"Maximum speed","advanced":true,"name":"LeftwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Rightward maximum speed","group":"Maximum speed","advanced":true,"name":"RightwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed","group":"Maximum speed","advanced":true,"name":"UpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed","group":"Maximum speed","advanced":true,"name":"DownwardSpeedMax"},{"value":"","type":"Number","label":"OldX (local variable)","hidden":true,"name":"OldX"},{"value":"","type":"Number","label":"OldY (local variable)","hidden":true,"name":"OldY"},{"value":"","type":"Boolean","label":"","hidden":true,"name":"IsCalledManually"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Catch-up speed","children":[{"propertyName":"LeftwardSpeed"},{"propertyName":"RightwardSpeed"},{"propertyName":"UpwardSpeed"},{"propertyName":"DownwardSpeed"}]},{"propertyName":"FollowOnX"},{"propertyName":"FollowOnY"},{"folderName":"Position","children":[{"propertyName":"FollowFreeAreaLeft"},{"propertyName":"FollowFreeAreaRight"},{"propertyName":"FollowFreeAreaTop"},{"propertyName":"FollowFreeAreaBottom"},{"propertyName":"CameraOffsetX"},{"propertyName":"CameraOffsetY"}]},{"folderName":"Timing","children":[{"propertyName":"CameraDelay"},{"propertyName":"ForecastTime"},{"propertyName":"ForecastHistoryDuration"}]},{"propertyName":"LogLeftwardSpeed"},{"propertyName":"LogRightwardSpeed"},{"propertyName":"LogDownwardSpeed"},{"propertyName":"LogUpwardSpeed"},{"propertyName":"DelayedCenterX"},{"propertyName":"DelayedCenterY"},{"propertyName":"ForecastHistoryMeanX"},{"propertyName":"ForecastHistoryMeanY"},{"propertyName":"ForecastHistoryVarianceX"},{"propertyName":"ForecastHistoryCovariance"},{"propertyName":"ForecastHistoryLinearA"},{"propertyName":"ForecastHistoryLinearB"},{"propertyName":"ForecastedX"},{"propertyName":"ForecastedY"},{"propertyName":"ProjectedNewestX"},{"propertyName":"ProjectedNewestY"},{"propertyName":"ProjectedOldestX"},{"propertyName":"ProjectedOldestY"},{"propertyName":"ForecastHistoryVarianceY"},{"propertyName":"Index"},{"propertyName":"CameraDelayCatchUpSpeed"},{"propertyName":"CameraExtraDelay"},{"propertyName":"WaitingSpeedXMax"},{"propertyName":"WaitingSpeedYMax"},{"propertyName":"WaitingEnd"},{"propertyName":"CameraDelayCatchUpDuration"},{"folderName":"Maximum speed","children":[{"propertyName":"LeftwardSpeedMax"},{"propertyName":"RightwardSpeedMax"},{"propertyName":"UpwardSpeedMax"},{"propertyName":"DownwardSpeedMax"}]},{"propertyName":"OldX"},{"propertyName":"OldY"},{"propertyName":"IsCalledManually"}]}},{"description":"Smoothly scroll to follow a character and stabilize the camera when jumping.","fullName":"Smooth platformer camera","helpPath":"","iconUrl":"","name":"SmoothPlatformerCamera","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PlatformBehavior::IsJumping"},"parameters":["Object","PlatformerCharacter"]},{"type":{"inverted":true,"value":"PlatformBehavior::IsFalling"},"parameters":["Object","PlatformerCharacter"]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","SmoothCamera","FloorFollowFreeAreaTop",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","SmoothCamera","FloorFollowFreeAreaBottom",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","SmoothCamera","FloorUpwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","SmoothCamera","FloorDownwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","SmoothCamera","FloorUpwardSpeedMax",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","SmoothCamera","FloorDownwardSpeedMax",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"PlatformBehavior::IsJumping"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::IsFalling"},"parameters":["Object","PlatformerCharacter"]}]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","SmoothCamera","AirFollowFreeAreaTop",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","SmoothCamera","AirFollowFreeAreaBottom",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","SmoothCamera","AirUpwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","SmoothCamera","AirDownwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","SmoothCamera","AirUpwardSpeedMax",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","SmoothCamera","AirDownwardSpeedMax",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothPlatformerCamera","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Platformer character behavior","extraInformation":["PlatformBehavior::PlatformerObjectBehavior"],"choices":[],"name":"PlatformerCharacter"},{"value":"","type":"Behavior","label":"Smooth camera behavior","extraInformation":["SmoothCamera::SmoothCamera"],"choices":[],"name":"SmoothCamera"},{"value":"","type":"Number","label":"","hidden":true,"name":"JumpOriginY"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top in the air","group":"Position","name":"AirFollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom in the air","group":"Position","name":"AirFollowFreeAreaBottom"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top on the floor","group":"Position","name":"FloorFollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom on the floor","group":"Position","name":"FloorFollowFreeAreaBottom"},{"value":"0.95","type":"Number","label":"Upward speed in the air (in ratio per second)","group":"Catch-up speed","name":"AirUpwardSpeed"},{"value":"0.95","type":"Number","label":"Downward speed in the air (in ratio per second)","group":"Catch-up speed","name":"AirDownwardSpeed"},{"value":"0.9","type":"Number","label":"Upward speed on the floor (in ratio per second)","group":"Catch-up speed","name":"FloorUpwardSpeed"},{"value":"0.9","type":"Number","label":"Downward speed on the floor (in ratio per second)","group":"Catch-up speed","name":"FloorDownwardSpeed"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed in the air","group":"Maximum speed","name":"AirUpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed in the air","group":"Maximum speed","name":"AirDownwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed on the floor","group":"Maximum speed","name":"FloorUpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed on the floor","group":"Maximum speed","name":"FloorDownwardSpeedMax"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PlatformerCharacter"},{"propertyName":"SmoothCamera"},{"propertyName":"JumpOriginY"},{"folderName":"Position","children":[{"propertyName":"AirFollowFreeAreaTop"},{"propertyName":"AirFollowFreeAreaBottom"},{"propertyName":"FloorFollowFreeAreaTop"},{"propertyName":"FloorFollowFreeAreaBottom"}]},{"folderName":"Catch-up speed","children":[{"propertyName":"AirUpwardSpeed"},{"propertyName":"AirDownwardSpeed"},{"propertyName":"FloorUpwardSpeed"},{"propertyName":"FloorDownwardSpeed"}]},{"folderName":"Maximum speed","children":[{"propertyName":"AirUpwardSpeedMax"},{"propertyName":"AirDownwardSpeedMax"},{"propertyName":"FloorUpwardSpeedMax"},{"propertyName":"FloorDownwardSpeedMax"}]}]}}],"eventsBasedObjects":[]},{"author":"Westboy31","category":"Visual effect","dimension":"2D","extensionNamespace":"","fullName":"Flash and transition painter","gdevelopVersion":">=5.5.222","helpPath":"","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vdmllLWZpbHRlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCA0TDIwIDdIMTdMMTUgNEgxM0wxNSA3SDEyTDEwIDRIOEwxMCA3SDdMNSA0SDRDMi45IDQgMiA0LjkgMiA2TDIgMThDMiAxOS4xIDIuOSAyMCA0IDIwSDIwQzIxLjEgMjAgMjIgMTkuMSAyMiAxOFY0SDE4TTExLjI1IDE1LjI1TDEwIDE4TDguNzUgMTUuMjVMNiAxNEw4Ljc1IDEyLjc1TDEwIDEwTDExLjI1IDEyLjc1TDE0IDE0TDExLjI1IDE1LjI1TTE2Ljk0IDExLjk0TDE2IDE0TDE1LjA2IDExLjk0TDEzIDExTDE1LjA2IDEwLjA2TDE2IDhMMTYuOTQgMTAuMDZMMTkgMTFMMTYuOTQgMTEuOTRaIiAvPjwvc3ZnPg==","name":"FlashTransitionPainter","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/movie-filter.svg","shortDescription":"Screen transitions painted with plain color fill using Shape Painter.","version":"0.2.0","description":["Paint transition effects","- Fade in, fade out","- Right to left","- Top to bottom","- Circular","","A blur effect can be added to the painter layer to smooth the transition."],"origin":{"identifier":"FlashTransitionPainter","name":"gdevelop-extension-store"},"tags":["flash","transition","effect"],"authorIds":[],"dependencies":[],"globalVariables":[],"sceneVariables":[],"eventsFunctions":[],"eventsFunctionsFolderStructure":{"folderName":"__ROOT"},"eventsBasedBehaviors":[{"description":"Paint all over the screen a color for a period of time.","fullName":"Flash and transition painter","helpPath":"","iconUrl":"","name":"FlashTransitionPainter","objectType":"PrimitiveDrawing::Drawer","previewIconUrl":"","eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPostEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Ensure shape painter properties are set correctly for this extension to work.\n"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PrimitiveDrawing::ClearBetweenFrames"},"parameters":["Object","no"]},{"type":{"value":"PrimitiveDrawing::OutlineSize"},"parameters":["Object","=","0"]},{"type":{"value":"PrimitiveDrawing::UseRelativeCoordinates"},"parameters":["Object",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","min(1, Object.ObjectTimerElapsedTime(\"__FlashTransitionPainter_Time\") / Duration)"]},{"type":{"value":"PrimitiveDrawing::Drawer::ClearShapes"},"parameters":["Object"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["Progress","=","1"]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior",""]},{"type":{"value":"PauseObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Direction","=","\"Backward\""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","1 - Progress"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Direction","=","\"Both\""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","min(2 * Progress, 2 * (1 - Progress))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["Progress",">","0"]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["Object","=","MaxOpacity"]}],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Flash","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Flash\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["Object","=","MaxOpacity * Progress"]},{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","CameraBorderRight(Object.Layer())","CameraBorderBottom(Object.Layer())"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Horizontal","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"from left to right"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Horizontal\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","lerp(CameraBorderLeft(Object.Layer()), CameraBorderRight(Object.Layer()), Progress)","CameraBorderBottom(Object.Layer())"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Vertical","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"from top to bottom"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Vertical\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","CameraBorderRight(Object.Layer())","lerp(CameraBorderTop(Object.Layer()), CameraBorderBottom(Object.Layer()), Progress)"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Circular","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"A circle scale up from the middle."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Circular\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Circle"},"parameters":["Object","CameraCenterX(Object.Layer())","CameraCenterY(Object.Layer())","(DistanceBetweenPositions(0, 0, CameraWidth(Object.Layer()), CameraHeight(Object.Layer())) / 2 + 1) * Progress"]}]}],"parameters":[]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]},{"description":"Paint Effect.","fullName":"Paint Effect","functionType":"Action","name":"PaintEffect","sentence":"Paint effect type _PARAM4_ of _PARAM0_ with direction _PARAM5_ and color _PARAM2_ for _PARAM3_ seconds","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BehaviorActivated"},"parameters":["Object","Behavior"]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior","yes"]},{"type":{"value":"UnPauseObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]},{"type":{"value":"ResetObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]},{"type":{"value":"SetNumberVariable"},"parameters":["Duration","=","NewDuration"]},{"type":{"value":"SetStringVariable"},"parameters":["Direction","=","NewDirection"]},{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["Type","=","\"Flash\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["NewType","!=","\"\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["Type","=","NewType"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Color","!=","\"\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillColor"},"parameters":["Object","Color"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["MaxOpacity","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["NewMaxOpacity","!=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["MaxOpacity","=","NewMaxOpacity"]}]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"},{"description":"Color","name":"Color","type":"color"},{"description":"Duration","name":"NewDuration","type":"expression"},{"description":"Type of effect ","name":"NewType","supplementaryInformation":"[\"Flash\",\"Horizontal\",\"Vertical\",\"Circular\"]","type":"stringWithSelector"},{"description":"Direction transition","name":"NewDirection","supplementaryInformation":"[\"Both\",\"Forward\",\"Backward\"]","type":"stringWithSelector"},{"description":"End opacity","name":"NewMaxOpacity","type":"expression"}],"objectGroups":[]},{"description":"Paint effect ended.","fullName":"Paint effect ended ","functionType":"Condition","name":"PaintEffectIsEnd","sentence":"When paint effect of _PARAM0_ ends","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimerPaused"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"onCreated"},{"functionName":"doStepPostEvents"},{"functionName":"PaintEffect"},{"functionName":"PaintEffectIsEnd"}]},"propertyDescriptors":[{"value":"0","type":"Number","unit":"Dimensionless","label":"","hidden":true,"name":"Progress"},{"value":"0","type":"Number","label":"","hidden":true,"name":"Duration"},{"value":"","type":"String","label":"Type of effect ","hidden":true,"name":"Type"},{"value":"","type":"String","label":"Direction of transition","hidden":true,"name":"Direction"},{"value":"255","type":"Number","label":"The maximum of the opacity only for flash","hidden":true,"name":"MaxOpacity"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"Progress"},{"propertyName":"Duration"},{"propertyName":"Type"},{"propertyName":"Direction"},{"propertyName":"MaxOpacity"}]}}],"eventsBasedObjects":[]}],"externalLayouts":[{"associatedLayout":"","name":"functions","instances":[],"editionSettings":{}}]} \ No newline at end of file +{"firstLayout":"","gdVersion":{"build":274,"major":5,"minor":6,"revision":0},"initialGDVersion":"5.6.279","properties":{"adaptGameResolutionAtRuntime":true,"antialiasingMode":"MSAA","antialisingEnabledOnMobile":false,"folderProject":false,"orientation":"landscape","packageName":"com.example.gamename","pixelsRounding":true,"projectUuid":"459bb859-e4c7-45fe-a4a8-13e8403e786f","scaleMode":"nearest","sizeOnStartupMode":"adaptWidth","templateSlug":"","version":"1.0.0","name":"WorldOfSolariaV1","description":"","author":"","windowWidth":768,"windowHeight":432,"latestCompilationDirectory":"","maxFPS":60,"minFPS":20,"verticalSync":false,"platformSpecificAssets":{"android-icon-144":"","android-icon-192":"","android-icon-36":"","android-icon-48":"","android-icon-72":"","android-icon-96":"","android-windowSplashScreenAnimatedIcon":"","desktop-icon-512":"","ios-icon-100":"","ios-icon-1024":"","ios-icon-114":"","ios-icon-120":"","ios-icon-144":"","ios-icon-152":"","ios-icon-167":"","ios-icon-180":"","ios-icon-20":"","ios-icon-29":"","ios-icon-40":"","ios-icon-50":"","ios-icon-57":"","ios-icon-58":"","ios-icon-60":"","ios-icon-72":"","ios-icon-76":"","ios-icon-80":"","ios-icon-87":""},"loadingScreen":{"backgroundColor":0,"backgroundFadeInDuration":0.2,"backgroundImageResourceName":"","gdevelopLogoStyle":"light","logoAndProgressFadeInDuration":0.2,"logoAndProgressLogoFadeInDelay":0.0,"minDuration":1.5,"progressBarColor":16777215,"progressBarHeight":20.0,"progressBarMaxWidth":200.0,"progressBarMinWidth":40.0,"progressBarWidthPercent":30.0,"showGDevelopSplash":true,"showProgressBar":true},"watermark":{"placement":"bottom-left","showWatermark":true},"authorIds":[],"authorUsernames":[],"categories":[],"playableDevices":[],"extensionProperties":[],"platforms":[{"name":"GDevelop JS platform"}],"currentPlatform":"GDevelop JS platform"},"resources":{"resources":[{"file":"assets/NewSprite.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"NewSprite","smoothed":false,"userAdded":false},{"file":"assets/tempLogo.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"tempLogo","smoothed":false,"userAdded":false},{"file":"assets/tempLogo.png","kind":"image","metadata":"","name":"assets/tempLogo.png","smoothed":false,"userAdded":false},{"file":"assets/tempLogo3.png","kind":"image","metadata":"","name":"assets/tempLogo3.png","smoothed":false,"userAdded":false},{"file":"assets/NewSprite2.png","kind":"image","metadata":"{\"extension\":\".png\"}","name":"NewSprite2","smoothed":false,"userAdded":false},{"file":"assets/tempTitle.png","kind":"image","metadata":"","name":"assets/tempTitle.png","smoothed":false,"userAdded":false},{"file":"assets/8BitOperatorPlus8Regular_Edited.png","kind":"image","metadata":"","name":"assets\\8BitOperatorPlus8Regular_Edited.png","smoothed":false,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/15c1797cbcb41c3a753b6bbb21cfa60284cfaf81c9891c3abf78a8e0e1cacf59_8BitOperatorPlus8Regular_Edited.png","name":"8BitOperatorPlus8Regular_Edited.png"}},{"file":"assets/Small Blue Button_Hovered.png","kind":"image","metadata":"","name":"assets\\Small Blue Button_Hovered.png","smoothed":false,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/f80ae062891a0a4612c0160ed931165461392019f89a8545f28c195f645ebc48_Small Blue Button_Hovered.png","name":"Small Blue Button_Hovered.png"}},{"file":"assets/Small Blue Button_Idle.png","kind":"image","metadata":"","name":"assets\\Small Blue Button_Idle.png","smoothed":false,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/c22b15c77047f1545806141e1129900bdc985d191b7ab5ebaae834a90c270ed2_Small Blue Button_Idle.png","name":"Small Blue Button_Idle.png"}},{"file":"assets/Small Blue Button_Pressed.png","kind":"image","metadata":"","name":"assets\\Small Blue Button_Pressed.png","smoothed":false,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/9e01b09016c6a200b53a55cac3cf34f083785eb6b9f55de490a71ad352858b36_Small Blue Button_Pressed.png","name":"Small Blue Button_Pressed.png"}},{"file":"assets/8BitOperatorPlus8Regular_Edited.fnt","kind":"bitmapFont","metadata":"","name":"assets\\8BitOperatorPlus8Regular_Edited.fnt","userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/6b410f07a3a02e721a49d41795e84b56707ef28ac4d095d55f1fd1093760e134_8BitOperatorPlus8Regular_Edited.fnt","name":"8BitOperatorPlus8Regular_Edited.fnt"}}]},"objects":[{"assetStoreId":"","name":"shp_fade","persistentUuid":"7c029e6d-47df-4889-bb1b-6130d9888e56","type":"PrimitiveDrawing::Drawer","variables":[],"effects":[],"behaviors":[{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter","Progress":0.0,"Duration":0.0,"Type":"","Direction":"","MaxOpacity":255.0}],"fillOpacity":255.0,"outlineSize":1,"outlineOpacity":255.0,"absoluteCoordinates":false,"clearBetweenFrames":true,"antialiasing":"none","fillColor":{"r":255.0,"g":255.0,"b":255.0},"outlineColor":{"r":0.0,"g":0.0,"b":0.0}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Fade","children":[{"objectName":"shp_fade"}]}]},"objectsGroups":[],"variables":[{"name":"host","type":"string","value":""}],"layouts":[{"b":14,"disableInputWhenNotFocused":true,"mangledName":"Splash","name":"Splash","r":14,"standardSortMethod":true,"stopSoundsOnStartup":true,"title":"","v":14,"uiSettings":{"grid":true,"gridType":"rectangular","gridWidth":16.0,"gridHeight":16.0,"gridDepth":32.0,"gridOffsetX":0.0,"gridOffsetY":0.0,"gridOffsetZ":0.0,"gridColor":10401023.0,"gridAlpha":0.8,"snap":true,"zoomFactor":1.1726229638177635,"windowMask":false,"selectedLayer":"","gameEditorMode":"instances-editor"},"objectsGroups":[],"variables":[],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":224.0,"keepRatio":true,"layer":"","name":"spr_studioLogo","persistentUuid":"a65e3907-a834-4122-b84c-e184ed30d7a5","width":480.0,"x":144.0,"y":96.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"shp_fade","persistentUuid":"43c12b31-9f4a-4fd7-970e-a848140da139","width":0.0,"x":640.0,"y":0.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"spr_studioLogo","persistentUuid":"d8d7a523-1dfa-4cd4-9080-3d6c7deb792f","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"tempLogo","useMultipleDirections":false,"directions":[{"looping":false,"metadata":"{\"pskl\":{}}","timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"tempLogo","points":[],"originPoint":{"name":"origine","x":0.0,"y":0.0},"centerPoint":{"automatic":true,"name":"centre","x":0.0,"y":0.0},"customCollisionMask":[[{"x":0.0,"y":0.0},{"x":640.0,"y":0.0},{"x":640.0,"y":304.0},{"x":0.0,"y":304.0}]]}]}]}]}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Sprites","children":[{"objectName":"spr_studioLogo"}]}]},"events":[{"type":"BuiltinCommonInstructions::Link","include":{"includeConfig":0},"target":"Functions"},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Scene Start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneJustBegins"},"parameters":[""]}],"actions":[{"type":{"value":"SetWindowSize"},"parameters":["","768","432",""]},{"type":{"value":"CenterWindow"},"parameters":[""]},{"type":{"value":"AdvancedWindow::SetResizable"},"parameters":["",""]},{"type":{"value":"Wait"},"parameters":["3"]},{"type":{"value":"FlashTransitionPainter::FlashTransitionPainter::PaintEffect"},"parameters":["shp_fade","FlashTransitionPainter","\"0;0;0\"","1","\"Flash\"","\"Forward\"","255",""]},{"type":{"value":"Wait"},"parameters":["1"]},{"type":{"value":"Scene"},"parameters":["","\"Title\"",""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Host Device","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SystemInfo::HasTouchScreen"},"parameters":[""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["host","=","\"touchscreen\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SystemInfo::IsNativeDesktopApp"},"parameters":[""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["host","=","\"desktop\""]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[{"effectType":"Scene3D::HemisphereLight","name":"3D Ambient Hemisphere Light","doubleParameters":{"elevation":40.0,"intensity":0.33,"rotation":300.0},"stringParameters":{"groundColor":"127;127;127","skyColor":"255;255;255","top":"Z+"},"booleanParameters":{}},{"effectType":"Scene3D::DirectionalLight","name":"3D Sun Light","doubleParameters":{"distanceFromCamera":1500.0,"elevation":40.0,"frustumSize":4000.0,"intensity":0.75,"minimumShadowBias":0.0,"rotation":300.0},"stringParameters":{"color":"255;255;255","shadowQuality":"medium","top":"Z+"},"booleanParameters":{"isCastingShadow":true}}]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"}]},{"b":255,"disableInputWhenNotFocused":true,"mangledName":"Title","name":"Title","r":247,"standardSortMethod":true,"stopSoundsOnStartup":true,"title":"","v":249,"uiSettings":{"grid":true,"gridType":"rectangular","gridWidth":16.0,"gridHeight":16.0,"gridDepth":32.0,"gridOffsetX":0.0,"gridOffsetY":0.0,"gridOffsetZ":0.0,"gridColor":10401023.0,"gridAlpha":0.8,"snap":true,"zoomFactor":0.9114583333333334,"windowMask":false,"selectedLayer":"","gameEditorMode":"instances-editor"},"objectsGroups":[],"variables":[],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":432.0,"keepRatio":true,"layer":"","name":"spr_tempTitle","persistentUuid":"7c69ad43-c862-4f49-b2a0-f7aa2a009e17","width":768.0,"x":0.0,"y":0.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"shp_fade","persistentUuid":"b2376dc0-a75e-41fc-b571-46598d263229","width":0.0,"x":768.0,"y":0.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"btn_login","persistentUuid":"1094a52f-c2c7-43fd-9c08-fd6d96bf9310","width":0.0,"x":208.0,"y":352.0,"zOrder":3,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"btn_register","persistentUuid":"985c1bc0-a895-4ac6-8cfb-27f8999e9fa1","width":0.0,"x":400.0,"y":352.0,"zOrder":4,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":false,"height":0.0,"keepRatio":true,"layer":"","name":"btn_settings","persistentUuid":"e0c76744-0bfc-491c-8182-c8f0dc1d5d73","width":0.0,"x":688.0,"y":16.0,"zOrder":5,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"spr_tempTitle","persistentUuid":"d772eb58-a6cd-4786-9454-1d305a42c932","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"assets/tempTitle.png","points":[],"originPoint":{"name":"origine","x":0.0,"y":0.0},"centerPoint":{"automatic":true,"name":"centre","x":0.0,"y":0.0},"customCollisionMask":[[{"x":0.0,"y":0.0},{"x":640.0,"y":0.0},{"x":640.0,"y":480.0},{"x":0.0,"y":480.0}]]}]}]}]},{"assetStoreId":"80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf","name":"btn_login","persistentUuid":"510c8083-e726-45db-abbd-3ce87aeaa45f","type":"PanelSpriteButton::PanelSpriteButton","variant":"Small Blue Button","variables":[],"effects":[],"behaviors":[],"content":{"LabelText":"Login","PressedLabelOffsetY":2.0}},{"assetStoreId":"80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf","name":"btn_register","persistentUuid":"dfc9eada-5314-4e7b-ba3c-fdde292f095b","type":"PanelSpriteButton::PanelSpriteButton","variant":"Small Blue Button","variables":[],"effects":[],"behaviors":[],"content":{"LabelText":"Register","PressedLabelOffsetY":2.0}},{"assetStoreId":"90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0","name":"btn_settings","persistentUuid":"4ce8f8a6-d5f7-44d7-8681-c71ba077bf4b","type":"PanelSpriteButton::PanelSpriteButton","variant":"Tiny Blue Button","variables":[],"effects":[],"behaviors":[],"content":{"LabelText":"Settings","PressedLabelOffsetY":2.0}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"spr_tempTitle"},{"objectName":"btn_login"},{"objectName":"btn_register"},{"objectName":"btn_settings"}]},"events":[{"type":"BuiltinCommonInstructions::Link","include":{"includeConfig":0},"target":"Functions"}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[{"effectType":"Scene3D::HemisphereLight","name":"3D Ambient Hemisphere Light","doubleParameters":{"elevation":40.0,"intensity":0.33,"rotation":300.0},"stringParameters":{"groundColor":"127;127;127","skyColor":"255;255;255","top":"Z+"},"booleanParameters":{}},{"effectType":"Scene3D::DirectionalLight","name":"3D Sun Light","doubleParameters":{"distanceFromCamera":1500.0,"elevation":40.0,"frustumSize":4000.0,"intensity":0.75,"minimumShadowBias":0.0,"rotation":300.0},"stringParameters":{"color":"255;255;255","shadowQuality":"medium","top":"Z+"},"booleanParameters":{"isCastingShadow":true}}]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"FlashTransitionPainter","type":"FlashTransitionPainter::FlashTransitionPainter"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"}]}],"externalEvents":[{"associatedLayout":"Splash","name":"Functions","events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Scene Start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneJustBegins"},"parameters":[""]}],"actions":[{"type":{"value":"FlashTransitionPainter::FlashTransitionPainter::PaintEffect"},"parameters":["shp_fade","FlashTransitionPainter","\"0;0;0\"","1","\"Flash\"","\"Backward\"","255",""]},{"type":{"value":"Wait"},"parameters":["1"]}]}],"parameters":[]}]}],"eventsFunctionsExtensions":[{"author":"Bouh","category":"Input","dimension":"","extensionNamespace":"","fullName":"Gamepads (controllers)","gdevelopVersion":">=5.5.222","helpPath":"/all-features/gamepad","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=","name":"Gamepads","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg","shortDescription":"Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.","version":"0.9.2","description":["Add support for gamepads (or other physical controllers).","","It gives access to:","- button presses,","- axis positions and force,","- trigger pressure,","- configurable deadzone,","- vibration,","- automatic \"gamepad mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the gamepad (it works by reading the gamepad state and simulating controls). No need for additional events to make it work once the behaviors are set up.","","The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))."],"origin":{"identifier":"Gamepads","name":"gdevelop-extension-store"},"tags":["controllers","gamepads","joysticks","axis","xbox","ps4","platformer","platform","top-down"],"authorIds":["2OwwM8ToR9dx9RJ2sAKTcrLmCB92","taRwmWxwAFYFL9yyBwB3cwBw0BO2","mnImQKdn8nQxwzkS5D6a1JB27V23","IWykYNRvhCZBN3vEgKEbBPOR3Oc2"],"dependencies":[],"globalVariables":[],"sceneVariables":[{"name":"Buttons","type":"structure","children":[{"name":"A or Cross","type":"string","value":"A"},{"name":"B or Circle","type":"string","value":"B"},{"name":"LB or L1","type":"string","value":"LB"},{"name":"LT or L2","type":"string","value":"LT"},{"name":"RB or R1","type":"string","value":"RB"},{"name":"RT or R2","type":"string","value":"RT"},{"name":"X or Square","type":"string","value":"X"},{"name":"Y or Triangle","type":"string","value":"Y"}]}],"eventsFunctions":[{"fullName":"","functionType":"Action","name":"onFirstSceneLoaded","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["if (gdjs._extensionController) {\r"," return;\r","}\r","\r","/**\r"," * Associate controller button ids to button names\r"," */\r","const controllerButtonNames = {\r"," \"XBOX\": {\r"," 0: \"A\",\r"," 1: \"B\",\r"," 2: \"X\",\r"," 3: \"Y\",\r"," 4: \"LB\",\r"," 5: \"RB\",\r"," 6: \"LT\",\r"," 7: \"RT\",\r"," 8: \"BACK\",\r"," 9: \"START\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"NONE\",\r"," 17: \"NONE\"\r"," },\r"," \"PS4\": {\r"," 0: \"CROSS\",\r"," 1: \"CIRCLE\",\r"," 2: \"SQUARE\",\r"," 3: \"TRIANGLE\",\r"," 4: \"L1\",\r"," 5: \"R1\",\r"," 6: \"L2\",\r"," 7: \"R2\",\r"," 8: \"SHARE\",\r"," 9: \"OPTIONS\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"PS_BUTTON\",\r"," 17: \"CLICK_TOUCHPAD\"\r"," }\r","};\r","\r","/**\r"," * @param {number} playerId\r"," */\r","function getGamepad(playerId) {\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," return gamepads[playerId];\r","}\r","\r","/** @type {{[playerId: number]: Player}} */\r","const players = {};\r","\r","/**\r"," * @param {number} playerId\r"," */\r","function getPlayer(playerId) {\r"," let player = players[playerId];\r"," if (!player) {\r"," player = new Player(playerId);\r"," players[playerId] = player;\r"," }\r"," return player;\r","}\r","\r","class Player {\r"," /** @type {number} */\r"," playerId;\r"," mapping = 'DEFAULT';\r"," lastButtonUsed = -1;\r"," deadzone = 0.2;\r"," /** @type {{[buttonId: number]: ButtonState}} */\r"," buttonStates = {};\r"," rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r","\r"," /**\r"," * @param {number} playerId\r"," */\r"," constructor(playerId) {\r"," this.playerId = playerId;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," getButtonState(buttonId) {\r"," let buttonState = this.buttonStates[buttonId];\r"," if (!buttonState) {\r"," buttonState = new ButtonState();\r"," this.buttonStates[buttonId] = buttonState;\r"," }\r"," return buttonState;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonPressed(buttonId) {\r"," return this.getButtonState(buttonId).isPressed;\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonJustPressed(buttonId) {\r"," return this.getButtonState(buttonId).isJustPressed();\r"," }\r","\r"," /**\r"," * @param {number} buttonId\r"," */\r"," isButtonReleased(buttonId) {\r"," return this.getButtonState(buttonId).isReleased();\r"," }\r","\r"," isAnyButtonReleased() {\r"," for (const buttonId in this.buttonStates) {\r"," const buttonState = this.buttonStates[buttonId];\r"," if (buttonState.isReleased()) {\r"," return true;\r"," }\r"," }\r"," return false;\r"," }\r","\r"," isAnyButtonPressed() {\r"," for (const buttonId in this.buttonStates) {\r"," const buttonState = this.buttonStates[buttonId];\r"," if (buttonState.isPressed) {\r"," return true;\r"," }\r"," }\r"," return false;\r"," }\r","}\r","\r","class ButtonState {\r"," wasPressed = false;\r"," isPressed = false;\r","\r"," isReleased() {\r"," return this.wasPressed && !this.isPressed;\r"," }\r","\r"," isJustPressed() {\r"," return !this.wasPressed && this.isPressed;\r"," }\r","}\r","\r","// Async tasks are run before everything.\r","// This is a hack to make sure that button states are updated\r","// before mapping behavior events.\r","const frameBeginningTask = new class extends gdjs.AsyncTask {\r"," update() {\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," const gamepad = gamepads[playerId];\r"," if (gamepad == null) {\r"," // The gamepad is not connected.\r"," continue;\r"," }\r"," const player = getPlayer(playerId);\r","\r"," for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r"," const buttonState = player.getButtonState(buttonId);\r"," buttonState.wasPressed = buttonState.isPressed;\r"," buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r"," if (buttonState.isJustPressed()) {\r"," player.lastButtonUsed = buttonId;\r"," }\r"," }\r"," }\r"," return false;\r"," }\r","}();\r","\r","/**\r"," * @param {gdjs.RuntimeScene} runtimeScene\r"," */\r","function addFrameBeginningTaskIfNeeded(runtimeScene) {\r"," const taskManager = runtimeScene.getAsyncTasksManager();\r"," for (const taskWithCallback of taskManager.tasksWithCallback) {\r"," if (taskWithCallback.asyncTask === frameBeginningTask) {\r"," return;\r"," }\r"," }\r"," // Async tasks are run before everything.\r"," // This is a hack to make sure that button states are updated\r"," // before mapping behavior events.\r"," taskManager.addTask(frameBeginningTask);\r","}\r","\r","/**\r"," * @param {gdjs.RuntimeScene} runtimeScene\r"," */\r","function onScenePostEvents(runtimeScene) {\r"," addFrameBeginningTaskIfNeeded(runtimeScene);\r"," /** @type {Gamepad[]} */\r"," const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r"," for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," let gamepad = gamepads[playerId];\r"," if (gamepad == null) {\r"," // The gamepad is not connected.\r"," continue;\r"," }\r"," const player = getPlayer(playerId);\r"," const rumble = player.rumble;\r"," rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r"," if (rumble.duration - rumble.elapsedTime <= 0 &&\r"," (rumble.weakMagnitude || rumble.strongMagnitude)\r"," ) {\r"," rumble.weakMagnitude = 0;\r"," rumble.strongMagnitude = 0;\r"," }\r"," }\r","}\r","\r","/**\r"," * @param {string} type\r"," * @param {number} buttonId\r"," */\r","function getInputString(type, buttonId) {\r"," if (!controllerButtonNames[type]) {\r"," return \"UNKNOWN_BUTTON\";\r"," }\r"," return controllerButtonNames[type][buttonId];\r","}\r","\r","function getButtonId(buttonName) {\r"," switch (buttonName) {\r"," case 'A':\r"," case 'CROSS':\r"," return 0;\r"," case 'B':\r"," case 'CIRCLE':\r"," return 1;\r"," case 'X':\r"," case 'SQUARE':\r"," return 2;\r"," case 'Y':\r"," case 'TRIANGLE':\r"," return 3;\r"," case 'LB':\r"," case 'L1':\r"," return 4;\r"," case 'RB':\r"," case 'R1':\r"," return 5;\r"," case 'LT':\r"," case 'L2':\r"," return 6;\r"," case 'RT':\r"," case 'R2':\r"," return 7;\r"," case 'UP':\r"," return 12;\r"," case 'DOWN':\r"," return 13;\r"," case 'LEFT':\r"," return 14;\r"," case 'RIGHT':\r"," return 15;\r"," case 'BACK':\r"," case 'SHARE':\r"," return 8;\r"," case 'START':\r"," case 'OPTIONS':\r"," return 9;\r"," case 'CLICK_STICK_LEFT':\r"," return 10;\r"," case 'CLICK_STICK_RIGHT':\r"," return 11;\r"," //PS4\r"," case 'PS_BUTTON':\r"," return 16;\r"," case 'CLICK_TOUCHPAD':\r"," return 17;\r"," default:\r"," console.error('The gamepad button: ' + buttonName + ' is not valid.');\r"," return null;\r"," }\r","}\r","\r","/**\r"," * @param {number} playerId\r"," * @param {string} directionName\r"," * @param {number} axisValueX\r"," * @param {number} axisValueY\r"," */\r","function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r"," switch (directionName) {\r"," case 'LEFT':\r"," return getNormalizedAxisValue(axisValueX, playerId) < 0;\r"," case 'RIGHT':\r"," return getNormalizedAxisValue(axisValueX, playerId) > 0;\r"," case 'UP':\r"," return getNormalizedAxisValue(axisValueY, playerId) < 0;\r"," case 'DOWN':\r"," return getNormalizedAxisValue(axisValueY, playerId) > 0;\r"," case 'ANY':\r"," return getNormalizedAxisValue(axisValueX, playerId) < 0\r"," || getNormalizedAxisValue(axisValueX, playerId) > 0\r"," || getNormalizedAxisValue(axisValueY, playerId) < 0\r"," || getNormalizedAxisValue(axisValueY, playerId) > 0\r"," default:\r"," console.error('The value stick direction is not valid.');\r"," return false;\r"," }\r","}\r","\r","/**\r"," * @param {number} deltaX\r"," * @param {number} deltaY\r"," */\r","function axisToAngle(deltaX, deltaY) {\r"," const rad = Math.atan2(deltaY, deltaX);\r"," const deg = rad * (180 / Math.PI);\r"," return deg;\r","}\r","\r","/**\r"," * @param {{id: string}} gamepad\r"," */\r","function isXbox(gamepad) {\r"," return (gamepad ? (\r"," gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r"," // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r"," // name reported in Firefox corresponding to the driver being used by the controller\r"," // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r"," ) : false);\r","}\r","\r","/**\r"," * Returns the new value taking into account the dead zone for the player_ID given\r"," * @param {number} value\r"," * @param {number} playerID\r"," */\r","function getNormalizedAxisValue(value, playerID) {\r"," // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r","\r"," // Anything smaller than this is assumed to be 0,0\r"," const deadzone = getPlayer(playerID).deadzone;\r","\r"," if (Math.abs(value) < deadzone) {\r"," return 0;\r"," } else {\r"," // We're outside the dead zone, but we'd like to smooth\r"," // this value out so it still runs nicely between 0..1.\r"," // That is, we don't want it to jump suddenly from 0 to\r"," // deadzone.\r","\r"," // Remap value from\r"," // deadzone..1 to 0..(1-deadzone)\r"," // or from\r"," // -1..-deadzone to -(1-deadzone)..0\r"," value = value - Math.sign(value) * deadzone;\r","\r"," // Remap value from\r"," // 0..(1-deadzone) to 0..1\r"," // or from\r"," // -(1-deadzone)..0 to -1..0\r"," return value / (1 - deadzone);\r"," }\r","}\r","\r","gdjs._extensionController = {\r"," getPlayer,\r"," controllerButtonNames,\r"," getInputString,\r"," getButtonId,\r"," axisToAngle,\r"," isXbox,\r"," getNormalizedAxisValue,\r"," isAxisPushed,\r"," getGamepad,\r"," onScenePostEvents,\r"," frameBeginningTask,\r"," addFrameBeginningTaskIfNeeded,\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onSceneLoaded","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":"gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);","parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"parameters":[],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onScenePostEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["gdjs._extensionController.onScenePostEvents(runtimeScene);",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"fullName":"Accelerated speed","functionType":"Expression","name":"AcceleratedSpeed","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","CurrentSpeed"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed","<","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Reduce the speed to match the stick force."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","TargetedSpeed"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","TargetedSpeed"]},{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","-","Acceleration * TimeDelta()"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Turn back at least as fast as it would stop."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed",">","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Reduce the speed to match the stick force."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","TargetedSpeed"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","TargetedSpeed"]},{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","+","Acceleration * TimeDelta()"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Turn back at least as fast as it would stop."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TargetedSpeed","=","0"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed","<","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","min(0, CurrentSpeed + Acceleration * TimeDelta())"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["CurrentSpeed",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["AcceleratedSpeed","=","max(0, CurrentSpeed - Acceleration * TimeDelta())"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)"]}]}],"variables":[{"name":"AcceleratedSpeed","type":"number","value":0.0}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Current speed","name":"CurrentSpeed","type":"expression"},{"description":"Targeted speed","name":"TargetedSpeed","type":"expression"},{"description":"Max speed","name":"SpeedMax","type":"expression"},{"description":"Acceleration","name":"Acceleration","type":"expression"},{"description":"Deceleration","name":"Deceleration","type":"expression"}],"objectGroups":[]},{"description":"Get the value of the pressure on a gamepad trigger.","fullName":"Pressure on a gamepad trigger","functionType":"Expression","name":"TriggerPressure","sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r","\r","if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r"," console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","switch (trigger) {\r"," case 'LT':\r"," case 'L2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r"," break;\r","\r"," case 'RT':\r"," case 'R2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r"," break;\r","\r"," default:\r"," eventsFunctionContext.returnValue = -1;\r"," break;\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Trigger button","name":"Trigger","supplementaryInformation":"[\"LT\",\"RT\",\"L2\",\"R2\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"the force of gamepad stick (from 0 to 1).","fullName":"Stick force","functionType":"ExpressionAndCondition","name":"StickForce","sentence":"the gamepad _PARAM1_ _PARAM2_ stick force","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { getNormalizedAxisValue } = gdjs._extensionController;\r","\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r","\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","\r","eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r"," Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r"," Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Value of a stick rotation (deprecated)","functionType":"Expression","name":"StickRotationValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["Gamepads::StickAngle(PlayerId, Stick)"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Stick angle","functionType":"Expression","name":"StickAngle","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { getNormalizedAxisValue } = gdjs._extensionController;\r","\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r","\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","\r","eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r"," getNormalizedAxisValue(axisValueX, playerId),\r"," getNormalizedAxisValue(axisValueY, playerId));"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the value of axis of a gamepad stick.","fullName":"Value of a gamepad axis (deprecated)","functionType":"Expression","name":"AxisValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r"," console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","let parameterError = false;\r","switch (stick) {\r"," case 'LEFT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," default:\r"," break;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).","fullName":"Stick X force","functionType":"Expression","name":"StickForceX","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisIndex = stick === 'right' ? 2 : 0;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).","fullName":"Stick Y force","functionType":"Expression","name":"StickForceY","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisIndex = stick === 'right' ? 3 : 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button released","functionType":"Condition","name":"C_Button_released","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r","\r","let buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"Button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Check if a button was just pressed on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button just pressed","functionType":"Condition","name":"IsButtonJustPressed","sentence":"Button _PARAM2_ of gamepad _PARAM1_ was just pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r","\r","let buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"Button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the index of the last pressed button of a gamepad.","fullName":"Last pressed button (id)","functionType":"Expression","name":"LastButtonID","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Check if any button is pressed on a gamepad.","fullName":"Any gamepad button pressed","functionType":"Condition","name":"C_Any_Button_pressed","sentence":"Any button of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Last pressed button (string)","functionType":"StringExpression","name":"LastButtonString","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Controller type","name":"controller_type","supplementaryInformation":"[\"Xbox\",\"PS4\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of gamepads.","fullName":"Gamepad count","functionType":"Expression","name":"GamepadCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r","let lastGamepadIndex = -1;\r","for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," // Gamepads can be disconnected and become null\r"," if (gamepads[playerId]) {\r"," lastGamepadIndex = playerId\r"," }\r","}\r","eventsFunctionContext.returnValue = lastGamepadIndex + 1;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button pressed","functionType":"Condition","name":"C_Button_pressed","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r","\r","const buttonId = gdjs._extensionController.getButtonId(button);\r","if (buttonId === null) {\r"," return;\r","}\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Name of the button","name":"button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.","fullName":"Gamepad deadzone for sticks","functionType":"Expression","name":"Deadzone","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.","fullName":"Set gamepad deadzone for sticks","functionType":"Action","name":"A_Set_deadzone","sentence":"Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r","\r","// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r","gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Deadzone for sticks, 0.2 by default (0 to 1)","name":"deadzone","type":"expression"}],"objectGroups":[]},{"description":"Check if a stick of a gamepad is pushed in a given direction.","fullName":"Gamepad stick pushed (axis)","functionType":"Condition","name":"C_Axis_pushed","sentence":"_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r"," console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r"," return;\r","}\r","/** @type {Gamepad} */\r","const gamepad = gdjs._extensionController.getGamepad(playerId);\r","if (!gamepad) {\r"," // The gamepad is not connected.\r"," return;\r","}\r","const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r","const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r","eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of connected gamepads.","fullName":"Connected gamepads count","functionType":"Expression","name":"ConnectedGamepadsCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r","let connectedGamepadCount = 0;\r","for (let playerId = 0; playerId < gamepads.length; playerId++) {\r"," // Gamepads can be disconnected and become null\r"," if (gamepads[playerId]) {\r"," connectedGamepadCount++;\r"," }\r","}\r","eventsFunctionContext.returnValue = connectedGamepadCount;\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Return a string containing informations about the specified gamepad.","fullName":"Gamepad type","functionType":"StringExpression","name":"GamepadType","sentence":"Player _PARAM1_ use _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.","fullName":"Gamepad type","functionType":"Condition","name":"C_Controller_type","sentence":"Gamepad _PARAM1_ is a _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","if (controllerType == \"XBOX\") {"," eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);","} else {"," eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)","name":"controller_type","type":"string"}],"objectGroups":[]},{"description":"Check if a gamepad is connected.","fullName":"Gamepad connected","functionType":"Condition","name":"C_Controller_X_is_connected","sentence":"Gamepad _PARAM1_ is plugged and connected","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];","// If gamepad was disconnected it will be null (so this will return false)","// If gamepad was never connected it will be undefined (so this will return false)","eventsFunctionContext.returnValue = !!gamepads[playerId];"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.","fullName":"Gamepad vibration","functionType":"Action","name":"A_Vibrate_controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: 1.0,"," strongMagnitude: 1.0"," });","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"}],"objectGroups":[]},{"description":"Generate an advanced vibration on the specified controller. Incompatible with Firefox.","fullName":"Advanced gamepad vibration","functionType":"Action","name":"A_Advanced_Vibration_Controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { clamp } = gdjs.evtTools.common;","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);","const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","const player = gdjs._extensionController.getPlayer(playerId)","player.rumble.duration = duration;","player.rumble.elapsedTime = 0;","player.rumble.weakMagnitude = weakRumbleMagnitude;","player.rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"description":"Change a vibration on the specified controller. Incompatible with Firefox.","fullName":"Change gamepad active vibration","functionType":"Action","name":"A_Change_Vibration_Magnitude","sentence":"Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const { clamp } = gdjs.evtTools.common;","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;","const player = gdjs._extensionController.getPlayer(playerId);","const elapsedTime = player.rumble.elapsedTime || 0;","const originalDuration = player.rumble.duration || 1;","const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);","const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);","/** @type {Gamepad} */","const gamepad = gdjs._extensionController.getGamepad(playerId);","if (!gamepad) {"," // The gamepad is not connected."," return;","}","if (originalDuration - elapsedTime <= 0) return;","//Vibration work only on game in browser.","if (gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: 1000 * (originalDuration - elapsedTime),"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","","player.rumble.weakMagnitude = weakRumbleMagnitude;","player.rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"description":"Check if any button is released on a gamepad.","fullName":"Any gamepad button released","functionType":"Condition","name":"C_any_button_released","sentence":"Any button of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["\r","const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","const player = gdjs._extensionController.getPlayer(playerId)\r","eventsFunctionContext.returnValue = player.isAnyButtonReleased();"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the weak vibration motor on the gamepad of a player.","fullName":"Weak rumble magnitude","functionType":"Expression","name":"WeakVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the strong vibration motor on the gamepad of a player.","fullName":"Strong rumble magnitude","functionType":"Expression","name":"StrongVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"PlayerId","type":"expression"}],"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":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::PlatformerGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Platformer character behavior","extraInformation":["PlatformBehavior::PlatformerObjectBehavior"],"choices":[],"name":"PlatformerCharacter"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PlatformerCharacter"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"JumpButton"}]}]}},{"description":"Control a 3D physics character with a gamepad.","fullName":"3D platformer gamepad mapper","helpPath":"","iconUrl":"","name":"Platformer3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::StickForce"},"parameters":["",">","0","GamepadIdentifier","JoystickIdentifier",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SetForwardAngle"},"parameters":["Object","PhysicsCharacter3D","=","Gamepads::StickAngle(GamepadIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())"]},{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateStick"},"parameters":["Object","PhysicsCharacter3D","-90","Gamepads::StickForce(GamepadIdentifier, JoystickIdentifier)"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateJumpKey"},"parameters":["Object","PhysicsCharacter3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::Platformer3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics character","extraInformation":["Physics3D::PhysicsCharacter3D"],"choices":[],"name":"PhysicsCharacter3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Left","type":"Choice","label":"Walk joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"JoystickIdentifier"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCharacter3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"JoystickIdentifier"},{"propertyName":"JumpButton"}]}]}},{"description":"Control a 3D physics character with a gamepad.","fullName":"3D shooter gamepad mapper","helpPath":"","iconUrl":"","name":"Shooter3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::StickForce"},"parameters":["",">","0","GamepadIdentifier","WalkStick",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateStick"},"parameters":["Object","PhysicsCharacter3D","Gamepads::StickAngle(GamepadIdentifier, WalkStick)","Gamepads::StickForce(GamepadIdentifier, WalkStick)"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[JumpButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCharacter3D::SimulateJumpKey"},"parameters":["Object","PhysicsCharacter3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::Shooter3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics character","extraInformation":["Physics3D::PhysicsCharacter3D"],"choices":[],"name":"PhysicsCharacter3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Left","type":"Choice","label":"Walk joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"WalkStick"},{"value":"Right","type":"Choice","label":"Camera joystick","group":"Controls","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"CameraStick"},{"value":"A or Cross","type":"Choice","label":"Jump button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"JumpButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCharacter3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"WalkStick"},{"propertyName":"CameraStick"},{"propertyName":"JumpButton"}]}]}},{"description":"Control camera rotations with a gamepad.","fullName":"First person camera gamepad mapper","helpPath":"","iconUrl":"","name":"FirstPersonGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"TODO It's probably a bad idea to rotate the object around Y."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CurrentRotationSpeedZ","=","Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)"]},{"type":{"value":"SetAngle"},"parameters":["Object","+","CurrentRotationSpeedZ * TimeDelta()"]},{"type":{"value":"SetNumberVariable"},"parameters":["CurrentRotationSpeedY","=","Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)"]},{"type":{"value":"Scene3D::Base3DBehavior::SetRotationY"},"parameters":["Object","Object3D","+","CurrentRotationSpeedY * TimeDelta()"]},{"type":{"value":"Scene3D::Base3DBehavior::SetRotationY"},"parameters":["Object","Object3D","=","clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)"]},{"type":{"value":"Gamepads::FirstPersonGamepadMapper::LookFromObjectEyes"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.","fullName":"Look through object eyes","functionType":"Action","group":"Layers and cameras","name":"LookFromObjectEyes","private":true,"sentence":"Move the camera to look though _PARAM0_ eyes","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"CenterCameraOnObject"},"parameters":["","Object","","Object.Layer()",""]},{"type":{"value":"Scene3D::SetCameraZ"},"parameters":["","=","Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ","",""]},{"type":{"value":"Scene3D::SetCameraRotationX"},"parameters":["","=","- Object.Object3D::RotationY() + 90","GetArgumentAsString(\"Layer\")",""]},{"type":{"value":"Scene3D::SetCameraRotationY"},"parameters":["","=","Object.Object3D::RotationX()","GetArgumentAsString(\"Layer\")",""]},{"type":{"value":"SetCameraAngle"},"parameters":["","=","Object.Angle() + 90","Object.Layer()",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum horizontal rotation speed of the object.","fullName":"Maximum horizontal rotation speed","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationSpeedMax","sentence":"the maximum horizontal rotation speed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationSpeedMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationSpeedMax","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationSpeedMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationSpeedMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the horizontal rotation acceleration of the object.","fullName":"Horizontal rotation acceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationAcceleration","sentence":"the horizontal rotation acceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationAcceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationAcceleration","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationAcceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationAcceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the horizontal rotation deceleration of the object.","fullName":"Horizontal rotation deceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper horizontal rotation configuration","name":"HorizontalRotationDeceleration","sentence":"the horizontal rotation deceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["HorizontalRotationDeceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"HorizontalRotationDeceleration","group":"First person camera gamepad mapper horizontal rotation configuration","name":"SetHorizontalRotationDeceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["HorizontalRotationDeceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum vertical rotation speed of the object.","fullName":"Maximum vertical rotation speed","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationSpeedMax","sentence":"the maximum vertical rotation speed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationSpeedMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationSpeedMax","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationSpeedMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationSpeedMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the vertical rotation acceleration of the object.","fullName":"Vertical rotation acceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationAcceleration","sentence":"the vertical rotation acceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationAcceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationAcceleration","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationAcceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationAcceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the vertical rotation deceleration of the object.","fullName":"Vertical rotation deceleration","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalRotationDeceleration","sentence":"the vertical rotation deceleration","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalRotationDeceleration"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalRotationDeceleration","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalRotationDeceleration","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalRotationDeceleration","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the minimum vertical camera angle of the object.","fullName":"Minimum vertical camera angle","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalAngleMin","sentence":"the minimum vertical camera angle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalAngleMin"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalAngleMin","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalAngleMin","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalAngleMin","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the maximum vertical camera angle of the object.","fullName":"Maximum vertical camera angle","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper vertical rotation configuration","name":"VerticalAngleMax","sentence":"the maximum vertical camera angle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["VerticalAngleMax"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"VerticalAngleMax","group":"First person camera gamepad mapper vertical rotation configuration","name":"SetVerticalAngleMax","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["VerticalAngleMax","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"description":"the z position offset of the object.","fullName":"Z position offset","functionType":"ExpressionAndCondition","group":"First person camera gamepad mapper position configuration","name":"OffsetZ","sentence":"the z position offset","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["OffsetZ"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetZ","group":"First person camera gamepad mapper position configuration","name":"SetOffsetZ","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OffsetZ","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::FirstPersonGamepadMapper","type":"behavior"}],"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":"","type":"Behavior","label":"3D capability","extraInformation":["Scene3D::Base3DBehavior"],"choices":[],"name":"Object3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"Right","type":"Choice","label":"Camera joystick","choices":[{"label":"Left","value":"Left"},{"label":"Right","value":"Right"}],"name":"CameraStick"},{"value":"180","type":"Number","unit":"AngularSpeed","label":"Maximum rotation speed","group":"Horizontal rotation","name":"HorizontalRotationSpeedMax"},{"value":"360","type":"Number","label":"Rotation acceleration","group":"Horizontal rotation","name":"HorizontalRotationAcceleration"},{"value":"720","type":"Number","label":"Rotation deceleration","group":"Horizontal rotation","name":"HorizontalRotationDeceleration"},{"value":"120","type":"Number","unit":"AngularSpeed","label":"Maximum rotation speed","group":"Vertical rotation","name":"VerticalRotationSpeedMax"},{"value":"240","type":"Number","label":"Rotation acceleration","group":"Vertical rotation","name":"VerticalRotationAcceleration"},{"value":"480","type":"Number","label":"Rotation deceleration","group":"Vertical rotation","name":"VerticalRotationDeceleration"},{"value":"-90","type":"Number","unit":"DegreeAngle","label":"Minimum angle","group":"Vertical rotation","name":"VerticalAngleMin"},{"value":"90","type":"Number","unit":"DegreeAngle","label":"Maximum angle","group":"Vertical rotation","name":"VerticalAngleMax"},{"value":"0","type":"Number","unit":"Pixel","label":"Z position offset","group":"Position","name":"OffsetZ"},{"value":"0","type":"Number","unit":"AngularSpeed","label":"Current rotation speed Z","hidden":true,"name":"CurrentRotationSpeedZ"},{"value":"0","type":"Number","unit":"AngularSpeed","label":"Current rotation speed Y","hidden":true,"name":"CurrentRotationSpeedY"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"Object3D"},{"propertyName":"GamepadIdentifier"},{"propertyName":"CameraStick"},{"folderName":"Horizontal rotation","children":[{"propertyName":"HorizontalRotationSpeedMax"},{"propertyName":"HorizontalRotationAcceleration"},{"propertyName":"HorizontalRotationDeceleration"}]},{"folderName":"Vertical rotation","children":[{"propertyName":"VerticalRotationSpeedMax"},{"propertyName":"VerticalRotationAcceleration"},{"propertyName":"VerticalRotationDeceleration"},{"propertyName":"VerticalAngleMin"},{"propertyName":"VerticalAngleMax"}]},{"folderName":"Position","children":[{"propertyName":"OffsetZ"}]},{"propertyName":"CurrentRotationSpeedZ"},{"propertyName":"CurrentRotationSpeedY"}]}},{"description":"Control a 3D physics car with a gamepad.","fullName":"3D car gamepad mapper","helpPath":"","iconUrl":"","name":"PhysicsCar3DGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateLeftKey"},"parameters":["Object","PhysicsCar3D"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateRightKey"},"parameters":["Object","PhysicsCar3D"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","1","\"Left\"","\"Any\"",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateSteeringStick"},"parameters":["Object","PhysicsCar3D","Gamepads::StickForceX(GamepadIdentifier, \"Left\")"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","1","\"Right\"","\"Any\"",""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateSteeringStick"},"parameters":["Object","PhysicsCar3D","Gamepads::StickForceX(GamepadIdentifier, \"Right\")"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"LT\"","\"Up\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"RT\"","\"Up\""]}]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateAcceleratorStick"},"parameters":["Object","PhysicsCar3D","Gamepads::TriggerPressure(GamepadIdentifier, \"RT\") - Gamepads::TriggerPressure(GamepadIdentifier, \"LT\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","Buttons[HandBrakeButton]","\"Left\""]}],"actions":[{"type":{"value":"Physics3D::PhysicsCar3D::SimulateHandBrakeKey"},"parameters":["Object","PhysicsCar3D"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::PhysicsCar3DGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"3D physics car","extraInformation":["Physics3D::PhysicsCar3D"],"choices":[],"name":"PhysicsCar3D"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"B or Circle","type":"Choice","label":"Hand brake button","group":"Controls","choices":[{"label":"A or Cross","value":"A or Cross"},{"label":"B or Circle","value":"B or Circle"},{"label":"X or Square","value":"X or Square"},{"label":"Y or Triangle","value":"Y or Triangle"},{"label":"LB or L1","value":"LB or L1"},{"label":"RB or R1","value":"RB or R1"},{"label":"LT or L2","value":"LT or L2"},{"label":"RT or R2","value":"RT or R2"}],"name":"HandBrakeButton"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PhysicsCar3D"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"HandBrakeButton"}]}]}},{"description":"Control a top-down character with a gamepad.","fullName":"Top-down gamepad mapper","helpPath":"","iconUrl":"","name":"TopDownGamepadMapper","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","GamepadIdentifier",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseArrows","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","GamepadIdentifier","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseLeftStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")","Gamepads::StickForce(GamepadIdentifier, \"Left\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")","sign(Gamepads::StickForce(GamepadIdentifier, \"Left\"))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["UseRightStick","True",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(GamepadIdentifier, \"Right\")","Gamepads::StickForce(GamepadIdentifier, \"Right\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","sign(Gamepads::StickForce(GamepadIdentifier, \"Right\"))","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["StickMode","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","GamepadIdentifier","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::TopDownGamepadMapper","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Top-down movement behavior","extraInformation":["TopDownMovementBehavior::TopDownMovementBehavior"],"choices":[],"name":"TopDownMovement"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","group":"Controls","name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","group":"Controls","name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","group":"Controls","name":"UseRightStick"},{"value":"Analog","type":"Choice","label":"Stick mode","group":"Controls","choices":[{"label":"Analog","value":"Analog"},{"label":"360°","value":"360°"},{"label":"8 Directions","value":"8 Directions"}],"name":"StickMode"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"TopDownMovement"},{"propertyName":"GamepadIdentifier"},{"folderName":"Controls","children":[{"propertyName":"UseArrows"},{"propertyName":"UseLeftStick"},{"propertyName":"UseRightStick"},{"propertyName":"StickMode"}]}]}}],"eventsBasedObjects":[]},{"author":"","category":"Camera","dimension":"2D","extensionNamespace":"","fullName":"Smooth Camera","gdevelopVersion":">=5.5.222","helpPath":"/tutorials/follow-player-with-camera/","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=","name":"SmoothCamera","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg","shortDescription":"Smoothly scroll to follow an object.","version":"0.4.5","description":["The camera follows an object according to:","- a frame rate independent catch-up speed to make the scrolling from smooth to strong","- a maximum speed to do linear following ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) or slow down the camera when teleporting the object","- a follow-free zone to avoid scrolling on small movements","- an offset to see further in one direction","- an extra delay and catch-up speed to give an impression of speed (useful for dash)","- position forecasting and delay to simulate a cameraman response time","","A platformer dedicated behavior allows to switch of settings when the character is in air or on the floor. This can be used to stabilize the camera when jumping."],"origin":{"identifier":"SmoothCamera","name":"gdevelop-extension-store"},"tags":["camera","scrolling","follow","smooth","platformer","platform"],"authorIds":["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"],"dependencies":[],"globalVariables":[],"sceneVariables":[],"eventsFunctions":[],"eventsFunctionsFolderStructure":{"folderName":"__ROOT"},"eventsBasedBehaviors":[{"description":"Smoothly scroll to follow an object.","fullName":"Smooth Camera","helpPath":"","iconUrl":"","name":"SmoothCamera","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Update private properties through setters to check their values and initialize state."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetLeftwardSpeed"},"parameters":["Object","Behavior","LeftwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetRightwardSpeed"},"parameters":["Object","Behavior","RightwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","Behavior","UpwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","Behavior","DownwardSpeed","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetLeftwardSpeedMax"},"parameters":["Object","Behavior","LeftwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetRightwardSpeedMax"},"parameters":["Object","Behavior","RightwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","Behavior","UpwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","Behavior","DownwardSpeedMax","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaLeft"},"parameters":["Object","Behavior","FollowFreeAreaLeft","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaRight"},"parameters":["Object","Behavior","FollowFreeAreaRight","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","Behavior","FollowFreeAreaTop","log(1 - )"]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","Behavior","FollowFreeAreaBottom","log(1 - )"]},{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelay","=","CameraDelay"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BooleanVariable"},"parameters":["IsCalledManually","True",""]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::DoMoveCameraCloser"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera closer to the object. This action must be called after the object has moved for the frame.","fullName":"Move the camera closer","functionType":"Action","name":"MoveCameraCloser","sentence":"Move the camera closer to _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsCalledManually","True",""]},{"type":{"value":"SmoothCamera::SmoothCamera::DoMoveCameraCloser"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Move the camera closer to the object.","fullName":"Do move the camera closer","functionType":"Action","name":"DoMoveCameraCloser","private":true,"sentence":"Do move the camera closer _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::UpdateDelayedPosition"},"parameters":["Object","Behavior",""]},{"type":{"value":"SmoothCamera::SmoothCamera::UpdateForecastedPosition"},"parameters":["Object","Behavior",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["FollowOnX","True",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OldX","=","CameraX(Object.Layer(), 0)"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["",">","Object.Behavior::FreeAreaRight()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * LogLeftwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["","<","OldX - LeftwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","OldX - LeftwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["","<","Object.Behavior::FreeAreaLeft()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * LogRightwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterX"},"parameters":["",">","OldX + RightwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterX"},"parameters":["","=","OldX + RightwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["FollowOnY","True",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["OldY","=","CameraY(Object.Layer(), 0)"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["",">","Object.Behavior::FreeAreaBottom()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * LogUpwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["","<","OldY - UpwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","OldY - UpwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["","<","Object.Behavior::FreeAreaTop()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * LogDownwardSpeed)","Object.Layer()","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CameraCenterY"},"parameters":["",">","OldY + DownwardSpeedMax * TimeDelta()","Object.Layer()","0"]}],"actions":[{"type":{"value":"SetCameraCenterY"},"parameters":["","=","OldY + DownwardSpeedMax * TimeDelta()","Object.Layer()","0"]}]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Delay the camera according to a maximum speed and catch up the delay.","fullName":"Wait and catch up","functionType":"Action","name":"WaitAndCatchUp","sentence":"Delay the camera of _PARAM0_ during: _PARAM2_ seconds according to the maximum speed _PARAM3_;_PARAM4_ seconds and catch up in _PARAM5_ seconds","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Maybe the catch-up show be done in constant pixel speed instead of constant time speed."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["WaitingEnd","=","TimeFromStart() + NewWaitingDuration"]},{"type":{"value":"SetNumberVariable"},"parameters":["WaitingSpeedXMax","=","NewWaitingSpeedXMax"]},{"type":{"value":"SetNumberVariable"},"parameters":["WaitingSpeedYMax","=","NewWaitingSpeedYMax"]},{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelayCatchUpDuration","=","NewCatchUpDuration"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Wait and catch up\"","\"info\"","\"SmoothCamera\""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Waiting duration (in seconds)","name":"NewWaitingDuration","type":"expression"},{"description":"Waiting maximum camera target speed X","name":"NewWaitingSpeedXMax","type":"expression"},{"description":"Waiting maximum camera target speed Y","name":"NewWaitingSpeedYMax","type":"expression"},{"description":"Catch up duration (in seconds)","name":"NewCatchUpDuration","type":"expression"}],"objectGroups":[]},{"description":"Draw the targeted and actual camera position.","fullName":"Draw debug","functionType":"Action","name":"DrawDebug","sentence":"Draw targeted and actual camera position for _PARAM0_ on _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["ShapePainter","=","0"]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Path used by the forecasting","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]},{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"245;166;35\""]},{"type":{"value":"PrimitiveDrawing::BeginFillPath"},"parameters":["ShapePainter","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[0])"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::PathLineTo"},"parameters":["ShapePainter","Object.Variable(__SmoothCamera.ForecastHistoryX[Index])","Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::EndFillPath"},"parameters":["ShapePainter"]}]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Follow-free area.","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaLeft","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaRight","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaTop","!=","0"]},{"type":{"value":"NumberVariable"},"parameters":["FollowFreeAreaBottom","!=","0"]}]}],"actions":[{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"126;211;33\""]},{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["ShapePainter","Object.Behavior::FreeAreaLeft() - 1","Object.Behavior::FreeAreaTop() - 1","Object.Behavior::FreeAreaRight() + 1","Object.Behavior::FreeAreaBottom() + 1"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Linear regression vector used by the forecasting.","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::OutlineColor"},"parameters":["ShapePainter","\"208;2;27\""]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","ProjectedOldestX","ProjectedOldestY","ProjectedNewestX","ProjectedNewestY","1"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Targeted and actual camera position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PrimitiveDrawing::Circle"},"parameters":["ShapePainter","ForecastedX","ForecastedY","3"]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","CameraX(Object.Layer(), 0)","CameraY(Object.Layer(), 0) - 4","CameraX(Object.Layer(), 0)","CameraY(Object.Layer(), 0) + 4","1"]},{"type":{"value":"PrimitiveDrawing::LineV2"},"parameters":["ShapePainter","CameraX(Object.Layer(), 0) - 4","CameraY(Object.Layer(), 0)","CameraX(Object.Layer(), 0) + 4","CameraY(Object.Layer(), 0)","1"]}]}],"parameters":[]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Shape painter","name":"ShapePainter","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"objectList"}],"objectGroups":[]},{"description":"Enable or disable the following on X axis.","fullName":"Follow on X","functionType":"Action","group":"Camera configuration","name":"SetFollowOnX","sentence":"The camera follows _PARAM0_ on X axis: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnX","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnX","True",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow on X axis","name":"Value","type":"yesorno"}],"objectGroups":[]},{"description":"Enable or disable the following on Y axis.","fullName":"Follow on Y","functionType":"Action","group":"Camera configuration","name":"SetFollowOnY","sentence":"The camera follows _PARAM0_ on Y axis: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnY","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["FollowOnY","True",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow on Y axis","name":"Value","type":"yesorno"}],"objectGroups":[]},{"description":"Change the camera follow free area right border.","fullName":"Follow free area right border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaRight","sentence":"Change the camera follow free area right border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaRight","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area right border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area left border.","fullName":"Follow free area left border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaLeft","sentence":"Change the camera follow free area left border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaLeft","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area left border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area top border.","fullName":"Follow free area top border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaTop","sentence":"Change the camera follow free area top border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaTop","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area top border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera follow free area bottom border.","fullName":"Follow free area bottom border","functionType":"Action","group":"Camera configuration","name":"SetFollowFreeAreaBottom","sentence":"Change the camera follow free area bottom border of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["FollowFreeAreaBottom","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Follow free area bottom border","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera leftward maximum speed (in pixels per second).","fullName":"Leftward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetLeftwardSpeedMax","sentence":"Change the camera leftward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["LeftwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Leftward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera rightward maximum speed (in pixels per second).","fullName":"Rightward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetRightwardSpeedMax","sentence":"Change the camera rightward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["RightwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Rightward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera upward maximum speed (in pixels per second).","fullName":"Upward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetUpwardSpeedMax","sentence":"Change the camera upward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["UpwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Upward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera downward maximum speed (in pixels per second).","fullName":"Downward maximum speed","functionType":"Action","group":"Camera configuration","name":"SetDownwardSpeedMax","sentence":"Change the camera downward maximum speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DownwardSpeedMax","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Downward maximum speed (in pixels per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera leftward catch-up speed (in ratio per second).","fullName":"Leftward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetLeftwardSpeed","sentence":"Change the camera leftward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["LeftwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogLeftwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Leftward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera rightward catch-up speed (in ratio per second).","fullName":"Rightward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetRightwardSpeed","sentence":"Change the camera rightward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["RightwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogRightwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Rightward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera downward catch-up speed (in ratio per second).","fullName":"Downward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetDownwardSpeed","sentence":"Change the camera downward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DownwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogDownwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Downward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera upward catch-up speed (in ratio per second).","fullName":"Upward catch-up speed","functionType":"Action","group":"Camera configuration","name":"SetUpwardSpeed","sentence":"Change the camera upward catch-up speed of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["UpwardSpeed","=","clamp(0, 1, Value)"]},{"type":{"value":"SetNumberVariable"},"parameters":["LogUpwardSpeed","=","log(1 - Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Upward catch-up speed (in ratio per second)","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"the camera offset on X axis of the object. This is not the current difference between the object and the camera position.","fullName":"Camera offset X","functionType":"ExpressionAndCondition","group":"Camera configuration","name":"OffsetX","sentence":"the camera offset on X axis","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraOffsetX"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetX","group":"Camera configuration","name":"SetOffsetXOp","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraOffsetX","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Change the camera offset on X axis of an object.","fullName":"Camera Offset X","functionType":"Action","group":"Camera configuration","name":"SetOffsetX","private":true,"sentence":"Change the camera offset on X axis of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Deprecated use SetOffsetXOp instead."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetOffsetXOp"},"parameters":["Object","Behavior","=","Value",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera offset X","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"the camera offset on Y axis of the object. This is not the current difference between the object and the camera position.","fullName":"Camera offset Y","functionType":"ExpressionAndCondition","group":"Camera configuration","name":"OffsetY","sentence":"the camera offset on Y axis","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraOffsetY"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"OffsetY","group":"Camera configuration","name":"SetOffsetYOp","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraOffsetY","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Change the camera offset on Y axis of an object.","fullName":"Camera Offset Y","functionType":"Action","group":"Camera configuration","name":"SetOffsetY","private":true,"sentence":"Change the camera offset on Y axis of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Deprecated use SetOffsetYOp instead."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetOffsetYOp"},"parameters":["Object","Behavior","=","CameraOffsetY",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera offset Y","name":"CameraOffsetY","type":"expression"}],"objectGroups":[]},{"description":"Change the camera forecast time (in seconds).","fullName":"Forecast time","functionType":"Action","group":"Camera configuration","name":"SetForecastTime","sentence":"Change the camera forecast time of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastTime","=","min(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Forecast time","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Change the camera delay (in seconds).","fullName":"Camera delay","functionType":"Action","group":"Camera configuration","name":"SetCameraDelay","sentence":"Change the camera delay of _PARAM0_: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelay","=","max(0, Value)"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Camera delay","name":"Value","type":"expression"}],"objectGroups":[]},{"description":"Return follow free area left border X.","fullName":"Free area left","functionType":"Expression","group":"Private","name":"FreeAreaLeft","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedX + CameraOffsetX - FollowFreeAreaLeft"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area right border X.","fullName":"Free area right","functionType":"Expression","group":"Private","name":"FreeAreaRight","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedX + CameraOffsetX + FollowFreeAreaRight"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area bottom border Y.","fullName":"Free area bottom","functionType":"Expression","group":"Private","name":"FreeAreaBottom","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedY + CameraOffsetY + FollowFreeAreaBottom"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return follow free area top border Y.","fullName":"Free area top","functionType":"Expression","group":"Private","name":"FreeAreaTop","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["ForecastedY + CameraOffsetY - FollowFreeAreaTop"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Update delayed position and delayed history. This is called in doStepPreEvents.","fullName":"Update delayed position","functionType":"Action","group":"Private","name":"UpdateDelayedPosition","private":true,"sentence":"Update delayed position and delayed history of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)","=","0"]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectTime","TimeFromStart()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectX","DelayedCenterX"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectY","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Use the object center when no delay is asked."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","Object.CenterX()"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","Object.CenterY()"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::AddForecastHistoryPosition"},"parameters":["Object","Behavior","TimeFromStart()","Object.CenterX()","Object.CenterY()",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]},{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectTime","TimeFromStart()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectX","Object.CenterX()"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ObjectY","Object.CenterY()"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting."},{"infiniteLoopWarning":true,"type":"BuiltinCommonInstructions::While","whileConditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)",">=","2"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ObjectTime[1]","<","TimeFromStart() - Object.Behavior::CurrentDelay()"]}],"conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::AddForecastHistoryPosition"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ObjectTime[0])","Object.Variable(__SmoothCamera.ObjectX[0])","Object.Variable(__SmoothCamera.ObjectY[0])",""]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectTime","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectX","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ObjectY","0"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Don't move the camera if there is not enough history."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","Object.Variable(__SmoothCamera.ObjectX[0])"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","Object.Variable(__SmoothCamera.ObjectY[0])"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ObjectTime)",">=","2"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ObjectTime[0]","<","TimeFromStart() - Object.Behavior::CurrentDelay()"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraExtraDelay","+","max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Extra delay: \" + ToString(CameraExtraDelay)","\"info\"","\"SmoothCamera\""]}]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The time with delay is now between the first 2 indexes"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterX","=","lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"]},{"type":{"value":"SetNumberVariable"},"parameters":["DelayedCenterY","=","lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsDelayed"},"parameters":["Object","Behavior",""]},{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]}],"actions":[{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectTime"]},{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectX"]},{"type":{"value":"ObjectVariableClearChildren"},"parameters":["Object","__SmoothCamera.ObjectY"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraDelayCatchUpSpeed","=","CameraExtraDelay / CameraDelayCatchUpDuration"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Start to catch up\"","\"info\"","\"SmoothCamera\""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SmoothCamera::SmoothCamera::IsWaiting"},"parameters":["Object","Behavior",""]},{"type":{"value":"NumberVariable"},"parameters":["CameraExtraDelay",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["CameraExtraDelay","=","max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Catching up delay: \" + ToString(CameraExtraDelay)","\"info\"","\"SmoothCamera\""]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Check if the camera following target is delayed from the object.","fullName":"Camera is delayed","functionType":"Condition","name":"IsDelayed","private":true,"sentence":"The camera of _PARAM0_ is delayed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.Behavior::CurrentDelay()",">","0"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Return the current camera delay.","fullName":"Current delay","functionType":"Expression","name":"CurrentDelay","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["CameraDelay + CameraExtraDelay"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Check if the camera following is waiting at a reduced speed.","fullName":"Camera is waiting","functionType":"Condition","name":"IsWaiting","private":true,"sentence":"The camera of _PARAM0_ is waiting","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["WaitingEnd",">","TimeFromStart()"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Add a position to the history for forecasting. This is called 2 times in UpadteDelayedPosition.","fullName":"Add forecast history position","functionType":"Action","group":"Private","name":"AddForecastHistoryPosition","private":true,"sentence":"Add the time:_PARAM2_ and position: _PARAM3_; _PARAM4_ to the forecast history of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["ForecastHistoryDuration",">","0"]},{"type":{"value":"NumberVariable"},"parameters":["ForecastTime",">","0"]}]}],"actions":[{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime","Time"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryX","ObjectX"]},{"type":{"value":"ObjectVariablePushNumber"},"parameters":["Object","__SmoothCamera.ForecastHistoryY","ObjectY"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions."},{"infiniteLoopWarning":true,"type":"BuiltinCommonInstructions::While","whileConditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">=","3"]},{"type":{"value":"VarObjet"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime[0]","<","TimeFromStart() - CameraDelay - CameraExtraDelay - ForecastHistoryDuration"]}],"conditions":[],"actions":[{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryTime","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryX","0"]},{"type":{"value":"ObjectVariableRemoveAt"},"parameters":["Object","__SmoothCamera.ForecastHistoryY","0"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"Time","name":"Time","type":"expression"},{"description":"Object X","name":"ObjectX","type":"expression"},{"description":"Object Y","name":"ObjectY","type":"expression"}],"objectGroups":[]},{"description":"Update forecasted position. This is called in doStepPreEvents.","fullName":"Update forecasted position","functionType":"Action","group":"Private","name":"UpdateForecastedPosition","private":true,"sentence":"Update forecasted position of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","DelayedCenterX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",">=","2"]},{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"NumberVariable"},"parameters":["ForecastHistoryDuration",">","0"]},{"type":{"value":"NumberVariable"},"parameters":["ForecastTime",">","0"]}]}],"actions":[],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Mean X","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","+","Object.Variable(__SmoothCamera.ForecastHistoryX[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanX","/","Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Mean Y","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","+","Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryMeanY","/","Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Mean: \" + ToString(ForecastHistoryMeanX) + \" \" + ToString(ForecastHistoryMeanY)","",""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Variance and Covariance","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceX","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceY","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryCovariance","=","0"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}]},{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceX","+","pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryVarianceY","+","pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryCovariance","+","(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)"]},{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Variances: \" + ToString(ForecastHistoryVarianceX) + \" \" + ToString(ForecastHistoryVarianceY) + \" \" + ToString(ForecastHistoryCovariance)","\"info\"","\"SmoothCamera\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)","<","1"]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceY)","<","1"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","DelayedCenterX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","DelayedCenterY"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)",">=","1"]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceY)",">=","1"]}]}],"actions":[],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Linear function parameters","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)",">=","abs(ForecastHistoryVarianceY)"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearA","=","ForecastHistoryCovariance / ForecastHistoryVarianceX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearB","=","ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)","\"info\"","\"SmoothCamera\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Projection","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::ProjectHistoryEnds"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[0])","Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])","Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])",""]}]}],"parameters":[]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Axis permutation to avoid a ratio between 2 numbers near 0."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["abs(ForecastHistoryVarianceX)","<","abs(ForecastHistoryVarianceY)"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearA","=","ForecastHistoryCovariance / ForecastHistoryVarianceY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastHistoryLinearB","=","ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY"]}],"events":[{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)","\"info\"","\"SmoothCamera\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Projection","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::ProjectHistoryEnds"},"parameters":["Object","Behavior","Object.Variable(__SmoothCamera.ForecastHistoryY[0])","Object.Variable(__SmoothCamera.ForecastHistoryX[0])","Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])","Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Permute back axis"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","ProjectedOldestX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestX","=","ProjectedOldestY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestY","=","Index"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","ProjectedNewestX"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestX","=","ProjectedNewestY"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestY","=","Index"]}]}],"parameters":[]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Oldest: \" + ToString(ProjectedOldestX) + \" \" + ToString(ProjectedOldestY)","\"info\"","\"SmoothCamera\""]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Newest: \" + ToString(ProjectedNewestX) + \" \" + ToString(ProjectedNewestY)","\"info\"","\"SmoothCamera\""]}]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Forecasted position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedX","=","ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()"]},{"type":{"value":"SetNumberVariable"},"parameters":["ForecastedY","=","ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()"]}]},{"disabled":true,"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"Forecasted: \" + ToString(ForecastedX) + \" \" + ToString(ForecastedY)","\"info\"","\"SmoothCamera\""]}]}],"parameters":[]}],"parameters":[]}]}],"parameters":[]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]},{"description":"Project history ends position to have the vector on the line from linear regression. This function is only called by UpdateForecastedPosition.","fullName":"Project history ends","functionType":"Action","group":"Private","name":"ProjectHistoryEnds","private":true,"sentence":"Project history oldest: _PARAM2_;_PARAM3_ and newest position: _PARAM4_;_PARAM5_ of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestX","=","(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedNewestY","=","NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestX","=","(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"]},{"type":{"value":"SetNumberVariable"},"parameters":["ProjectedOldestY","=","OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"},{"description":"OldestX","name":"OldestX","type":"expression"},{"description":"OldestY","name":"OldestY","type":"expression"},{"description":"Newest X","name":"NewestX","type":"expression"},{"description":"Newest Y","name":"NewestY","type":"expression"}],"objectGroups":[]},{"description":"Return the ratio between forecast time and the duration of the history. This function is only called by UpdateForecastedPosition.","fullName":"Forecast time ratio","functionType":"Expression","group":"Private","name":"ForecastTimeRatio","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["- ForecastTime / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothCamera","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"onCreated"},{"functionName":"doStepPreEvents"},{"functionName":"MoveCameraCloser"},{"functionName":"DoMoveCameraCloser"},{"functionName":"WaitAndCatchUp"},{"functionName":"DrawDebug"},{"folderName":"Camera configuration","children":[{"functionName":"SetFollowOnX"},{"functionName":"SetFollowOnY"},{"functionName":"SetFollowFreeAreaRight"},{"functionName":"SetFollowFreeAreaLeft"},{"functionName":"SetFollowFreeAreaTop"},{"functionName":"SetFollowFreeAreaBottom"},{"functionName":"SetLeftwardSpeedMax"},{"functionName":"SetRightwardSpeedMax"},{"functionName":"SetUpwardSpeedMax"},{"functionName":"SetDownwardSpeedMax"},{"functionName":"SetLeftwardSpeed"},{"functionName":"SetRightwardSpeed"},{"functionName":"SetDownwardSpeed"},{"functionName":"SetUpwardSpeed"},{"functionName":"OffsetX"},{"functionName":"SetOffsetXOp"},{"functionName":"SetOffsetX"},{"functionName":"OffsetY"},{"functionName":"SetOffsetYOp"},{"functionName":"SetOffsetY"},{"functionName":"SetForecastTime"},{"functionName":"SetCameraDelay"}]},{"folderName":"Private","children":[{"functionName":"FreeAreaLeft"},{"functionName":"FreeAreaRight"},{"functionName":"FreeAreaBottom"},{"functionName":"FreeAreaTop"},{"functionName":"UpdateDelayedPosition"},{"functionName":"AddForecastHistoryPosition"},{"functionName":"UpdateForecastedPosition"},{"functionName":"ProjectHistoryEnds"},{"functionName":"ForecastTimeRatio"}]},{"functionName":"IsDelayed"},{"functionName":"CurrentDelay"},{"functionName":"IsWaiting"}]},"propertyDescriptors":[{"value":"0.9","type":"Number","label":"Leftward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"LeftwardSpeed"},{"value":"0.9","type":"Number","label":"Rightward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"RightwardSpeed"},{"value":"0.9","type":"Number","label":"Upward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"UpwardSpeed"},{"value":"0.9","type":"Number","label":"Downward catch-up speed (in ratio per second)","group":"Catch-up speed","name":"DownwardSpeed"},{"value":"true","type":"Boolean","label":"Follow on X axis","name":"FollowOnX"},{"value":"true","type":"Boolean","label":"Follow on Y axis","name":"FollowOnY"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area left border","group":"Position","advanced":true,"name":"FollowFreeAreaLeft"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area right border","group":"Position","advanced":true,"name":"FollowFreeAreaRight"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top border","group":"Position","advanced":true,"name":"FollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom border","group":"Position","advanced":true,"name":"FollowFreeAreaBottom"},{"value":"0","type":"Number","unit":"Pixel","label":"Camera offset X","group":"Position","advanced":true,"name":"CameraOffsetX"},{"value":"0","type":"Number","unit":"Pixel","label":"Camera offset Y","group":"Position","advanced":true,"name":"CameraOffsetY"},{"value":"0","type":"Number","unit":"Second","label":"Camera delay","group":"Timing","deprecated":true,"name":"CameraDelay"},{"value":"0","type":"Number","unit":"Second","label":"Forecast time","group":"Timing","deprecated":true,"name":"ForecastTime"},{"value":"0","type":"Number","unit":"Second","label":"Forecast history duration","group":"Timing","deprecated":true,"name":"ForecastHistoryDuration"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogLeftwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogRightwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogDownwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"LogUpwardSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"DelayedCenterX"},{"value":"","type":"Number","label":"","hidden":true,"name":"DelayedCenterY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryMeanX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryMeanY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryVarianceX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryCovariance"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryLinearA"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryLinearB"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastedX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastedY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedNewestX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedNewestY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedOldestX"},{"value":"","type":"Number","label":"","hidden":true,"name":"ProjectedOldestY"},{"value":"","type":"Number","label":"","hidden":true,"name":"ForecastHistoryVarianceY"},{"value":"","type":"Number","label":"Index (local variable)","hidden":true,"name":"Index"},{"value":"0","type":"Number","label":"","hidden":true,"name":"CameraDelayCatchUpSpeed"},{"value":"","type":"Number","label":"","hidden":true,"name":"CameraExtraDelay"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingSpeedXMax"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingSpeedYMax"},{"value":"","type":"Number","label":"","hidden":true,"name":"WaitingEnd"},{"value":"","type":"Number","label":"","hidden":true,"name":"CameraDelayCatchUpDuration"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Leftward maximum speed","group":"Maximum speed","advanced":true,"name":"LeftwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Rightward maximum speed","group":"Maximum speed","advanced":true,"name":"RightwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed","group":"Maximum speed","advanced":true,"name":"UpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed","group":"Maximum speed","advanced":true,"name":"DownwardSpeedMax"},{"value":"","type":"Number","label":"OldX (local variable)","hidden":true,"name":"OldX"},{"value":"","type":"Number","label":"OldY (local variable)","hidden":true,"name":"OldY"},{"value":"","type":"Boolean","label":"","hidden":true,"name":"IsCalledManually"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"folderName":"Catch-up speed","children":[{"propertyName":"LeftwardSpeed"},{"propertyName":"RightwardSpeed"},{"propertyName":"UpwardSpeed"},{"propertyName":"DownwardSpeed"}]},{"propertyName":"FollowOnX"},{"propertyName":"FollowOnY"},{"folderName":"Position","children":[{"propertyName":"FollowFreeAreaLeft"},{"propertyName":"FollowFreeAreaRight"},{"propertyName":"FollowFreeAreaTop"},{"propertyName":"FollowFreeAreaBottom"},{"propertyName":"CameraOffsetX"},{"propertyName":"CameraOffsetY"}]},{"folderName":"Timing","children":[{"propertyName":"CameraDelay"},{"propertyName":"ForecastTime"},{"propertyName":"ForecastHistoryDuration"}]},{"propertyName":"LogLeftwardSpeed"},{"propertyName":"LogRightwardSpeed"},{"propertyName":"LogDownwardSpeed"},{"propertyName":"LogUpwardSpeed"},{"propertyName":"DelayedCenterX"},{"propertyName":"DelayedCenterY"},{"propertyName":"ForecastHistoryMeanX"},{"propertyName":"ForecastHistoryMeanY"},{"propertyName":"ForecastHistoryVarianceX"},{"propertyName":"ForecastHistoryCovariance"},{"propertyName":"ForecastHistoryLinearA"},{"propertyName":"ForecastHistoryLinearB"},{"propertyName":"ForecastedX"},{"propertyName":"ForecastedY"},{"propertyName":"ProjectedNewestX"},{"propertyName":"ProjectedNewestY"},{"propertyName":"ProjectedOldestX"},{"propertyName":"ProjectedOldestY"},{"propertyName":"ForecastHistoryVarianceY"},{"propertyName":"Index"},{"propertyName":"CameraDelayCatchUpSpeed"},{"propertyName":"CameraExtraDelay"},{"propertyName":"WaitingSpeedXMax"},{"propertyName":"WaitingSpeedYMax"},{"propertyName":"WaitingEnd"},{"propertyName":"CameraDelayCatchUpDuration"},{"folderName":"Maximum speed","children":[{"propertyName":"LeftwardSpeedMax"},{"propertyName":"RightwardSpeedMax"},{"propertyName":"UpwardSpeedMax"},{"propertyName":"DownwardSpeedMax"}]},{"propertyName":"OldX"},{"propertyName":"OldY"},{"propertyName":"IsCalledManually"}]}},{"description":"Smoothly scroll to follow a character and stabilize the camera when jumping.","fullName":"Smooth platformer camera","helpPath":"","iconUrl":"","name":"SmoothPlatformerCamera","objectType":"","previewIconUrl":"","quickCustomizationVisibility":"hidden","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PlatformBehavior::IsJumping"},"parameters":["Object","PlatformerCharacter"]},{"type":{"inverted":true,"value":"PlatformBehavior::IsFalling"},"parameters":["Object","PlatformerCharacter"]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","SmoothCamera","FloorFollowFreeAreaTop",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","SmoothCamera","FloorFollowFreeAreaBottom",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","SmoothCamera","FloorUpwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","SmoothCamera","FloorDownwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","SmoothCamera","FloorUpwardSpeedMax",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","SmoothCamera","FloorDownwardSpeedMax",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"PlatformBehavior::IsJumping"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::IsFalling"},"parameters":["Object","PlatformerCharacter"]}]}],"actions":[{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"},"parameters":["Object","SmoothCamera","AirFollowFreeAreaTop",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"},"parameters":["Object","SmoothCamera","AirFollowFreeAreaBottom",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeed"},"parameters":["Object","SmoothCamera","AirUpwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeed"},"parameters":["Object","SmoothCamera","AirDownwardSpeed",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetUpwardSpeedMax"},"parameters":["Object","SmoothCamera","AirUpwardSpeedMax",""]},{"type":{"value":"SmoothCamera::SmoothCamera::SetDownwardSpeedMax"},"parameters":["Object","SmoothCamera","AirDownwardSpeedMax",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"SmoothCamera::SmoothPlatformerCamera","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"doStepPreEvents"}]},"propertyDescriptors":[{"value":"","type":"Behavior","label":"Platformer character behavior","extraInformation":["PlatformBehavior::PlatformerObjectBehavior"],"choices":[],"name":"PlatformerCharacter"},{"value":"","type":"Behavior","label":"Smooth camera behavior","extraInformation":["SmoothCamera::SmoothCamera"],"choices":[],"name":"SmoothCamera"},{"value":"","type":"Number","label":"","hidden":true,"name":"JumpOriginY"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top in the air","group":"Position","name":"AirFollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom in the air","group":"Position","name":"AirFollowFreeAreaBottom"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area top on the floor","group":"Position","name":"FloorFollowFreeAreaTop"},{"value":"0","type":"Number","unit":"Pixel","label":"Follow free area bottom on the floor","group":"Position","name":"FloorFollowFreeAreaBottom"},{"value":"0.95","type":"Number","label":"Upward speed in the air (in ratio per second)","group":"Catch-up speed","name":"AirUpwardSpeed"},{"value":"0.95","type":"Number","label":"Downward speed in the air (in ratio per second)","group":"Catch-up speed","name":"AirDownwardSpeed"},{"value":"0.9","type":"Number","label":"Upward speed on the floor (in ratio per second)","group":"Catch-up speed","name":"FloorUpwardSpeed"},{"value":"0.9","type":"Number","label":"Downward speed on the floor (in ratio per second)","group":"Catch-up speed","name":"FloorDownwardSpeed"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed in the air","group":"Maximum speed","name":"AirUpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed in the air","group":"Maximum speed","name":"AirDownwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Upward maximum speed on the floor","group":"Maximum speed","name":"FloorUpwardSpeedMax"},{"value":"9000","type":"Number","unit":"PixelSpeed","label":"Downward maximum speed on the floor","group":"Maximum speed","name":"FloorDownwardSpeedMax"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"PlatformerCharacter"},{"propertyName":"SmoothCamera"},{"propertyName":"JumpOriginY"},{"folderName":"Position","children":[{"propertyName":"AirFollowFreeAreaTop"},{"propertyName":"AirFollowFreeAreaBottom"},{"propertyName":"FloorFollowFreeAreaTop"},{"propertyName":"FloorFollowFreeAreaBottom"}]},{"folderName":"Catch-up speed","children":[{"propertyName":"AirUpwardSpeed"},{"propertyName":"AirDownwardSpeed"},{"propertyName":"FloorUpwardSpeed"},{"propertyName":"FloorDownwardSpeed"}]},{"folderName":"Maximum speed","children":[{"propertyName":"AirUpwardSpeedMax"},{"propertyName":"AirDownwardSpeedMax"},{"propertyName":"FloorUpwardSpeedMax"},{"propertyName":"FloorDownwardSpeedMax"}]}]}}],"eventsBasedObjects":[]},{"author":"Westboy31","category":"Visual effect","dimension":"2D","extensionNamespace":"","fullName":"Flash and transition painter","gdevelopVersion":">=5.5.222","helpPath":"","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vdmllLWZpbHRlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCA0TDIwIDdIMTdMMTUgNEgxM0wxNSA3SDEyTDEwIDRIOEwxMCA3SDdMNSA0SDRDMi45IDQgMiA0LjkgMiA2TDIgMThDMiAxOS4xIDIuOSAyMCA0IDIwSDIwQzIxLjEgMjAgMjIgMTkuMSAyMiAxOFY0SDE4TTExLjI1IDE1LjI1TDEwIDE4TDguNzUgMTUuMjVMNiAxNEw4Ljc1IDEyLjc1TDEwIDEwTDExLjI1IDEyLjc1TDE0IDE0TDExLjI1IDE1LjI1TTE2Ljk0IDExLjk0TDE2IDE0TDE1LjA2IDExLjk0TDEzIDExTDE1LjA2IDEwLjA2TDE2IDhMMTYuOTQgMTAuMDZMMTkgMTFMMTYuOTQgMTEuOTRaIiAvPjwvc3ZnPg==","name":"FlashTransitionPainter","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/movie-filter.svg","shortDescription":"Screen transitions painted with plain color fill using Shape Painter.","version":"0.2.0","description":["Paint transition effects","- Fade in, fade out","- Right to left","- Top to bottom","- Circular","","A blur effect can be added to the painter layer to smooth the transition."],"origin":{"identifier":"FlashTransitionPainter","name":"gdevelop-extension-store"},"tags":["flash","transition","effect"],"authorIds":[],"dependencies":[],"globalVariables":[],"sceneVariables":[],"eventsFunctions":[],"eventsFunctionsFolderStructure":{"folderName":"__ROOT"},"eventsBasedBehaviors":[{"description":"Paint all over the screen a color for a period of time.","fullName":"Flash and transition painter","helpPath":"","iconUrl":"","name":"FlashTransitionPainter","objectType":"PrimitiveDrawing::Drawer","previewIconUrl":"","eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPostEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Ensure shape painter properties are set correctly for this extension to work.\n"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PrimitiveDrawing::ClearBetweenFrames"},"parameters":["Object","no"]},{"type":{"value":"PrimitiveDrawing::OutlineSize"},"parameters":["Object","=","0"]},{"type":{"value":"PrimitiveDrawing::UseRelativeCoordinates"},"parameters":["Object",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","min(1, Object.ObjectTimerElapsedTime(\"__FlashTransitionPainter_Time\") / Duration)"]},{"type":{"value":"PrimitiveDrawing::Drawer::ClearShapes"},"parameters":["Object"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["Progress","=","1"]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior",""]},{"type":{"value":"PauseObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Direction","=","\"Backward\""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","1 - Progress"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Direction","=","\"Both\""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","min(2 * Progress, 2 * (1 - Progress))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["Progress",">","0"]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["Object","=","MaxOpacity"]}],"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Flash","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Flash\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillOpacity"},"parameters":["Object","=","MaxOpacity * Progress"]},{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","CameraBorderRight(Object.Layer())","CameraBorderBottom(Object.Layer())"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Horizontal","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"from left to right"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Horizontal\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","lerp(CameraBorderLeft(Object.Layer()), CameraBorderRight(Object.Layer()), Progress)","CameraBorderBottom(Object.Layer())"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Vertical","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"from top to bottom"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Vertical\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Rectangle"},"parameters":["Object","CameraBorderLeft(Object.Layer())","CameraBorderTop(Object.Layer())","CameraBorderRight(Object.Layer())","lerp(CameraBorderTop(Object.Layer()), CameraBorderBottom(Object.Layer()), Progress)"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Circular","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"A circle scale up from the middle."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Type","=","\"Circular\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::Circle"},"parameters":["Object","CameraCenterX(Object.Layer())","CameraCenterY(Object.Layer())","(DistanceBetweenPositions(0, 0, CameraWidth(Object.Layer()), CameraHeight(Object.Layer())) / 2 + 1) * Progress"]}]}],"parameters":[]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]},{"description":"Paint Effect.","fullName":"Paint Effect","functionType":"Action","name":"PaintEffect","sentence":"Paint effect type _PARAM4_ of _PARAM0_ with direction _PARAM5_ and color _PARAM2_ for _PARAM3_ seconds","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BehaviorActivated"},"parameters":["Object","Behavior"]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Object","Behavior","yes"]},{"type":{"value":"UnPauseObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]},{"type":{"value":"ResetObjectTimer"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]},{"type":{"value":"SetNumberVariable"},"parameters":["Duration","=","NewDuration"]},{"type":{"value":"SetStringVariable"},"parameters":["Direction","=","NewDirection"]},{"type":{"value":"SetNumberVariable"},"parameters":["Progress","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["Type","=","\"Flash\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["NewType","!=","\"\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["Type","=","NewType"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["Color","!=","\"\""]}],"actions":[{"type":{"value":"PrimitiveDrawing::FillColor"},"parameters":["Object","Color"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["MaxOpacity","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["NewMaxOpacity","!=","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["MaxOpacity","=","NewMaxOpacity"]}]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"},{"description":"Color","name":"Color","type":"color"},{"description":"Duration","name":"NewDuration","type":"expression"},{"description":"Type of effect ","name":"NewType","supplementaryInformation":"[\"Flash\",\"Horizontal\",\"Vertical\",\"Circular\"]","type":"stringWithSelector"},{"description":"Direction transition","name":"NewDirection","supplementaryInformation":"[\"Both\",\"Forward\",\"Backward\"]","type":"stringWithSelector"},{"description":"End opacity","name":"NewMaxOpacity","type":"expression"}],"objectGroups":[]},{"description":"Paint effect ended.","fullName":"Paint effect ended ","functionType":"Condition","name":"PaintEffectIsEnd","sentence":"When paint effect of _PARAM0_ ends","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimerPaused"},"parameters":["Object","\"__FlashTransitionPainter_Time\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PrimitiveDrawing::Drawer","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"FlashTransitionPainter::FlashTransitionPainter","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"onCreated"},{"functionName":"doStepPostEvents"},{"functionName":"PaintEffect"},{"functionName":"PaintEffectIsEnd"}]},"propertyDescriptors":[{"value":"0","type":"Number","unit":"Dimensionless","label":"","hidden":true,"name":"Progress"},{"value":"0","type":"Number","label":"","hidden":true,"name":"Duration"},{"value":"","type":"String","label":"Type of effect ","hidden":true,"name":"Type"},{"value":"","type":"String","label":"Direction of transition","hidden":true,"name":"Direction"},{"value":"255","type":"Number","label":"The maximum of the opacity only for flash","hidden":true,"name":"MaxOpacity"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"Progress"},{"propertyName":"Duration"},{"propertyName":"Type"},{"propertyName":"Direction"},{"propertyName":"MaxOpacity"}]}}],"eventsBasedObjects":[]},{"author":"","category":"User interface","dimension":"2D","extensionNamespace":"","fullName":"Labeled 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":"Resizeable button with a label.","version":"2.2.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,"colorR":74,"creationTime":0,"name":"Finite state machine","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The \"Validated\" state only last one frame."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"Validated\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Idle\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Check position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Make sure the cursor position is only checked once per frame."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["MouseIsInside","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldCheckHovering","True",""]},{"type":{"value":"CollisionPoint"},"parameters":["Object","MouseOnlyCursorX(Object.Layer(), 0)","MouseOnlyCursorY(Object.Layer(), 0)"]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["MouseIsInside","True",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Touches are always pressed, so ShouldCheckHovering doesn't matter."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["TouchIsInside","False",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["TouchId","!=","0"]},{"type":{"value":"CollisionPoint"},"parameters":["Object","TouchX(TouchId, Object.Layer(), 0)","TouchY(TouchId, Object.Layer(), 0)"]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["TouchIsInside","True",""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Handle touch start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"HasAnyTouchOrMouseStarted"},"parameters":[""]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"StartedTouchOrMouseCount()","conditions":[],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CollisionPoint"},"parameters":["Object","TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)","TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["TouchId","=","StartedTouchOrMouseId(Index)"]},{"type":{"value":"SetBooleanVariable"},"parameters":["TouchIsInside","True",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"PressedInside\""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["Index","+","1"]}]}]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Apply position changes","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BooleanVariable"},"parameters":["MouseIsInside","True",""]},{"type":{"value":"StringVariable"},"parameters":["State","=","\"Hovered\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Idle\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["MouseIsInside","True",""]},{"type":{"value":"StringVariable"},"parameters":["State","=","\"Idle\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Hovered\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BooleanVariable"},"parameters":["TouchIsInside","True",""]},{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedInside\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"PressedOutside\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["TouchIsInside","True",""]},{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"PressedInside\""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Handle touch end","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"HasTouchEnded"},"parameters":["","TouchId"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["TouchId","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedInside\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Validated\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"StringVariable"},"parameters":["State","=","\"PressedInside\""]},{"type":{"inverted":true,"value":"StringVariable"},"parameters":["State","=","\"Validated\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Idle\""]}]}]}],"parameters":[]}],"parameters":[]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onDeActivate","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::ResetState"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Reset the state of the button.","fullName":"Reset state","functionType":"Action","name":"ResetState","private":true,"sentence":"Reset the button state of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["State","=","\"Idle\""]},{"type":{"value":"SetNumberVariable"},"parameters":["TouchId","=","0"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is not used.","fullName":"Is idle","functionType":"Condition","name":"IsIdle","sentence":"_PARAM0_ is idle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"Idle\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button was just clicked.","fullName":"Is clicked","functionType":"Condition","name":"IsClicked","sentence":"_PARAM0_ is clicked","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"Validated\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the cursor is hovered over the button.","fullName":"Is hovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ is hovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"Hovered\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is either hovered or pressed but not hovered.","fullName":"Is focused","functionType":"Condition","name":"IsFocused","sentence":"_PARAM0_ is focused","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"Hovered\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed with mouse or touch.","fullName":"Is pressed","functionType":"Condition","name":"IsPressed","sentence":"_PARAM0_ is pressed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedInside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed outside with mouse or touch.","fullName":"Is held outside","functionType":"Condition","name":"IsPressedOutside","sentence":"_PARAM0_ is held outside","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["State","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"the touch id that is using the button or 0 if none.","fullName":"Touch id","functionType":"ExpressionAndCondition","name":"TouchId","sentence":"the touch id","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["TouchId"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"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","type":"Boolean","label":"","description":"Should check hovering","hidden":true,"name":"ShouldCheckHovering"},{"value":"Idle","type":"Choice","label":"State","choices":[{"label":"Idle","value":"Idle"},{"label":"Hovered","value":"Hovered"},{"label":"PressedInside","value":"PressedInside"},{"label":"PressedOutside","value":"PressedOutside"},{"label":"Validated","value":"Validated"}],"hidden":true,"name":"State"},{"value":"0","type":"Number","label":"Touch id","hidden":true,"name":"TouchId"},{"value":"","type":"Boolean","label":"Touch is inside","hidden":true,"name":"TouchIsInside"},{"value":"","type":"Boolean","label":"Mouse is inside","hidden":true,"name":"MouseIsInside"},{"value":"","type":"Number","label":"","hidden":true,"name":"Index"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"ShouldCheckHovering"},{"propertyName":"State"},{"propertyName":"TouchId"},{"propertyName":"TouchIsInside"},{"propertyName":"MouseIsInside"},{"propertyName":"Index"}]}},{"description":"Change the text style when the button is hovered.","fullName":"Hover text style","helpPath":"","iconUrl":"","name":"TextStyleState","objectType":"TextObject::Text","previewIconUrl":"","private":true,"eventsFunctions":[{"description":"Check if isHovered.","fullName":"IsHovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ isHovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","True",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"TextObject::Text","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::TextStyleState","type":"behavior"}],"objectGroups":[]},{"description":"Change if isHovered.","fullName":"IsHovered","functionType":"Action","name":"SetIsHovered","sentence":"_PARAM0_ isHovered: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","False",""]},{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsHovered","True",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["HoverFontSize",">","0"]}],"actions":[{"type":{"value":"SetNumberVariable"},"parameters":["IdleFontSize","=","Object.FontSize()"]},{"type":{"value":"TextObject::Text::SetFontSize"},"parameters":["Object","=","HoverFontSize"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["HoverColor","!=","\"\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["IdleColor","=","Object.Behavior::Color()"]},{"type":{"value":"TextObject::ChangeColor"},"parameters":["Object","HoverColor"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldEnableShadowOnHover","True",""]}],"actions":[{"type":{"value":"TextObject::ShowShadow"},"parameters":["Object",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldEnableOutlineOnHover","True",""]}],"actions":[{"type":{"value":"TextObject::Text::SetOutlineEnabled"},"parameters":["Object","yes"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","True",""]},{"type":{"value":"BooleanVariable"},"parameters":["Value","False",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsHovered","False",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["HoverFontSize",">","0"]}],"actions":[{"type":{"value":"TextObject::Text::SetFontSize"},"parameters":["Object","=","IdleFontSize"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["HoverColor","!=","\"\""]}],"actions":[{"type":{"value":"TextObject::ChangeColor"},"parameters":["Object","IdleColor"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldEnableShadowOnHover","True",""]}],"actions":[{"type":{"value":"TextObject::ShowShadow"},"parameters":["Object","no"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldEnableOutlineOnHover","True",""]}],"actions":[{"type":{"value":"TextObject::Text::SetOutlineEnabled"},"parameters":["Object","no"]}]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"TextObject::Text","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::TextStyleState","type":"behavior"},{"defaultValue":"yes","description":"IsHovered","name":"Value","optional":true,"type":"yesorno"}],"objectGroups":[]},{"description":"Return the text color","fullName":"Text color","functionType":"StringExpression","name":"Color","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {gdjs.TextRuntimeObject} */","const object = eventsFunctionContext.getObjects(\"Object\")[0];","","eventsFunctionContext.returnValue = object._color.join(\";\");"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"color"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"TextObject::Text","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::TextStyleState","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"IsHovered"},{"functionName":"SetIsHovered"},{"functionName":"Color"}]},"propertyDescriptors":[{"value":"","type":"Boolean","label":"Outline on hover","name":"ShouldEnableOutlineOnHover"},{"value":"","type":"Color","label":"Hover color","name":"HoverColor"},{"value":"","type":"Boolean","label":"Enable shadow on hover","name":"ShouldEnableShadowOnHover"},{"value":"0","type":"Number","unit":"Pixel","label":"Hover font size","name":"HoverFontSize"},{"value":"","type":"Boolean","label":"","hidden":true,"name":"IsHovered"},{"value":"0","type":"Number","unit":"Pixel","label":"Idle font size","hidden":true,"name":"IdleFontSize"},{"value":"","type":"Color","label":"Idle color","hidden":true,"name":"IdleColor"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"IsHovered"},{"propertyName":"HoverFontSize"},{"propertyName":"IdleFontSize"},{"propertyName":"HoverColor"},{"propertyName":"IdleColor"},{"propertyName":"ShouldEnableOutlineOnHover"},{"propertyName":"ShouldEnableShadowOnHover"}]}},{"description":"Change the text style when the button is hovered.","fullName":"Hover bitmap text style","helpPath":"","iconUrl":"","name":"BitmapTextStyleState","objectType":"BitmapText::BitmapTextObject","previewIconUrl":"","private":true,"eventsFunctions":[{"description":"Check if isHovered.","fullName":"IsHovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ isHovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","True",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"BitmapText::BitmapTextObject","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::BitmapTextStyleState","type":"behavior"}],"objectGroups":[]},{"description":"Change if isHovered.","fullName":"IsHovered","functionType":"Action","name":"SetIsHovered","sentence":"_PARAM0_ isHovered: _PARAM2_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","False",""]},{"type":{"value":"BooleanVariable"},"parameters":["Value","True",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsHovered","True",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["HoverColor","!=","\"\""]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["IdleColor","=","Object.Behavior::Color()"]},{"type":{"value":"BitmapText::SetTint"},"parameters":["Object","HoverColor"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"StringVariable"},"parameters":["HoverPrefix","!=","\"\""]},{"type":{"value":"StringVariable"},"parameters":["HoverSuffix","!=","\"\""]}]}],"actions":[{"type":{"value":"SetStringVariable"},"parameters":["IdleText","=","Object.Text::Value()"]},{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Object","Text","=","HoverPrefix + Object.Text::Value() + HoverSuffix"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["IsHovered","True",""]},{"type":{"value":"BooleanVariable"},"parameters":["Value","False",""]}],"actions":[{"type":{"value":"SetBooleanVariable"},"parameters":["IsHovered","False",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"StringVariable"},"parameters":["HoverColor","!=","\"\""]}],"actions":[{"type":{"value":"BitmapText::SetTint"},"parameters":["Object","IdleColor"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"StringVariable"},"parameters":["HoverPrefix","!=","\"\""]},{"type":{"value":"StringVariable"},"parameters":["HoverSuffix","!=","\"\""]}]}],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Object","Text","=","IdleText"]}]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"BitmapText::BitmapTextObject","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::BitmapTextStyleState","type":"behavior"},{"defaultValue":"yes","description":"IsHovered","name":"Value","optional":true,"type":"yesorno"}],"objectGroups":[]},{"description":"Return the text color","fullName":"Text color","functionType":"StringExpression","name":"Color","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {gdjs.BitmapTextRuntimeObject} */","const object = eventsFunctionContext.getObjects(\"Object\")[0];","","eventsFunctionContext.returnValue = object._tint.join(\";\");"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"color"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"BitmapText::BitmapTextObject","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::BitmapTextStyleState","type":"behavior"}],"objectGroups":[]}],"eventsFunctionsFolderStructure":{"folderName":"__ROOT","children":[{"functionName":"IsHovered"},{"functionName":"SetIsHovered"},{"functionName":"Color"}]},"propertyDescriptors":[{"value":"","type":"Color","label":"Hover color","name":"HoverColor"},{"value":"","type":"String","label":"Hover prefix","name":"HoverPrefix"},{"value":"","type":"String","label":"Hover suffix","name":"HoverSuffix"},{"value":"","type":"Boolean","label":"","hidden":true,"name":"IsHovered"},{"value":"","type":"String","label":"Idle text","hidden":true,"name":"IdleText"},{"value":"","type":"Color","label":"Idle color","hidden":true,"name":"IdleColor"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"IsHovered"},{"propertyName":"HoverPrefix"},{"propertyName":"HoverSuffix"},{"propertyName":"IdleText"},{"propertyName":"HoverColor"},{"propertyName":"IdleColor"}]}}],"eventsBasedObjects":[{"areaMaxX":256,"areaMaxY":64,"areaMaxZ":64,"areaMinX":0,"areaMinY":0,"areaMinZ":0,"assetStoreTag":"menu buttons","defaultName":"Button","description":"Button with a label.","fullName":"Labeled button","helpPath":"","iconUrl":"","isInnerAreaFollowingParentSize":true,"isUsingLegacyInstancesRenderer":false,"name":"PanelSpriteButton","previewIconUrl":"","objects":[{"assetStoreId":"","bold":false,"italic":false,"name":"Label","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"TextStyleState","type":"PanelSpriteButton::TextStyleState","ShouldEnableOutlineOnHover":false,"HoverColor":"","ShouldEnableShadowOnHover":false,"HoverFontSize":0.0,"IsHovered":false,"IdleFontSize":0.0,"IdleColor":""}],"string":"Text","font":"","textAlignment":"center","characterSize":20.0,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2.0,"shadowAngle":90.0,"shadowBlurRadius":2.0,"shadowColor":"0;0;0","shadowDistance":4.0,"shadowOpacity":127.0,"smoothed":true,"underlined":false,"text":"Text","font":"","textAlignment":"center","verticalTextAlignment":"center","characterSize":20.0,"lineHeight":0.0,"color":"0;0;0"}},{"assetStoreId":"","bottomMargin":0.0,"height":32.0,"leftMargin":0.0,"name":"Idle","rightMargin":0.0,"texture":"","tiled":false,"topMargin":0.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[{"folded":true,"name":"State","type":"string","value":"Idle"}],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"ButtonFSM","type":"PanelSpriteButton::ButtonFSM","ShouldCheckHovering":true}]},{"assetStoreId":"","bottomMargin":0.0,"height":32.0,"leftMargin":0.0,"name":"Hovered","rightMargin":0.0,"texture":"","tiled":false,"topMargin":0.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"Tween","type":"Tween::TweenBehavior"}]},{"assetStoreId":"","bottomMargin":0.0,"height":32.0,"leftMargin":0.0,"name":"Pressed","rightMargin":0.0,"texture":"","tiled":false,"topMargin":0.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false}]},{"assetStoreId":"","name":"BitmapLabel","type":"BitmapText::BitmapTextObject","variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"BitmapTextStyleState","type":"PanelSpriteButton::BitmapTextStyleState","HoverColor":"","HoverPrefix":"","HoverSuffix":"","IsHovered":false,"IdleText":"","IdleColor":""}],"content":{"text":"Text","opacity":255.0,"scale":1.0,"fontSize":20.0,"tint":"255;255;255","bitmapFontResourceName":"","textureAtlasResourceName":"","align":"center","verticalTextAlignment":"center"}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Label"},{"objectName":"BitmapLabel"},{"objectName":"Idle"},{"objectName":"Hovered"},{"objectName":"Pressed"}]},"objectsGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]},{"name":"Labels","objects":[{"name":"Label"},{"name":"BitmapLabel"}]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[]}],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":64.0,"layer":"","name":"Idle","persistentUuid":"24882334-eec8-403e-8bf1-70fc928a46e6","width":256.0,"x":0.0,"y":0.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":true,"depth":1.0,"height":64.0,"layer":"","name":"Label","persistentUuid":"3b29c95c-5363-4e25-bf47-eecf13e8a226","width":256.0,"x":0.0,"y":32.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"editionSettings":{"grid":false,"gridType":"rectangular","gridWidth":32.0,"gridHeight":32.0,"gridDepth":32.0,"gridOffsetX":0.0,"gridOffsetY":0.0,"gridOffsetZ":0.0,"gridColor":10401023.0,"gridAlpha":0.8,"snap":false,"zoomFactor":2.734375,"windowMask":false,"selectedLayer":"","gameEditorMode":"instances-editor"},"eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Create one background instance for of each state.\nOnly the instance for the current state is shown."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"Create"},"parameters":["","Hovered","0","0",""]},{"type":{"value":"Create"},"parameters":["","Pressed","0","0",""]},{"type":{"value":"ResizableCapability::ResizableBehavior::SetSize"},"parameters":["Hovered","Resizable","Idle.Width()","Idle.Height()"]},{"type":{"value":"ResizableCapability::ResizableBehavior::SetSize"},"parameters":["Pressed","Resizable","Idle.Width()","Idle.Height()"]},{"type":{"value":"Hide"},"parameters":["Hovered"]},{"type":{"value":"Hide"},"parameters":["Pressed"]},{"type":{"value":"SetZOrder"},"parameters":["Hovered","=","1"]},{"type":{"value":"SetZOrder"},"parameters":["Pressed","=","1"]},{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Labels","Text","=","LabelText"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]}]},{"fullName":"","functionType":"Action","name":"onHotReloading","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsPressed"},"parameters":["Object",""]}],"actions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::SetLabelOffset"},"parameters":["Object","=","PressedLabelOffsetY",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Labels","Text","=","LabelText"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPostEvents","sentence":"","events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Apply states","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Show the right background accordingly to the new state."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsIdle"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PanelSpriteButton::TextStyleState::SetIsHovered"},"parameters":["Label","TextStyleState","no",""]},{"type":{"value":"PanelSpriteButton::BitmapTextStyleState::SetIsHovered"},"parameters":["BitmapLabel","BitmapTextStyleState","no",""]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::SetLabelOffset"},"parameters":["Object","=","0",""]},{"type":{"value":"Show"},"parameters":["Idle",""]},{"type":{"value":"Hide"},"parameters":["Pressed"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Visible"},"parameters":["Hovered"]},{"type":{"value":"NumberVariable"},"parameters":["HoveredFadeOutDuration",">","0"]}],"actions":[{"type":{"value":"Tween::TweenBehavior::AddObjectOpacityTween2"},"parameters":["Hovered","Tween","\"Fadeout\"","0","\"linear\"","HoveredFadeOutDuration",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["HoveredFadeOutDuration","=","0"]}],"actions":[{"type":{"value":"Hide"},"parameters":["Hovered"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"OpacityCapability::OpacityBehavior::Value"},"parameters":["Hovered","Opacity","=","0"]}],"actions":[{"type":{"value":"Hide"},"parameters":["Hovered"]},{"type":{"value":"OpacityCapability::OpacityBehavior::SetValue"},"parameters":["Hovered","Opacity","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsHovered"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PanelSpriteButton::TextStyleState::SetIsHovered"},"parameters":["Label","TextStyleState","",""]},{"type":{"value":"PanelSpriteButton::BitmapTextStyleState::SetIsHovered"},"parameters":["BitmapLabel","BitmapTextStyleState","yes",""]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::SetLabelOffset"},"parameters":["Object","=","0",""]},{"type":{"value":"Hide"},"parameters":["Idle"]},{"type":{"value":"Show"},"parameters":["Hovered",""]},{"type":{"value":"Hide"},"parameters":["Pressed"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NumberVariable"},"parameters":["HoveredFadeOutDuration",">","0"]}],"actions":[{"type":{"value":"Tween::RemoveTween"},"parameters":["Hovered","Tween","\"Fadeout\""]},{"type":{"value":"OpacityCapability::OpacityBehavior::SetValue"},"parameters":["Hovered","Opacity","=","255"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsPressed"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PanelSpriteButton::TextStyleState::SetIsHovered"},"parameters":["Label","TextStyleState","no",""]},{"type":{"value":"PanelSpriteButton::BitmapTextStyleState::SetIsHovered"},"parameters":["BitmapLabel","BitmapTextStyleState","no",""]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::SetLabelOffset"},"parameters":["Object","=","PressedLabelOffsetY",""]},{"type":{"value":"Hide"},"parameters":["Idle"]},{"type":{"value":"Hide"},"parameters":["Hovered"]},{"type":{"value":"Show"},"parameters":["Pressed",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsFocused"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PanelSpriteButton::TextStyleState::SetIsHovered"},"parameters":["Label","TextStyleState","yes",""]},{"type":{"value":"PanelSpriteButton::BitmapTextStyleState::SetIsHovered"},"parameters":["BitmapLabel","BitmapTextStyleState","yes",""]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::SetLabelOffset"},"parameters":["Object","=","0",""]},{"type":{"value":"Hide"},"parameters":["Idle"]},{"type":{"value":"Show"},"parameters":["Hovered",""]},{"type":{"value":"Hide"},"parameters":["Pressed"]}]}],"parameters":[]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button is not used.","fullName":"Is idle","functionType":"Condition","name":"IsIdle","sentence":"_PARAM0_ is idle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsIdle"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button was just clicked.","fullName":"Is clicked","functionType":"Condition","name":"IsClicked","sentence":"_PARAM0_ is clicked","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsClicked"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the cursor is hovered over the button.","fullName":"Is hovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ is hovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsHovered"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button is either hovered or pressed but not hovered.","fullName":"Is focused","functionType":"Condition","name":"IsFocused","sentence":"_PARAM0_ is focused","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsFocused"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed with mouse or touch.","fullName":"Is pressed","functionType":"Condition","name":"IsPressed","sentence":"_PARAM0_ is pressed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsPressed"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Change the text of the button label.","fullName":"Label text","functionType":"Action","name":"SetLabelText","private":true,"sentence":"Change the text of _PARAM0_ to _PARAM1_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Labels","Text","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"},{"description":"Text","name":"Value","type":"string"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"LabelText","name":"SetLabelTextOp","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Labels","Text","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"the label text.","fullName":"Label text","functionType":"ExpressionAndCondition","name":"LabelText","sentence":"the label text","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnString"},"parameters":["Labels.Text::Value()"]}]}],"expressionType":{"type":"string"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"De/activate interactions with the button.","fullName":"De/activate interactions","functionType":"Action","name":"Activate","sentence":"Activate interactions with _PARAM0_: _PARAM1_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BooleanVariable"},"parameters":["ShouldActivate","True",""]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Idle","ButtonFSM","yes"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"BooleanVariable"},"parameters":["ShouldActivate","True",""]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Idle","ButtonFSM","no"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"},{"description":"Activate","name":"ShouldActivate","type":"yesorno"}],"objectGroups":[]},{"description":"Check if interactions are activated on the button.","fullName":"Interactions activated","functionType":"Condition","name":"IsActivated","sentence":"Interactions on _PARAM0_ are activated","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BehaviorActivated"},"parameters":["Idle","ButtonFSM"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"the labelOffset of the object.","fullName":"LabelOffset","functionType":"ExpressionAndCondition","name":"LabelOffset","private":true,"sentence":"the labelOffset","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["LabelOffset"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"fullName":"","functionType":"ActionWithOperator","getterName":"LabelOffset","name":"SetLabelOffset","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetCenterY"},"parameters":["Labels","+","Value - LabelOffset"]},{"type":{"value":"SetNumberVariable"},"parameters":["LabelOffset","=","Value"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"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":"","type":"MultilineString","label":"Label","name":"LabelText"},{"value":"0.25","type":"Number","unit":"Second","label":"Hovered fade out duration","group":"States","name":"HoveredFadeOutDuration"},{"value":"0","type":"Number","unit":"Pixel","label":"Label offset on Y axis when pressed","group":"States","name":"PressedLabelOffsetY"},{"value":"0","type":"Number","unit":"Pixel","label":"","group":"States","hidden":true,"name":"LabelOffset"},{"value":"","type":"Choice","label":"","choices":[{"label":"Label.Text=LabelText","value":"Label.Text=LabelText"},{"label":"BitmapLabel.Text=LabelText","value":"BitmapLabel.Text=LabelText"}],"hidden":true,"name":"_PropertyMapping"}],"propertiesFolderStructure":{"folderName":"__ROOT","children":[{"propertyName":"LabelText"},{"propertyName":"_PropertyMapping"},{"folderName":"States","children":[{"propertyName":"HoveredFadeOutDuration"},{"propertyName":"PressedLabelOffsetY"},{"propertyName":"LabelOffset"}]}]},"variants":[{"areaMaxX":128,"areaMaxY":48,"areaMaxZ":64,"areaMinX":0,"areaMinY":0,"areaMinZ":0,"assetStoreAssetId":"80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf","assetStoreOriginalName":"Small Blue Button","name":"Small Blue Button","objects":[{"assetStoreId":"","bold":false,"italic":false,"name":"Label","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"TextStyleState","type":"PanelSpriteButton::TextStyleState","ShouldEnableOutlineOnHover":false,"HoverColor":"","ShouldEnableShadowOnHover":false,"HoverFontSize":0.0,"IsHovered":false,"IdleFontSize":0.0,"IdleColor":""}],"string":"Text","font":"","textAlignment":"center","characterSize":20.0,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2.0,"shadowAngle":90.0,"shadowBlurRadius":2.0,"shadowColor":"0;0;0","shadowDistance":4.0,"shadowOpacity":127.0,"smoothed":true,"underlined":false,"text":"Text","font":"","textAlignment":"center","verticalTextAlignment":"center","characterSize":20.0,"lineHeight":0.0,"color":"0;0;0"}},{"assetStoreId":"","bottomMargin":5.0,"height":32.0,"leftMargin":3.0,"name":"Idle","rightMargin":3.0,"texture":"assets\\Small Blue Button_Idle.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[{"folded":true,"name":"State","type":"string","value":"Idle"}],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"ButtonFSM","type":"PanelSpriteButton::ButtonFSM","ShouldCheckHovering":true}]},{"assetStoreId":"","bottomMargin":5.0,"height":32.0,"leftMargin":3.0,"name":"Hovered","rightMargin":3.0,"texture":"assets\\Small Blue Button_Hovered.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"Tween","type":"Tween::TweenBehavior"}]},{"assetStoreId":"","bottomMargin":3.0,"height":32.0,"leftMargin":3.0,"name":"Pressed","rightMargin":3.0,"texture":"assets\\Small Blue Button_Pressed.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false}]},{"assetStoreId":"","name":"BitmapLabel","type":"BitmapText::BitmapTextObject","variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"BitmapTextStyleState","type":"PanelSpriteButton::BitmapTextStyleState","HoverColor":"","HoverPrefix":"","HoverSuffix":"","IsHovered":false,"IdleText":"","IdleColor":""}],"content":{"text":"Button","opacity":255.0,"scale":1.0,"fontSize":20.0,"tint":"255;255;255","bitmapFontResourceName":"assets\\8BitOperatorPlus8Regular_Edited.fnt","textureAtlasResourceName":"assets\\8BitOperatorPlus8Regular_Edited.png","align":"center","verticalTextAlignment":"center"}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Label"},{"objectName":"BitmapLabel"},{"objectName":"Idle"},{"objectName":"Hovered"},{"objectName":"Pressed"}]},"objectsGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]},{"name":"Labels","objects":[{"name":"Label"},{"name":"BitmapLabel"}]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[]}],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":48.0,"layer":"","name":"Idle","persistentUuid":"24882334-eec8-403e-8bf1-70fc928a46e6","width":128.0,"x":0.0,"y":0.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":true,"depth":1.0,"height":48.0,"keepRatio":true,"layer":"","name":"BitmapLabel","persistentUuid":"c3c3200d-dec4-4ac4-9dc5-4715d8989830","width":128.0,"x":5.0,"y":26.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"editionSettings":[]},{"areaMaxX":68,"areaMaxY":28,"areaMaxZ":64,"areaMinX":0,"areaMinY":0,"areaMinZ":0,"assetStoreAssetId":"90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0","assetStoreOriginalName":"Tiny Blue Button","name":"Tiny Blue Button","objects":[{"assetStoreId":"","bold":false,"italic":false,"name":"Label","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"TextStyleState","type":"PanelSpriteButton::TextStyleState","ShouldEnableOutlineOnHover":false,"HoverColor":"","ShouldEnableShadowOnHover":false,"HoverFontSize":0.0,"IsHovered":false,"IdleFontSize":0.0,"IdleColor":""}],"string":"Text","font":"","textAlignment":"center","characterSize":20.0,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2.0,"shadowAngle":90.0,"shadowBlurRadius":2.0,"shadowColor":"0;0;0","shadowDistance":4.0,"shadowOpacity":127.0,"smoothed":true,"underlined":false,"text":"Text","font":"","textAlignment":"center","verticalTextAlignment":"center","characterSize":20.0,"lineHeight":0.0,"color":"0;0;0"}},{"assetStoreId":"","bottomMargin":5.0,"height":32.0,"leftMargin":3.0,"name":"Idle","rightMargin":3.0,"texture":"assets\\Small Blue Button_Idle.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[{"folded":true,"name":"State","type":"string","value":"Idle"}],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"ButtonFSM","type":"PanelSpriteButton::ButtonFSM","ShouldCheckHovering":true}]},{"assetStoreId":"","bottomMargin":5.0,"height":32.0,"leftMargin":3.0,"name":"Hovered","rightMargin":3.0,"texture":"assets\\Small Blue Button_Hovered.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false},{"name":"Tween","type":"Tween::TweenBehavior"}]},{"assetStoreId":"","bottomMargin":3.0,"height":32.0,"leftMargin":3.0,"name":"Pressed","rightMargin":3.0,"texture":"assets\\Small Blue Button_Pressed.png","tiled":false,"topMargin":3.0,"type":"PanelSpriteObject::PanelSprite","width":32.0,"variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":2.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"topEdgeAnchor":1.0,"useLegacyBottomAndRightAnchors":false}]},{"assetStoreId":"","name":"BitmapLabel","type":"BitmapText::BitmapTextObject","variables":[],"effects":[],"behaviors":[{"name":"Anchor","type":"AnchorBehavior::AnchorBehavior","bottomEdgeAnchor":4.0,"topEdgeAnchor":4.0,"leftEdgeAnchor":1.0,"relativeToOriginalWindowSize":true,"rightEdgeAnchor":2.0,"useLegacyBottomAndRightAnchors":false},{"name":"BitmapTextStyleState","type":"PanelSpriteButton::BitmapTextStyleState","HoverColor":"","HoverPrefix":"","HoverSuffix":"","IsHovered":false,"IdleText":"","IdleColor":""}],"content":{"text":"Button","opacity":255.0,"scale":0.5,"fontSize":20.0,"tint":"255;255;255","bitmapFontResourceName":"assets\\8BitOperatorPlus8Regular_Edited.fnt","textureAtlasResourceName":"assets\\8BitOperatorPlus8Regular_Edited.png","align":"center","verticalTextAlignment":"center"}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Label"},{"objectName":"BitmapLabel"},{"objectName":"Idle"},{"objectName":"Hovered"},{"objectName":"Pressed"}]},"objectsGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]},{"name":"Labels","objects":[{"name":"Label"},{"name":"BitmapLabel"}]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera2DPlaneMaxDrawingDistance":5000.0,"camera3DFarPlaneDistance":10000.0,"camera3DFieldOfView":45.0,"camera3DNearPlaneDistance":3.0,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0.0,"viewportBottom":1.0,"viewportLeft":0.0,"viewportRight":1.0,"viewportTop":0.0,"width":0.0}],"effects":[]}],"instances":[{"angle":0.0,"customSize":true,"depth":1.0,"height":28.0,"layer":"","name":"Idle","persistentUuid":"24882334-eec8-403e-8bf1-70fc928a46e6","width":68.0,"x":0.0,"y":0.0,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0.0,"customSize":true,"depth":1.04,"height":28.0,"layer":"","name":"BitmapLabel","persistentUuid":"c3c3200d-dec4-4ac4-9dc5-4715d8989830","width":64.0,"x":5.0,"y":14.0,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"editionSettings":[]}]}]}],"externalLayouts":[{"associatedLayout":"","name":"functions","instances":[],"editionSettings":{}}]} \ No newline at end of file diff --git a/assets/8BitOperatorPlus8Regular_Edited.fnt b/assets/8BitOperatorPlus8Regular_Edited.fnt new file mode 100644 index 0000000..def784a --- /dev/null +++ b/assets/8BitOperatorPlus8Regular_Edited.fnt @@ -0,0 +1,95 @@ +info face="8-bitOperatorPlus8-Regular" size=23 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=10,10,10,10 spacing=5,5 +common lineHeight=23 base=14 scaleW=392 scaleH=387 pages=1 packed=0 +page id=0 file="8BitOperatorPlus8Regular_Edited.png" +chars count=91 +char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=8 page=0 chnl=15 +char id=33 x=364 y=111 width=26 height=38 xoffset=-10 yoffset=-11.98 xadvance=6 page=0 chnl=15 +char id=34 x=288 y=152 width=34 height=30 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=35 x=52 y=0 width=36 height=36 xoffset=-10 yoffset=-9.98 xadvance=16 page=0 chnl=15 +char id=36 x=210 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=37 x=0 y=339 width=36 height=36 xoffset=-10 yoffset=-9.98 xadvance=16 page=0 chnl=15 +char id=38 x=210 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=39 x=364 y=76 width=28 height=30 xoffset=-10 yoffset=-11.98 xadvance=8 page=0 chnl=15 +char id=40 x=327 y=203 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=41 x=327 y=246 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=42 x=0 y=210 width=38 height=34 xoffset=-10 yoffset=-9.98 xadvance=18 page=0 chnl=15 +char id=43 x=288 y=78 width=34 height=34 xoffset=-10 yoffset=-9.98 xadvance=14 page=0 chnl=15 +char id=44 x=364 y=41 width=28 height=30 xoffset=-10 yoffset=-1.99 xadvance=8 page=0 chnl=15 +char id=45 x=327 y=0 width=32 height=26 xoffset=-10 yoffset=-5.99 xadvance=12 page=0 chnl=15 +char id=46 x=364 y=236 width=26 height=26 xoffset=-10 yoffset=0 xadvance=6 page=0 chnl=15 +char id=47 x=288 y=222 width=32 height=40 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=48 x=52 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=49 x=327 y=31 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=50 x=52 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=51 x=52 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=52 x=52 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=53 x=52 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=54 x=52 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=55 x=52 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=56 x=93 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=57 x=93 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=58 x=364 y=197 width=26 height=34 xoffset=-10 yoffset=-7.98 xadvance=6 page=0 chnl=15 +char id=59 x=364 y=0 width=28 height=36 xoffset=-10 yoffset=-7.98 xadvance=8 page=0 chnl=15 +char id=61 x=288 y=117 width=34 height=30 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=63 x=210 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=64 x=0 y=294 width=36 height=40 xoffset=-10 yoffset=-11.98 xadvance=16 page=0 chnl=15 +char id=65 x=93 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=66 x=93 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=67 x=93 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=68 x=132 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=69 x=132 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=70 x=132 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=71 x=132 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=72 x=132 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=73 x=327 y=160 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=74 x=132 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=75 x=132 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=76 x=132 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=77 x=0 y=46 width=38 height=38 xoffset=-10 yoffset=-11.98 xadvance=18 page=0 chnl=15 +char id=78 x=132 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=79 x=171 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=80 x=171 y=43 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=81 x=0 y=249 width=36 height=40 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=82 x=171 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=83 x=171 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=84 x=171 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=85 x=171 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=86 x=171 y=258 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=87 x=0 y=89 width=38 height=38 xoffset=-10 yoffset=-11.98 xadvance=18 page=0 chnl=15 +char id=88 x=171 y=301 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=89 x=171 y=344 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=90 x=210 y=0 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=91 x=327 y=289 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=93 x=327 y=332 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=94 x=288 y=187 width=34 height=30 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=95 x=288 y=353 width=32 height=26 xoffset=-12 yoffset=2 xadvance=8 page=0 chnl=15 +char id=97 x=249 y=41 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=98 x=93 y=86 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=99 x=249 y=80 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=100 x=93 y=129 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=101 x=249 y=119 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=102 x=288 y=267 width=32 height=38 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=103 x=210 y=258 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=104 x=93 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=105 x=327 y=74 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=106 x=52 y=41 width=34 height=40 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=107 x=93 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=108 x=327 y=117 width=30 height=38 xoffset=-10 yoffset=-11.98 xadvance=10 page=0 chnl=15 +char id=109 x=0 y=132 width=38 height=34 xoffset=-10 yoffset=-7.98 xadvance=18 page=0 chnl=15 +char id=110 x=249 y=158 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=111 x=249 y=197 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=112 x=210 y=299 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=113 x=210 y=340 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=114 x=249 y=236 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=115 x=249 y=275 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=116 x=288 y=310 width=32 height=38 xoffset=-10 yoffset=-11.98 xadvance=12 page=0 chnl=15 +char id=117 x=249 y=314 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=118 x=249 y=353 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=119 x=0 y=171 width=38 height=34 xoffset=-10 yoffset=-7.98 xadvance=18 page=0 chnl=15 +char id=120 x=288 y=0 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=121 x=249 y=0 width=34 height=36 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=122 x=288 y=39 width=34 height=34 xoffset=-10 yoffset=-7.98 xadvance=14 page=0 chnl=15 +char id=123 x=210 y=172 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=124 x=364 y=154 width=26 height=38 xoffset=-10 yoffset=-11.98 xadvance=6 page=0 chnl=15 +char id=125 x=210 y=215 width=34 height=38 xoffset=-10 yoffset=-11.98 xadvance=14 page=0 chnl=15 +char id=8470 x=0 y=0 width=47 height=41 xoffset=-13 yoffset=-8 xadvance=22 page=0 chnl=15 diff --git a/assets/8BitOperatorPlus8Regular_Edited.png b/assets/8BitOperatorPlus8Regular_Edited.png new file mode 100644 index 0000000000000000000000000000000000000000..1ebff0aa7ee38d39303be374db8a1e65955fe465 GIT binary patch literal 4317 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 FzW}Y0l4Jk? literal 0 HcmV?d00001 diff --git a/assets/Small Blue Button_Hovered.png b/assets/Small Blue Button_Hovered.png new file mode 100644 index 0000000000000000000000000000000000000000..16f208cb46228e46ae2256dae79d997a1d99b9d0 GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NS%G|oWRD45dI*UL`OvSj}Ky5HFasE6@fgvB=ZK zF(l*O+glrXn+*h7AC`AWYAC5_oaA^jk?{u0Mo#7wezgrAovKrmtRn&f9K;-~Ue-^& zdw2QscR7FS$kcwMxZ#i-{I0&#_@KvnX z*t+%2!)h=8cne3TX}aoH4I zswfr+D)NvP161g7u~?0^P)u!k=_&FM5Q+-OBO%GR^M!&f?Aa}Q_K$53^PT(U&b>Ex z?(fb$GxJTx>t1{&-G~kVU<$Uo`NH1~7*Waa9fVgL2Y{8j{|!NeKwt%^PzJ!CAklyZ z5CINy7y;Zgk9Bar;PE&DAV75rBm(3yTg)%{7rf!mJZ6W(Py0!SJpN~1r3*W-QMC`+ ziar7?PY;0y90(g6zR(9?8=#WO6f%iQp-^ZvDqY8bsl#CCEMKCpYw(H@XXPtK#>T76 zY|K}gTCX-Xws5qx-eAk+ayjNsn_sotWMj{@!<^t~G@1@WXBm^Z%+AEv#BRY2y#e&7 zSWE<*DZuOD2zog5E5Lzql5pBK4Fv;AAd<)wDvi#7230HoGey7?2_zDc2(`zc9uW0N zOH6EC$of9}D5h}+cJE~sP*=NFd}-(_e{Ny#+-S{Oa|=r=uER#hSDl=< zxw(7rw+lS|`~w1m-U!|q{^tIO$f)SI;u8`NB^^F;^!*Rg(vN?bAv$^L@7W)pK9h4+ zQh4FwrJ~ElC0C`DRn?zgtEsKO`PHr4vO9Ob{_g(wKQye#(VeaVB6>t$*8EX~4uOG6(xavq)-;dO@!Jaa8& z*_`Ejsyy%aeT0OEAj0(xC`jY9ws1O5jPg49<`*w9nQvb{OHoLV$`Dmpj{;#wD=K%sjm^XMv6Cp`9@_WdQom3&pUgXRbM%`E;RLkqS zhfy$?qY10DK|!;4A}YPUxMq*YqST&lAxT*%S?@%y@SZjcr6}NJpddsx>QE4^sYJmS z!OA9;&|DqQY53kd+%q{n6IzI&MboHZL6W8tfd-B$Ax|C8YY0s1P|7t!tX8X-Ac@GT zpk6$1$mgWt5PgUiWp+MG!wAiW|qvnUE-}>DrorQ?38wD-)s#{UJQE-I=qn{U> z+eZ4i?0$(zx=p%~0eZZ+J3qtO2p#IWIQ1ac;)pjQv z8RWz0=fx&xre1n{)Iw6$U?CBKg;K@bsc24{6PnNFOv|T6b0#9Pe{N)z+x9LN$=m{7 zERtWB?_!ZGt|b4DD@pMt=DKuW+rP%|iS5*753rS$6|XTr^TEYt?{a!rH{DbeO&Q9uc+%0#_OEd{u(?Q-;ME6vd zkgtl;v|ZEmgl3_@$mw44#{b}n8=pV^&OPlo@^QiDpi#Js4V@D|byskP3uj&Sx%|{t zpj8+Cbn@t@eZeT0IXAsLm4Ewwn{=C2&2KXs3;h;u%+)cx8g>tITRiLXJVhFDT&ose z6%5p!k3_-0IIKJCMl|Yb^_(|P{eU<(y~MKIB63@CMF^=8S_Z+ev} z!fVjBt@{t3hM$?ZcwfFNuI;Wh0z1S=mmMwuREQa>eI(dl6~5hf2LMOc!b^t_08m0v zN1!*;b>D@eG=ZCof7Fjd?G?0?tvYF)>^S_Ndv2^L+kGQ5w{v4Hsr(Sl z#X2EP>KydZBeXU_fiGT?@$QOK7g&D7t*Q!}2$M^8Uea%#Jlhqx>%?g7ZU^3r^Jc}v s|G=(5{%v~{nlj-Vy1wJbE=^lEuID0av@_ZX-p~LbaQAX6cio%%Po_hKg8%>k literal 0 HcmV?d00001 diff --git a/assets/tempTitle.png b/assets/tempTitle.png index 238b07673d4641614f5b45f3422cefdbaf2215c2..f82aec7b8db4c8aee2ec29a0db3cb1b498a905b6 100644 GIT binary patch delta 8686 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 delta 22507 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