{ "firstLayout": "", "gdVersion": { "build": 242, "major": 5, "minor": 5, "revision": 0 }, "properties": { "adaptGameResolutionAtRuntime": true, "antialiasingMode": "MSAA", "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "landscape", "packageName": "com.example.gamename", "pixelsRounding": false, "projectUuid": "51b32edd-2db2-459c-ae66-bca135668818", "scaleMode": "linear", "sizeOnStartupMode": "", "templateSlug": "starting-platformer", "version": "1.0.0", "name": "Save & load example", "description": "A simple example of the single action save & load system, here it creates a basic checkpoint system with flags.\nIf you touch a flag, the game is saved, and if you drown into lava, your last save is reloaded. \n\nIt also manipulates tweens & async tasks.", "author": "", "windowWidth": 1280, "windowHeight": 720, "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, "minDuration": 1.5, "progressBarColor": 16777215, "progressBarHeight": 20, "progressBarMaxWidth": 200, "progressBarMinWidth": 40, "progressBarWidthPercent": 30, "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/StartingPlayer.png", "kind": "image", "metadata": "", "name": "assets\\StartingPlayer.png", "smoothed": true, "userAdded": false }, { "file": "assets/StartingGround.png", "kind": "image", "metadata": "", "name": "assets\\StartingGround.png", "smoothed": true, "userAdded": false }, { "file": "assets/Background.png", "kind": "image", "metadata": "", "name": "assets\\Background.png", "smoothed": true, "userAdded": false }, { "file": "assets/StartingCoin.png", "kind": "image", "metadata": "", "name": "assets\\StartingCoin.png", "smoothed": true, "userAdded": false }, { "file": "assets/Top arrow button.png", "kind": "image", "metadata": "", "name": "Top arrow button.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/On-Screen Controls/Sprites/Flat Dark/e3943e1b23ceb90f00fc5e7c0481c5147b983fdc5397fb3690e102e53ce72d4f_Top arrow button.png", "name": "Top arrow button.png" } }, { "file": "assets/Flat dark joystick border.png", "kind": "image", "metadata": "", "name": "Flat dark joystick border.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/1db606cabd7372d1494ba5934bc25bcdd72f5a213c4a27509be57c3f4d5aecca_Flat dark joystick border.png", "name": "Flat dark joystick border.png" } }, { "file": "assets/Flat dark joystick thumb.png", "kind": "image", "metadata": "", "name": "Flat dark joystick thumb.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/10167ade22c4a6b48324e6c1d1bd6dc74179d7bed0775890903f418b4a05c8a1_Flat dark joystick thumb.png", "name": "Flat dark joystick thumb.png" } }, { "file": "assets/PickupCoin.wav", "kind": "audio", "metadata": "{\"extension\":\".wav\",\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.05,\\\"sustainPunch\\\":20,\\\"decay\\\":0.3,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":400,\\\"frequencySweep\\\":0,\\\"frequencyDeltaSweep\\\":0,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":15,\\\"frequencyJump1Amount\\\":25,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"whistle\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":85,\\\"squareDutySweep\\\":35,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"PickupCoin\"},\"localFilePath\":\"assets/PickupCoin.wav\"}", "name": "PickupCoin", "preloadAsMusic": false, "preloadAsSound": true, "preloadInCache": false, "userAdded": false }, { "file": "assets/Flag Blue.png", "kind": "image", "metadata": "", "name": "Flag Blue.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Breakable Physics/Flag/0aa9551296f8ec80d9b1267e686f7b7a49cfd578e87b24e3bab71664098f582c_Flag Blue.png", "name": "Flag Blue.png" } }, { "file": "assets/LightGlow.png", "kind": "image", "metadata": "", "name": "LightGlow.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Particles/GDevelop/c17e2d500015e598624b763f4942b26e3aac96efca094cd20257a61e15b27fcb_LightGlow.png", "name": "LightGlow.png" } }, { "file": "assets/Coins 8.aac", "kind": "audio", "metadata": "", "name": "c52f1dacc263a2a6dc94e712a2a148f909b73372fa8e0622cb237fdc6a72fd6c_Coins 8.aac", "preloadAsMusic": false, "preloadAsSound": false, "preloadInCache": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Arcade/Sound effects/Coins/c52f1dacc263a2a6dc94e712a2a148f909b73372fa8e0622cb237fdc6a72fd6c_Coins 8.aac", "name": "gdevelop-asset-store" } }, { "file": "assets/NewTiledSprite.png", "kind": "image", "metadata": "{\"extension\":\".png\",\"pskl\":{}}", "name": "NewTiledSprite", "smoothed": true, "userAdded": false }, { "file": "assets/Large sign.png", "kind": "image", "metadata": "", "name": "Large sign.png", "smoothed": true, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Other/184caf8844c91aff060202e8af13f21e6a7e2a70f4222518836b3015ce3cfa5b_Large sign.png", "name": "Large sign.png" } }, { "file": "assets/04 - Castle Nosferatu (Sega-style FM Synth Remix).aac", "kind": "audio", "metadata": "", "name": "dfcdb6ef0ded864b301b5cc57940b190e803b1ea53d057338043f3b8bcd2a138_04 - Castle Nosferatu (Sega-style FM Synth Remix).aac", "preloadAsMusic": false, "preloadAsSound": false, "preloadInCache": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/Ragnar Random/Fakebit Chiptune Music/dfcdb6ef0ded864b301b5cc57940b190e803b1ea53d057338043f3b8bcd2a138_04 - Castle Nosferatu (Sega-style FM Synth Remix).aac", "name": "gdevelop-asset-store" } }, { "file": "assets/Chi Chi the Bird_Aerial Attack.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Aerial Attack.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/1f9088295b372e57cc2217444a5bb5247eb8806100ab49169be5eedfb0b5a43c_Chi Chi the Bird_Aerial Attack.png", "name": "Chi Chi the Bird_Aerial Attack.png" } }, { "file": "assets/Chi Chi the Bird_Falling.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Falling.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/9dc7356e0994b87b58e91451c48ba58ed2c5a02e2e20991714760cdff61db268_Chi Chi the Bird_Falling.png", "name": "Chi Chi the Bird_Falling.png" } }, { "file": "assets/Chi Chi the Bird_Flapping Wings_1.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Flapping Wings_1.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/0695fb9e00620c3e49978a912115b8ec5e4c63bfc2950b7b7ea3bb540cef0b70_Chi Chi the Bird_Flapping Wings_1.png", "name": "Chi Chi the Bird_Flapping Wings_1.png" } }, { "file": "assets/Chi Chi the Bird_Flapping Wings_2.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Flapping Wings_2.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/aabf824203cc1da9650615de5a5302affe154a7d8f254fec183e8fdee2ce709c_Chi Chi the Bird_Flapping Wings_2.png", "name": "Chi Chi the Bird_Flapping Wings_2.png" } }, { "file": "assets/Chi Chi the Bird_Flapping Wings_3.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Flapping Wings_3.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/d4f211f8211c81ffbaae748150b236c67a07206f1d9536e3ba86d291e2570c8b_Chi Chi the Bird_Flapping Wings_3.png", "name": "Chi Chi the Bird_Flapping Wings_3.png" } }, { "file": "assets/Chi Chi the Bird_Hurt.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Hurt.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/f3a2cfe7ffc611d674d316e4797b4f973de5c018d79629d825bc89681e788f24_Chi Chi the Bird_Hurt.png", "name": "Chi Chi the Bird_Hurt.png" } }, { "file": "assets/Chi Chi the Bird_Standing.png", "kind": "image", "metadata": "", "name": "Chi Chi the Bird_Standing.png", "smoothed": false, "userAdded": false, "origin": { "identifier": "https://asset-resources.gdevelop.io/public-resources/GrafxKid Pack/Character Pack 1/Chi Chi the Bird/db7b414f5e1e6c385b901b1394fa14ee3892cd006a2c05ab96c9acd7c0790963_Chi Chi the Bird_Standing.png", "name": "Chi Chi the Bird_Standing.png" } } ], "resourceFolders": [] }, "objects": [], "objectsFolderStructure": { "folderName": "__ROOT" }, "objectsGroups": [], "variables": [ { "name": "Test", "type": "structure", "children": [] } ], "layouts": [ { "b": 255, "disableInputWhenNotFocused": true, "mangledName": "Game_32Scene", "name": "Game Scene", "r": 255, "standardSortMethod": true, "stopSoundsOnStartup": true, "title": "", "v": 255, "uiSettings": { "grid": false, "gridType": "rectangular", "gridWidth": 32, "gridHeight": 32, "gridOffsetX": 0, "gridOffsetY": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, "zoomFactor": 0.4633111824514028, "windowMask": false, "selectedLayer": "" }, "objectsGroups": [], "variables": [ { "name": "Saves", "type": "structure", "children": [ { "name": "Save", "type": "number", "value": 0 } ] }, { "name": "Time", "type": "number", "value": 0 }, { "name": "TimeStruct", "type": "structure", "children": [ { "name": "something.lol", "type": "structure", "children": [ { "name": "time", "type": "number", "value": 0 } ] } ] }, { "name": "Variable", "type": "number", "value": 0 }, { "name": "VariableExcludedFromSave", "type": "number", "value": 10 } ], "instances": [ { "angle": 0, "customSize": false, "height": 78.99999999999999, "keepRatio": true, "layer": "", "name": "Platformer_Character", "persistentUuid": "4ded1d81-e820-41d3-868a-3f314e5850bd", "width": 79, "x": 500, "y": 466, "zOrder": 31, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 720, "layer": "Background", "locked": true, "name": "Background", "persistentUuid": "9d4a2623-239c-44d1-95a4-076307aa3170", "width": 1280, "x": 0, "y": 0, "zOrder": -10, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "MobileControls", "name": "Joystick", "persistentUuid": "855d809a-f954-4072-86d5-1d6f0b24a066", "width": 0, "x": 131, "y": 604, "zOrder": 2, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 0, "height": 120, "keepRatio": true, "layer": "MobileControls", "name": "JumpButton", "persistentUuid": "b1d437ce-f3b4-4799-875e-bb51f731cef0", "width": 120, "x": 1104, "y": 576, "zOrder": 3, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "1c4f7ab9-04d4-4cee-8572-96199ce1245c", "width": 864, "x": 64, "y": 544, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "672ee5c6-d2bb-4ae4-bc77-78d15064dd68", "width": 288, "x": 1588, "y": 529, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "e595746c-dfaa-4c91-a246-d36934b5a906", "width": 288, "x": 1080, "y": 534, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 720, "layer": "Background", "locked": true, "name": "Background", "persistentUuid": "18b633b4-68e0-4420-85e8-766c67f4ad90", "width": 1280, "x": 10, "y": 10, "zOrder": -10, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "78286b2c-58ac-46ee-8324-67e5949d9cc3", "width": 288, "x": 2737, "y": 517, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "FlagBlue", "persistentUuid": "6c44e219-ac42-4abd-89fa-519914861a99", "width": 0, "x": 1196, "y": 462, "zOrder": 7, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "4267c4c2-2115-4233-9322-dff352e0ef53", "width": 74, "x": 1441, "y": 535, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 870, "keepRatio": true, "layer": "", "name": "NewTiledSprite", "persistentUuid": "12bea79e-0a5c-41fd-94cb-ef541f916d8b", "width": 4767, "x": -819, "y": 637, "zOrder": 17, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "FlagBlue", "persistentUuid": "14ba131e-f137-4724-b82d-3c4e9d8ae0ca", "width": 0, "x": 1717, "y": 457, "zOrder": 19, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "d04ed369-cb9d-4836-a26a-80ca84dd2147", "width": 74, "x": 2074, "y": 525, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 64, "keepRatio": true, "layer": "", "name": "Platform_Ground", "persistentUuid": "50fed9ae-f21b-402d-a28f-10ded8bddc0f", "width": 74, "x": 2383, "y": 528, "zOrder": 5, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 115, "keepRatio": true, "layer": "", "name": "LargeSign", "persistentUuid": "2b1658c7-c224-4bf1-b8a1-7b9f98b195e2", "width": 153, "x": 285, "y": 429, "zOrder": 20, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 23, "keepRatio": true, "layer": "", "name": "NewText", "persistentUuid": "2032a6b6-85c4-4a1b-915b-ed28743d3efd", "width": 191, "x": 261, "y": 457, "zOrder": 21, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 186, "keepRatio": true, "layer": "", "name": "LargeSign", "persistentUuid": "9ccd79c9-45ba-4c2b-82bb-bd12bfeebfe7", "width": 282, "x": 2739, "y": 334, "zOrder": 0, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 1, "height": 25, "keepRatio": true, "layer": "", "name": "NewText2", "persistentUuid": "d8cc938a-22ad-48b0-b30e-9ddc2758936c", "width": 132, "x": 2819, "y": 362, "zOrder": 1, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 6, "height": 94, "keepRatio": true, "layer": "", "name": "ChiChiTheBird", "persistentUuid": "5a2186ac-508e-4905-a4ab-6068772db57b", "width": 94, "x": 881, "y": 375, "zOrder": 32, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": true, "depth": 2, "height": 79, "keepRatio": true, "layer": "Background", "name": "NewText3", "persistentUuid": "68f06239-204d-4618-8730-a61ed8a54d8f", "width": 205, "x": 46, "y": 38, "zOrder": 33, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "Background", "name": "NewText4", "persistentUuid": "b47283df-582d-4c9a-915a-22ae8e090456", "width": 0, "x": 1209, "y": 25, "zOrder": 34, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "9800c3ed-b269-4cbe-bd66-ae8c30b8871f", "width": 0, "x": 738, "y": 476, "zOrder": 35, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "Background", "name": "NewText5", "persistentUuid": "54d8cf4c-d2ee-4a98-90da-da31d0d29388", "width": 0, "x": 21, "y": 101, "zOrder": 36, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "Background", "name": "NewText6", "persistentUuid": "5aec5eda-d63d-409f-bc14-0394320dfb33", "width": 0, "x": 19, "y": 135, "zOrder": 37, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "Background", "name": "SaveStatus", "persistentUuid": "60936079-e7b6-4680-8399-dc06bb742fe4", "width": 0, "x": 557, "y": 42, "zOrder": 38, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "Background", "name": "NewText7", "persistentUuid": "02ff696e-6d03-466c-9e4a-f993c4c45958", "width": 0, "x": 159, "y": 35, "zOrder": 39, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "749601b7-c699-47a6-81b8-d19b7cd5bca9", "width": 0, "x": 704, "y": 403, "zOrder": 40, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "502f29fe-fca1-4625-b194-49a701bda9cd", "width": 0, "x": 723, "y": 323, "zOrder": 41, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "65d4f46c-339a-4a2b-9870-799566c2456b", "width": 0, "x": 846, "y": 205, "zOrder": 42, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "3e848abb-3ab3-48ce-9176-23cd9be84fde", "width": 0, "x": 1094, "y": 185, "zOrder": 43, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "47351cf9-0485-4388-958c-94024dd13e9f", "width": 0, "x": 1219, "y": 263, "zOrder": 44, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, "customSize": false, "height": 0, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "8b305063-3f81-4ef4-accc-1f36ad1bed2d", "width": 0, "x": 1228, "y": 362, "zOrder": 45, "numberProperties": [], "stringProperties": [], "initialVariables": [] } ], "objects": [ { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Platformer_Character", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { "name": "PlatformerMultitouchMapper", "type": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", "Property": "PlatformerObject", "ControllerIdentifier": 1, "JoystickIdentifier": "Primary", "JumpButton": "A" }, { "name": "PlatformerObject", "type": "PlatformBehavior::PlatformerObjectBehavior", "acceleration": 1000, "canGoDownFromJumpthru": true, "canGrabPlatforms": false, "canGrabWithoutMoving": false, "deceleration": 1500, "gravity": 1050, "ignoreDefaultControls": false, "jumpSpeed": 717, "jumpSustainTime": 0.3, "ladderClimbingSpeed": 200, "maxFallingSpeed": 800, "maxSpeed": 400, "slopeMaxAngle": 60, "useLegacyTrajectory": false, "xGrabTolerance": 10, "yGrabOffset": 0 }, { "name": "SmoothCamera", "type": "SmoothCamera::SmoothCamera", "LeftwardSpeed": 0.9, "RightwardSpeed": 0.9, "UpwardSpeed": 0.95, "DownwardSpeed": 0.95, "FollowOnX": true, "FollowOnY": true, "FollowFreeAreaLeft": 0, "FollowFreeAreaRight": 0, "FollowFreeAreaTop": 0, "FollowFreeAreaBottom": 0, "CameraOffsetX": 0, "CameraOffsetY": 0, "CameraDelay": 0, "ForecastTime": 0, "ForecastHistoryDuration": 0, "LogLeftwardSpeed": 2.0247e-320, "LogRightwardSpeed": 2.0247e-320, "LogDownwardSpeed": 2.0247e-320, "LogUpwardSpeed": 2.0247e-320, "DelayedCenterX": 2.0247e-320, "DelayedCenterY": 2.0247e-320, "ForecastHistoryMeanX": 2.0247e-320, "ForecastHistoryMeanY": 2.0247e-320, "ForecastHistoryVarianceX": 2.0247e-320, "ForecastHistoryCovariance": 2.0247e-320, "ForecastHistoryLinearA": 2.0247e-320, "ForecastHistoryLinearB": 2.0247e-320, "ForecastedX": 2.0247e-320, "ForecastedY": 2.0247e-320, "ProjectedNewestX": 2.0247e-320, "ProjectedNewestY": 2.0247e-320, "ProjectedOldestX": 2.0247e-320, "ProjectedOldestY": 2.0247e-320, "ForecastHistoryVarianceY": 2.0247e-320, "Index": 2.0247e-320, "CameraDelayCatchUpSpeed": 0, "CameraExtraDelay": 2.0247e-320, "WaitingSpeedXMax": 2.0247e-320, "WaitingSpeedYMax": 2.0247e-320, "WaitingEnd": 2.0247e-320, "CameraDelayCatchUpDuration": 2.0247e-320, "LeftwardSpeedMax": 9000, "RightwardSpeedMax": 9000, "UpwardSpeedMax": 9000, "DownwardSpeedMax": 9000, "OldX": 9000.000000007454, "OldY": 9000.000000007454, "IsCalledManually": false } ], "animations": [ { "name": "", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [ { "hasCustomCollisionMask": true, "image": "assets\\StartingPlayer.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 2 }, { "x": 64, "y": 2 }, { "x": 64, "y": 64 }, { "x": 0, "y": 64 } ] ] } ] } ] } ] }, { "assetStoreId": "", "height": 64, "name": "Background", "texture": "assets\\Background.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, "variables": [], "effects": [], "behaviors": [] }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "Coins", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { "name": "SaveConfiguration", "type": "SaveState::SaveConfiguration", "defaultProfilePersistence": "Persisted", "persistedInProfiles": "coins" } ], "animations": [ { "name": "", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [ { "hasCustomCollisionMask": true, "image": "assets\\StartingCoin.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 0 }, { "x": 19, "y": 0 }, { "x": 19, "y": 18 }, { "x": 0, "y": 18 } ] ] } ] } ] } ] }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "9c727020616afdd6ba786b8af206a90481f07db0ca175ed6a4cc5b7e01c66d06", "name": "JumpButton", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM", "ShouldCheckHovering": true, "State": "Idle", "TouchId": 0, "TouchIsInside": false, "MouseIsInside": false, "Index": 2.0247e-320 }, { "name": "ButtonScaleTween", "type": "ButtonStates::ButtonScaleTween", "Scale": "Scale", "ButtonFSM": "ButtonFSM", "Tween": "Tween", "IdleScale": 1.5, "FocusedScale": 1.45, "FadeInDuration": 0.05, "FadeOutDuration": 0.1, "PressedScale": 1.45, "FadeInEasing": "easeInOutQuad", "FadeOutEasing": "easeInOutQuad", "PreviousState": "Idle" }, { "name": "MultitouchButton", "type": "SpriteMultitouchJoystick::MultitouchButton", "ControllerIdentifier": 1, "ButtonIdentifier": "A", "TouchId": 0, "TouchIndex": 2.0247e-320, "IsReleased": false }, { "name": "Tween", "type": "Tween::TweenBehavior" } ], "animations": [ { "name": "", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Top arrow button.png", "points": [], "originPoint": { "name": "origine", "x": 40, "y": 40 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 0 }, { "x": 80, "y": 0 }, { "x": 80, "y": 80 }, { "x": 0, "y": 80 } ] ] } ] } ] } ] }, { "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", "name": "Joystick", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variant": "", "variables": [], "effects": [], "behaviors": [ { "name": "SaveConfiguration", "type": "SaveState::SaveConfiguration", "defaultProfilePersistence": "DoNotSave", "persistedInProfiles": "" } ], "content": {}, "childrenContent": { "Border": { "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { "name": "Idle", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [ { "hasCustomCollisionMask": false, "image": "Flat dark joystick border.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [] } ] } ] } ] }, "Thumb": { "adaptCollisionMaskAutomatically": false, "updateIfNotVisible": false, "animations": [ { "name": "Idle", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [ { "hasCustomCollisionMask": false, "image": "Flat dark joystick thumb.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [] } ] } ] } ] } } }, { "assetStoreId": "", "height": 64, "name": "Platform_Ground", "texture": "assets\\StartingGround.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, "variables": [], "effects": [], "behaviors": [ { "name": "Platform", "type": "PlatformBehavior::PlatformBehavior", "canBeGrabbed": false, "platformType": "NormalPlatform", "yGrabOffset": 0 } ] }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "8be3cdbd79d1bc3af6940fb98cdf48510c9e8bc62ba404020dd92f67b61fc79d", "name": "FlagBlue", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [], "animations": [ { "name": "", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Flag Blue.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 0 }, { "x": 70, "y": 0 }, { "x": 70, "y": 70 }, { "x": 0, "y": 70 } ] ] } ] } ] } ] }, { "assetStoreId": "", "height": 32, "name": "NewTiledSprite", "texture": "NewTiledSprite", "type": "TiledSpriteObject::TiledSprite", "width": 32, "variables": [], "effects": [], "behaviors": [] }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "39d02c8d833898dd906c948e8403596aba1fdcfa223f374b260aa5b0ae70b776", "name": "LargeSign", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [], "animations": [ { "name": "", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Large sign.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 0 }, { "x": 64, "y": 0 }, { "x": 64, "y": 55 }, { "x": 0, "y": 55 } ] ] } ] } ] } ] }, { "assetStoreId": "", "bold": true, "italic": false, "name": "NewText", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Flags are checkpoints !", "font": "", "textAlignment": "center", "characterSize": 20, "color": { "b": 255, "g": 255, "r": 255 }, "content": { "bold": true, "isOutlineEnabled": false, "isShadowEnabled": false, "italic": false, "outlineColor": "255;255;255", "outlineThickness": 2, "shadowAngle": 90, "shadowBlurRadius": 2, "shadowColor": "0;0;0", "shadowDistance": 4, "shadowOpacity": 127, "smoothed": true, "underlined": false, "text": "Flags are checkpoints !", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 20, "lineHeight": 0, "color": "255;255;255" } }, { "assetStoreId": "", "bold": true, "italic": false, "name": "NewText2", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "You won !", "font": "", "textAlignment": "center", "characterSize": 50, "color": { "b": 255, "g": 255, "r": 255 }, "content": { "bold": true, "isOutlineEnabled": false, "isShadowEnabled": false, "italic": false, "outlineColor": "255;255;255", "outlineThickness": 2, "shadowAngle": 90, "shadowBlurRadius": 2, "shadowColor": "0;0;0", "shadowDistance": 4, "shadowOpacity": 127, "smoothed": true, "underlined": false, "text": "You won !", "font": "", "textAlignment": "center", "verticalTextAlignment": "top", "characterSize": 50, "lineHeight": 0, "color": "255;255;255" } }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "445c46c6f04f1551e12d8ccea31a4e75ca6dda1aea141a0d7b8aa0ba337df4bc", "name": "ChiChiTheBird", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { "name": "Tween", "type": "Tween::TweenBehavior" } ], "animations": [ { "name": "Hurt", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Hurt.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] } ] } ] }, { "name": "Aerial Attack", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Aerial Attack.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] } ] } ] }, { "name": "Falling", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Falling.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] } ] } ] }, { "name": "Flapping Wings", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.3333, "sprites": [ { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Flapping Wings_1.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] }, { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Flapping Wings_2.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] }, { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Flapping Wings_3.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] } ] } ] }, { "name": "Standing", "useMultipleDirections": false, "directions": [ { "looping": true, "timeBetweenFrames": 0.025, "sprites": [ { "hasCustomCollisionMask": true, "image": "Chi Chi the Bird_Standing.png", "points": [], "originPoint": { "name": "origine", "x": 0, "y": 0 }, "centerPoint": { "automatic": true, "name": "centre", "x": 0, "y": 0 }, "customCollisionMask": [ [ { "x": 0, "y": 1 }, { "x": 16, "y": 1 }, { "x": 16, "y": 15 }, { "x": 0, "y": 15 } ] ] } ] } ] } ] }, { "assetStoreId": "", "bold": false, "italic": false, "name": "NewText3", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "0", "font": "", "textAlignment": "left", "characterSize": 40, "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": "0", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 40, "lineHeight": 0, "color": "0;0;0" } }, { "assetStoreId": "", "bold": false, "italic": false, "name": "NewText4", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "0", "font": "", "textAlignment": "left", "characterSize": 40, "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": "0", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 40, "lineHeight": 0, "color": "0;0;0" } }, { "assetStoreId": "", "bold": false, "italic": false, "name": "NewText5", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Last save", "font": "", "textAlignment": "left", "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": "Last save", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, "lineHeight": 0, "color": "0;0;0" } }, { "assetStoreId": "", "bold": false, "italic": false, "name": "NewText6", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Last load", "font": "", "textAlignment": "left", "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": "Last load", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, "lineHeight": 0, "color": "0;0;0" } }, { "assetStoreId": "", "bold": false, "italic": false, "name": "SaveStatus", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "SaveStatus", "font": "", "textAlignment": "left", "characterSize": 30, "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": "SaveStatus", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 30, "lineHeight": 0, "color": "0;0;0" } }, { "assetStoreId": "", "bold": false, "italic": false, "name": "NewText7", "smoothed": true, "type": "TextObject::Text", "underlined": false, "variables": [], "effects": [], "behaviors": [], "string": "Excluded Variable", "font": "", "textAlignment": "left", "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": "Excluded Variable", "font": "", "textAlignment": "left", "verticalTextAlignment": "top", "characterSize": 20, "lineHeight": 0, "color": "0;0;0" } } ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ { "objectName": "Platformer_Character" }, { "objectName": "Platform_Ground" }, { "objectName": "LargeSign" }, { "objectName": "NewText" }, { "objectName": "NewText2" }, { "objectName": "NewText3" }, { "objectName": "NewText4" }, { "objectName": "NewText5" }, { "objectName": "NewText6" }, { "objectName": "NewText7" }, { "objectName": "FlagBlue" }, { "objectName": "Background" }, { "objectName": "Coins" }, { "folderName": "Mobile Controls", "children": [ { "objectName": "Joystick" }, { "objectName": "JumpButton" } ] }, { "objectName": "NewTiledSprite" }, { "objectName": "ChiChiTheBird" }, { "objectName": "SaveStatus" } ] }, "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionNP" }, "parameters": [ "Platformer_Character", "Coins", "", "", "" ] } ], "actions": [ { "type": { "value": "Delete" }, "parameters": [ "Coins", "" ] }, { "type": { "value": "PlaySound" }, "parameters": [ "", "PickupCoin", "", "80", "RandomFloatInRange(1,1.1)" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SaveState::SetVariableSaveConfiguration" }, "parameters": [ "", "VariableExcludedFromSave", "no", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Distance" }, "parameters": [ "Platformer_Character", "FlagBlue", "10", "" ] }, { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "PlaySound" }, "parameters": [ "", "c52f1dacc263a2a6dc94e712a2a148f909b73372fa8e0622cb237fdc6a72fd6c_Coins 8.aac", "", "", "" ] }, { "type": { "value": "SaveState::CreateGameSaveStateInStorage" }, "parameters": [ "", "\"test\"", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionNP" }, "parameters": [ "Platformer_Character", "NewTiledSprite", "", "", "" ] }, { "type": { "value": "BuiltinCommonInstructions::Once" }, "parameters": [] } ], "actions": [ { "type": { "value": "SaveState::RestoreGameSaveStateFromStorage" }, "parameters": [ "", "\"test\"", "", "no" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Press s to save and l to load manually. Check how the \"VariableExcludedFromSave\" won't be impacted." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "KeyFromTextJustPressed" }, "parameters": [ "", "\"s\"" ] } ], "actions": [ { "type": { "value": "SaveState::CreateGameSaveStateInStorage" }, "parameters": [ "", "\"manual-save\"", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "KeyFromTextJustPressed" }, "parameters": [ "", "\"l\"" ] } ], "actions": [ { "type": { "value": "SaveState::RestoreGameSaveStateFromStorage" }, "parameters": [ "", "\"manual-save\"", "", "" ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Press c to just save the coins and press x to load only the coins. Check how the rest won't be impacted." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "KeyFromTextJustPressed" }, "parameters": [ "", "\"c\"" ] } ], "actions": [ { "type": { "value": "SaveState::CreateGameSaveStateInStorage" }, "parameters": [ "", "\"coins-save\"", "\"coins\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "KeyFromTextJustPressed" }, "parameters": [ "", "\"x\"" ] } ], "actions": [ { "type": { "value": "SaveState::RestoreGameSaveStateFromStorage" }, "parameters": [ "", "\"coins-save\"", "\"coins\"", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText3", "Text", "=", "ToString(round(Time))" ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText4", "Text", "=", "ToString(round(TimeStruct[\"something.lol\"].time))" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::TimeSinceLastSave" }, "parameters": [ ">=", ">", "0" ] } ], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText5", "Text", "=", "\"Last save: \" + ToString(SaveState::TimeSinceLastSave()) + \" s\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::TimeSinceLastSave" }, "parameters": [ "<", "<", "0" ] } ], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText5", "Text", "=", "\"No save done\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::TimeSinceLastLoad" }, "parameters": [ ">=", ">", "0" ] } ], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText6", "Text", "=", "\"Last load: \" + ToString(SaveState::TimeSinceLastLoad()) + \" s\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::TimeSinceLastLoad" }, "parameters": [ "<", "<", "0" ] } ], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText6", "Text", "=", "\"No load done\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "DepartScene" }, "parameters": [ "" ] } ], "actions": [ { "type": { "value": "Tween::TweenBehavior::AddObjectPositionTween2" }, "parameters": [ "ChiChiTheBird", "Tween", "\"position\"", "2000", "ChiChiTheBird.Y()", "\"linear\"", "30", "" ] }, { "type": { "value": "Cache" }, "parameters": [ "SaveStatus" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "PlayMusic" }, "parameters": [ "", "dfcdb6ef0ded864b301b5cc57940b190e803b1ea53d057338043f3b8bcd2a138_04 - Castle Nosferatu (Sega-style FM Synth Remix).aac", "yes", "40", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ActivateBehavior" }, "parameters": [ "Platformer_Character", "SmoothCamera", "no" ] }, { "type": { "value": "Tween::TweenCameraPosition2" }, "parameters": [ "", "\"cameraPosition\"", "2000", "CameraCenterY()", "", "\"linear\"", "30" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::TweenSceneVariableNumber3" }, "parameters": [ "", "\"time\"", "Time", "100", "\"easeInQuad\"", "10" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::TweenSceneVariableNumber3" }, "parameters": [ "", "\"timechild\"", "TimeStruct[\"something.lol\"].time", "200", "\"easeInQuint\"", "10" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Wait" }, "parameters": [ "5" ] }, { "type": { "value": "SceneBackground" }, "parameters": [ "", "\"21;231;21\"" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "KeyFromTextPressed" }, "parameters": [ "", "\"d\"" ] } ], "actions": [ { "type": { "value": "Wait" }, "parameters": [ "2" ] }, { "type": { "value": "Delete" }, "parameters": [ "Coins", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::SaveJustSucceeded" }, "parameters": [] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "SaveStatus", "" ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "SaveStatus", "Text", "=", "\"Save succeeded\"" ] }, { "type": { "value": "Wait" }, "parameters": [ "2" ] }, { "type": { "value": "Cache" }, "parameters": [ "SaveStatus" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::SaveJustFailed" }, "parameters": [] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "SaveStatus", "" ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "SaveStatus", "Text", "=", "\"Save failed\"" ] }, { "type": { "value": "Wait" }, "parameters": [ "2" ] }, { "type": { "value": "Cache" }, "parameters": [ "SaveStatus" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::LoadJustFailed" }, "parameters": [] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "SaveStatus", "" ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "SaveStatus", "Text", "=", "\"Load failed\"" ] }, { "type": { "value": "Wait" }, "parameters": [ "2" ] }, { "type": { "value": "Cache" }, "parameters": [ "SaveStatus" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SaveState::LoadJustSucceeded" }, "parameters": [] } ], "actions": [ { "type": { "value": "Montre" }, "parameters": [ "SaveStatus", "" ] }, { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "SaveStatus", "Text", "=", "\"Load successful\"" ] }, { "type": { "value": "Wait" }, "parameters": [ "2" ] }, { "type": { "value": "Cache" }, "parameters": [ "SaveStatus" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ "NewText7", "Text", "=", "\"Excluded variable: \" + VariableExcludedFromSave" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "DepartScene" }, "parameters": [ "" ] } ], "actions": [ { "type": { "value": "ResetTimer" }, "parameters": [ "", "\"ExcludedVariableIncreaseTimer\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CompareTimer" }, "parameters": [ "", "\"ExcludedVariableIncreaseTimer\"", ">=", "0.5" ] } ], "actions": [ { "type": { "value": "ResetTimer" }, "parameters": [ "", "\"ExcludedVariableIncreaseTimer\"" ] }, { "type": { "value": "SetNumberVariable" }, "parameters": [ "VariableExcludedFromSave", "+", "1" ] } ] } ], "layers": [ { "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, "cameraType": "", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, "name": "Background", "renderingType": "", "visibility": true, "cameras": [], "effects": [] }, { "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, "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": [] }, { "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 3, "cameraType": "", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, "name": "MobileControls", "renderingType": "", "visibility": true, "cameras": [], "effects": [] } ], "behaviorsSharedData": [ { "name": "Animation", "type": "AnimatableCapability::AnimatableBehavior" }, { "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, { "name": "ButtonScaleTween", "type": "ButtonStates::ButtonScaleTween" }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" }, { "name": "Flippable", "type": "FlippableCapability::FlippableBehavior" }, { "name": "MultitouchButton", "type": "SpriteMultitouchJoystick::MultitouchButton" }, { "name": "Opacity", "type": "OpacityCapability::OpacityBehavior" }, { "name": "Platform", "type": "PlatformBehavior::PlatformBehavior" }, { "name": "PlatformerMultitouchMapper", "type": "SpriteMultitouchJoystick::PlatformerMultitouchMapper" }, { "name": "PlatformerObject", "type": "PlatformBehavior::PlatformerObjectBehavior" }, { "name": "Resizable", "type": "ResizableCapability::ResizableBehavior" }, { "name": "SaveConfiguration", "type": "SaveState::SaveConfiguration" }, { "name": "Scale", "type": "ScalableCapability::ScalableBehavior" }, { "name": "SmoothCamera", "type": "SmoothCamera::SmoothCamera" }, { "name": "Text", "type": "TextContainerCapability::TextContainerBehavior" }, { "name": "Tween", "type": "Tween::TweenBehavior" } ] } ], "externalEvents": [], "eventsFunctionsExtensions": [ { "author": "", "category": "User interface", "extensionNamespace": "", "fullName": "Button states and effects", "gdevelopVersion": "", "helpPath": "/objects/button", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", "name": "ButtonStates", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", "shortDescription": "Use any object as a button and change appearance according to user interactions.", "version": "1.1.1", "description": [ "Use the \"Button states\" behavior to track user interactions with an object, including:", "", "- Hovered", "- Pressed", "- Clicked", "- Idle", "", "Add additional behaviors to make juicy buttons with animated responses to user input:", "", "- Size", "- Color", "- Animation", "- Object effects" ], "origin": { "identifier": "ButtonStates", "name": "gdevelop-extension-store" }, "tags": [ "ui", "button" ], "authorIds": [ "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", "gqDaZjCfevOOxBYkK6zlhtZnXCg1" ], "dependencies": [], "globalVariables": [], "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { "description": "Use objects as buttons.", "fullName": "Button states", "name": "ButtonFSM", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPostEvents", "sentence": "", "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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Validated\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"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": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" }, "parameters": [ "Object", "Behavior", "no" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" }, "parameters": [ "Object", "Behavior" ] }, { "type": { "value": "CollisionPoint" }, "parameters": [ "Object", "MouseOnlyCursorX(Object.Layer(), 0)", "MouseOnlyCursorY(Object.Layer(), 0)" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" }, "parameters": [ "Object", "Behavior", "yes" ] } ] }, { "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": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" }, "parameters": [ "Object", "Behavior", "no" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyTouchId" }, "parameters": [ "Object", "Behavior", "!=", "0" ] }, { "type": { "value": "CollisionPoint" }, "parameters": [ "Object", "TouchX(TouchId, Object.Layer(), 0)", "TouchY(TouchId, Object.Layer(), 0)" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" }, "parameters": [ "Object", "Behavior", "yes" ] } ] } ], "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": "ButtonStates::ButtonFSM::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "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": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "StartedTouchOrMouseId(Index)" ] }, { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" }, "parameters": [ "Object", "Behavior", "yes" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Hovered\"" ] }, { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedInside\"" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "+", "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": "ButtonStates::ButtonFSM::PropertyMouseIsInside" }, "parameters": [ "Object", "Behavior" ] }, { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Hovered\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" }, "parameters": [ "Object", "Behavior" ] }, { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Hovered\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" }, "parameters": [ "Object", "Behavior" ] }, { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedInside\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedOutside\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" }, "parameters": [ "Object", "Behavior" ] }, { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedOutside\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"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": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedInside\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Validated\"" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedInside\"" ] }, { "type": { "inverted": true, "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Validated\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ] } ] } ], "parameters": [] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonFSM", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "onDeActivate", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonFSM::ResetState" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] }, { "type": { "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Validated\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Hovered\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"Hovered\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedOutside\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedInside\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", "\"PressedOutside\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::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": "ButtonStates::ButtonFSM", "type": "behavior" } ], "objectGroups": [] } ], "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" } ], "sharedPropertyDescriptors": [] }, { "description": "Enable effects on buttons based on their state.", "fullName": "Button object effects", "name": "ButtonObjectEffects", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "IdleEffect", "yes" ] }, { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "FocusedEffect", "no" ] }, { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "PressedEffect", "no" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "States", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "IdleEffect", "no" ] }, { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "FocusedEffect", "no" ] }, { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "PressedEffect", "no" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" }, "parameters": [ "Object", "Behavior", "!=", "\"\"" ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "IdleEffect", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" }, "parameters": [ "Object", "Behavior", "!=", "\"\"" ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "FocusedEffect", "yes" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" }, "parameters": [ "Object", "Behavior", "!=", "\"\"" ] }, { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", "Effect", "PressedEffect", "yes" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "description": "the idle state effect of the object.", "fullName": "Idle state effect", "functionType": "ExpressionAndCondition", "group": "Button object effects configuration", "name": "IdleEffect", "sentence": "the idle state effect", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "IdleEffect" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleEffect", "name": "SetIdleEffect", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", "fullName": "Focused state effect", "functionType": "ExpressionAndCondition", "group": "Button object effects configuration", "name": "FocusedEffect", "sentence": "the focused state effect", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FocusedEffect" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedEffect", "name": "SetFocusedEffect", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "description": "the pressed state effect of the object.", "fullName": "Pressed state effect", "functionType": "ExpressionAndCondition", "group": "Button object effects configuration", "name": "PressedEffect", "sentence": "the pressed state effect", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "PressedEffect" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedEffect", "name": "SetPressedEffect", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Button states", "extraInformation": [ "ButtonStates::ButtonFSM" ], "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", "extraInformation": [ "EffectCapability::EffectBehavior" ], "choices": [], "name": "Effect" }, { "value": "", "type": "String", "label": "Idle state effect", "group": "Effects", "name": "IdleEffect" }, { "value": "", "type": "String", "label": "Focused state effect", "description": "The state is Focused when the button is hovered or held outside.", "group": "Effects", "name": "FocusedEffect" }, { "value": "", "type": "String", "label": "Pressed state effect", "group": "Effects", "name": "PressedEffect" } ], "sharedPropertyDescriptors": [] }, { "description": "Change the animation of buttons according to their state.", "fullName": "Button animation", "name": "ButtonAnimationName", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", "Animation", "=", "IdleAnimationName" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Change based on state", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", "Animation", "=", "IdleAnimationName" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", "Animation", "=", "FocusedAnimationName" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [ { "type": { "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ "Object", "Animation", "=", "PressedAnimationName" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "description": "the idle state animation name of the object.", "fullName": "Idle state animation name", "functionType": "ExpressionAndCondition", "group": "Button animation configuration", "name": "IdleAnimationName", "sentence": "the idle state animation name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "IdleAnimationName" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleAnimationName", "name": "SetIdleAnimationName", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", "fullName": "Focused state animation name", "functionType": "ExpressionAndCondition", "group": "Button animation configuration", "name": "FocusedAnimationName", "sentence": "the focused state animation name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FocusedAnimationName" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedAnimationName", "name": "SetFocusedAnimationName", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "description": "the pressed state animation name of the object.", "fullName": "Pressed state animation name", "functionType": "ExpressionAndCondition", "group": "Button animation configuration", "name": "PressedAnimationName", "sentence": "the pressed state animation name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "PressedAnimationName" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedAnimationName", "name": "SetPressedAnimationName", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonAnimationName", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Animatable capability", "extraInformation": [ "AnimatableCapability::AnimatableBehavior" ], "choices": [], "name": "Animation" }, { "value": "", "type": "Behavior", "label": "Button states", "extraInformation": [ "ButtonStates::ButtonFSM" ], "choices": [], "name": "ButtonFSM" }, { "value": "Idle", "type": "String", "label": "Idle state animation name", "group": "Animation", "name": "IdleAnimationName" }, { "value": "Focused", "type": "String", "label": "Focused state animation name", "description": "The state is Focused when the button is hovered or held outside.", "group": "Animation", "name": "FocusedAnimationName" }, { "value": "Pressed", "type": "String", "label": "Pressed state animation name", "group": "Animation", "name": "PressedAnimationName" } ], "sharedPropertyDescriptors": [] }, { "description": "Smoothly change an effect on buttons according to their state.", "fullName": "Button object effect tween", "name": "ButtonObjectEffectTween", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" }, "parameters": [ "Object", "Behavior", "=", "IdleValue" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "States", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" }, "parameters": [ "Object", "Behavior", "IdleValue", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" }, "parameters": [ "Object", "Behavior", "FocusedValue", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" }, "parameters": [ "Object", "Behavior", "FocusedValue", "" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" }, "parameters": [ "Object", "Behavior", "PressedValue", "" ] } ] } ], "parameters": [] }, { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Tween", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" }, "parameters": [ "Object", "Behavior", "=", "\"FadeIn\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" }, "parameters": [ "Object", "Behavior", "FadeInDuration", "FadeInEasing", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" }, "parameters": [ "Object", "Behavior", "=", "\"FadeOut\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" }, "parameters": [ "Object", "Behavior", "FadeOutDuration", "FadeOutEasing", "" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "Time delta", "functionType": "Expression", "name": "TimeDelta", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "TimeDelta() * LayerTimeScale(Object.Layer())" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "Fade in", "functionType": "Action", "name": "FadeIn", "private": true, "sentence": "_PARAM0_ fade in to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, "parameters": [ "Object", "Behavior", "=", "\"FadeIn\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" }, "parameters": [ "Object", "Behavior", "=", "EffectValue" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "fullName": "Fade out", "functionType": "Action", "name": "FadeOut", "private": true, "sentence": "_PARAM0_ fade out to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, "parameters": [ "Object", "Behavior", "=", "\"FadeOut\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" }, "parameters": [ "Object", "Behavior", "=", "EffectValue" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "fullName": "Play tween", "functionType": "Action", "name": "PlayTween", "private": true, "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" }, "parameters": [ "Object", "Behavior", "<", "Duration" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" }, "parameters": [ "Object", "Behavior", "+", "Object.Behavior::TimeDelta()" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" }, "parameters": [ "Object", "Behavior", "=", "Tween::Ease(Easing, TweenInitialValue, TweenTargetedValue, TweenTime / Duration)" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" }, "parameters": [ "Object", "Behavior", ">=", "Duration" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" }, "parameters": [ "Object", "Behavior", "=", "\"NoTween\"" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" }, "parameters": [ "Object", "Behavior", "=", "TweenTargetedValue" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" }, "parameters": [ "Object", "Effect", "EffectName", "EffectProperty", "EffectValue" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" }, { "description": "Duration (in seconds)", "name": "Duration", "type": "expression" }, { "description": "Easing", "name": "Easing", "supplementaryInformation": "[]", "type": "string" } ], "objectGroups": [] }, { "description": "the effect name of the object.", "fullName": "Effect name", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "EffectName", "sentence": "the effect name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "EffectName" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "fullName": "Effect parameter", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "EffectProperty", "sentence": "the effect parameter", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "EffectProperty" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "fullName": "Effect parameter", "functionType": "Action", "getterName": "EffectName", "group": "Button effect tween configuration", "name": "SetEffectProperty", "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" }, "parameters": [ "Object", "Behavior", "=", "Value" ] }, { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" }, { "description": "Effect name", "name": "EffectName", "type": "string" }, { "description": "Parameter name", "name": "PropertyName", "type": "string" } ], "objectGroups": [] }, { "description": "the idle effect parameter value of the object.", "fullName": "Idle effect parameter value", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "IdleValue", "sentence": "the idle effect parameter value", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "IdleValue" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleValue", "name": "SetIdleValue", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", "fullName": "Focused effect parameter value", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "FocusedValue", "sentence": "the focused effect parameter value", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FocusedValue" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedValue", "name": "SetFocusedValue", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the pressed effect parameter value of the object.", "fullName": "Pressed effect parameter value", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "PressedValue", "sentence": "the pressed effect parameter value", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "PressedValue" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedValue", "name": "SetPressedValue", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in easing of the object.", "fullName": "Fade-in easing", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "FadeInEasing", "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeInEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", "name": "SetFadeInEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out easing of the object.", "fullName": "Fade-out easing", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "FadeOutEasing", "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeOutEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", "name": "SetFadeOutEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in duration of the object.", "fullName": "Fade-in duration", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "FadeInDuration", "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeInDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", "name": "SetFadeInDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out duration of the object.", "fullName": "Fade-out duration", "functionType": "ExpressionAndCondition", "group": "Button effect tween configuration", "name": "FadeOutDuration", "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeOutDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Button states", "extraInformation": [ "ButtonStates::ButtonFSM" ], "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Effect capability", "extraInformation": [ "EffectCapability::EffectBehavior" ], "choices": [], "name": "Effect" }, { "value": "Effect", "type": "String", "label": "Effect name", "group": "Effect", "name": "EffectName" }, { "value": "", "type": "String", "label": "Effect parameter", "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", "group": "Effect", "name": "EffectProperty" }, { "value": "0", "type": "Number", "label": "Idle effect parameter value", "group": "Value", "name": "IdleValue" }, { "value": "0", "type": "Number", "label": "Focused effect parameter value", "description": "The state is Focused when the button is hovered or held outside.", "group": "Value", "name": "FocusedValue" }, { "value": "0", "type": "Number", "label": "Pressed effect parameter value", "group": "Value", "name": "PressedValue" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeOutEasing" }, { "value": "0.125", "type": "Number", "unit": "Second", "label": "Fade-in duration", "group": "Speed", "name": "FadeInDuration" }, { "value": "0.5", "type": "Number", "unit": "Second", "label": "Fade-out duration", "group": "Speed", "name": "FadeOutDuration" }, { "value": "Idle", "type": "Choice", "label": "", "choices": [ { "label": "Idle", "value": "Idle" }, { "label": "Focused", "value": "Focused" }, { "label": "Pressed", "value": "Pressed" } ], "hidden": true, "name": "PreviousState" }, { "value": "0", "type": "Number", "label": "", "hidden": true, "name": "TweenInitialValue" }, { "value": "0", "type": "Number", "label": "", "hidden": true, "name": "TweenTargetedValue" }, { "value": "0", "type": "Number", "label": "", "hidden": true, "name": "TweenTime" }, { "value": "NoTween", "type": "Choice", "label": "", "choices": [ { "label": "NoTween", "value": "NoTween" }, { "label": "FadeIn", "value": "FadeIn" }, { "label": "FadeOut", "value": "FadeOut" } ], "hidden": true, "name": "TweenState" }, { "value": "0", "type": "Number", "label": "", "hidden": true, "name": "EffectValue" } ], "sharedPropertyDescriptors": [] }, { "description": "Smoothly resize buttons according to their state.", "fullName": "Button scale tween", "name": "ButtonScaleTween", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ScalableCapability::ScalableBehavior::SetValue" }, "parameters": [ "Object", "Scale", "=", "IdleScale" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Change based on state", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ "Object", "Behavior", "IdleScale", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::FadeIn" }, "parameters": [ "Object", "Behavior", "FocusedScale", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::FadeOut" }, "parameters": [ "Object", "Behavior", "FocusedScale", "" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] }, { "type": { "value": "ButtonStates::ButtonScaleTween::FadeIn" }, "parameters": [ "Object", "Behavior", "PressedScale", "" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "Fade in", "functionType": "Action", "name": "FadeIn", "private": true, "sentence": "_PARAM0_ fade in to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::AddObjectScaleTween" }, "parameters": [ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", "Value", "Value", "FadeInEasing", "1000 * FadeInDuration", "no", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "fullName": "Fade out", "functionType": "Action", "name": "FadeOut", "private": true, "sentence": "_PARAM0_ fade out to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::AddObjectScaleTween" }, "parameters": [ "Object", "Tween", "\"__ButtonScaleTween.Fade\"", "Value", "Value", "FadeOutEasing", "1000 * FadeOutDuration", "no", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "description": "the idle state size scale of the object.", "fullName": "Idle state size scale", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "IdleScale", "sentence": "the idle state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "IdleScale" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleScale", "name": "SetIdleScale", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", "fullName": "Focused state size scale", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "FocusedScale", "sentence": "the focused state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FocusedScale" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedScale", "name": "SetFocusedScale", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the pressed state size scale of the object.", "fullName": "Pressed state size scale", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "PressedScale", "sentence": "the pressed state size scale", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "PressedScale" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedScale", "name": "SetPressedScale", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in duration of the object.", "fullName": "Fade-in duration", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "FadeInDuration", "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeInDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", "name": "SetFadeInDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out duration of the object.", "fullName": "Fade-out duration", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "FadeOutDuration", "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeOutDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in easing of the object.", "fullName": "Fade-in easing", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "FadeInEasing", "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeInEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", "name": "SetFadeInEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out easing of the object.", "fullName": "Fade-out easing", "functionType": "ExpressionAndCondition", "group": "Button scale tween configuration", "name": "FadeOutEasing", "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeOutEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", "name": "SetFadeOutEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonScaleTween", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Scalable capability", "extraInformation": [ "ScalableCapability::ScalableBehavior" ], "choices": [], "name": "Scale" }, { "value": "", "type": "Behavior", "label": "Button states behavior (required)", "extraInformation": [ "ButtonStates::ButtonFSM" ], "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween behavior (required)", "extraInformation": [ "Tween::TweenBehavior" ], "choices": [], "name": "Tween" }, { "value": "1", "type": "Number", "unit": "Dimensionless", "label": "Idle state size scale", "group": "Size", "name": "IdleScale" }, { "value": "1", "type": "Number", "unit": "Dimensionless", "label": "Focused state size scale", "description": "The state is Focused when the button is hovered or held outside.", "group": "Size", "name": "FocusedScale" }, { "value": "0.1", "type": "Number", "unit": "Second", "label": "Fade-in duration", "group": "Speed", "name": "FadeInDuration" }, { "value": "0.2", "type": "Number", "unit": "Second", "label": "Fade-out duration", "group": "Speed", "name": "FadeOutDuration" }, { "value": "0.95", "type": "Number", "unit": "Dimensionless", "label": "Pressed state size scale", "group": "Size", "name": "PressedScale" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", "choices": [ { "label": "Idle", "value": "Idle" }, { "label": "Focused", "value": "Focused" }, { "label": "Pressed", "value": "Pressed" } ], "hidden": true, "name": "PreviousState" } ], "sharedPropertyDescriptors": [] }, { "description": "Smoothly change the color tint of buttons according to their state.", "fullName": "Button color tint tween", "name": "ButtonColorTintTween", "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ChangeColor" }, "parameters": [ "Object", "IdleColorTint" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "States", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsIdle" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ "Object", "Behavior", "IdleColorTint", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsFocused" }, "parameters": [ "Object", "ButtonFSM", "" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Idle\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", "Behavior", "FocusedColorTint", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Focused\"" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::FadeOut" }, "parameters": [ "Object", "Behavior", "FocusedColorTint", "" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "ButtonStates::ButtonFSM::IsPressed" }, "parameters": [ "Object", "ButtonFSM", "" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" }, "parameters": [ "Object", "Behavior", "!=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" }, "parameters": [ "Object", "Behavior", "=", "\"Pressed\"" ] }, { "type": { "value": "ButtonStates::ButtonColorTintTween::FadeIn" }, "parameters": [ "Object", "Behavior", "PressedColorTint", "" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "Fade in", "functionType": "Action", "name": "FadeIn", "private": true, "sentence": "_PARAM0_ fade in to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::AddObjectColorTween" }, "parameters": [ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", "Value", "FadeInEasing", "1000 * FadeInDuration", "no", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "color" } ], "objectGroups": [] }, { "fullName": "Fade out", "functionType": "Action", "name": "FadeOut", "private": true, "sentence": "_PARAM0_ fade out to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Tween::AddObjectColorTween" }, "parameters": [ "Object", "Tween", "\"__ButtonColorTintTween.Fade\"", "Value", "FadeOutEasing", "1000 * FadeOutDuration", "no", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" }, { "description": "Value", "name": "Value", "type": "color" } ], "objectGroups": [] }, { "description": "the idle state color tint of the object.", "fullName": "Idle state color tint", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "IdleColorTint", "sentence": "the idle state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "IdleColorTint" ] } ] } ], "expressionType": { "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "IdleColorTint", "name": "SetIdleColorTint", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", "fullName": "Focused state color tint", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "FocusedColorTint", "sentence": "the focused state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FocusedColorTint" ] } ] } ], "expressionType": { "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FocusedColorTint", "name": "SetFocusedColorTint", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the pressed state color tint of the object.", "fullName": "Pressed state color tint", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "PressedColorTint", "sentence": "the pressed state color tint", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "PressedColorTint" ] } ] } ], "expressionType": { "type": "color" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "PressedColorTint", "name": "SetPressedColorTint", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in duration of the object.", "fullName": "Fade-in duration", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "FadeInDuration", "sentence": "the fade-in duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeInDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInDuration", "name": "SetFadeInDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out duration of the object.", "fullName": "Fade-out duration", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "FadeOutDuration", "sentence": "the fade-out duration", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "FadeOutDuration" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutDuration", "name": "SetFadeOutDuration", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-in easing of the object.", "fullName": "Fade-in easing", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "FadeInEasing", "sentence": "the fade-in easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeInEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeInEasing", "name": "SetFadeInEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "description": "the fade-out easing of the object.", "fullName": "Fade-out easing", "functionType": "ExpressionAndCondition", "group": "Button color tint tween", "name": "FadeOutEasing", "sentence": "the fade-out easing", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "FadeOutEasing" ] } ] } ], "expressionType": { "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", "type": "stringWithSelector" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "FadeOutEasing", "name": "SetFadeOutEasing", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "ButtonStates::ButtonColorTintTween", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Button states", "extraInformation": [ "ButtonStates::ButtonFSM" ], "choices": [], "name": "ButtonFSM" }, { "value": "", "type": "Behavior", "label": "Tween", "extraInformation": [ "Tween::TweenBehavior" ], "choices": [], "name": "Tween" }, { "value": "255;255;255", "type": "Color", "label": "Idle state color tint", "group": "Color", "name": "IdleColorTint" }, { "value": "192;192;192", "type": "Color", "label": "Focused state color tint", "description": "The state is Focused when the button is hovered or held outside.", "group": "Color", "name": "FocusedColorTint" }, { "value": "64;64;64", "type": "Color", "label": "Pressed state color tint", "group": "Color", "name": "PressedColorTint" }, { "value": "0.1", "type": "Number", "unit": "Second", "label": "Fade-in duration", "group": "Speed", "name": "FadeInDuration" }, { "value": "0.2", "type": "Number", "unit": "Second", "label": "Fade-out duration", "group": "Speed", "name": "FadeOutDuration" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-in easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeInEasing" }, { "value": "easeInOutQuad", "type": "Choice", "label": "Fade-out easing", "group": "Speed", "choices": [ { "label": "linear", "value": "linear" }, { "label": "easeInQuad", "value": "easeInQuad" }, { "label": "easeOutQuad", "value": "easeOutQuad" }, { "label": "easeInOutQuad", "value": "easeInOutQuad" }, { "label": "easeInCubic", "value": "easeInCubic" }, { "label": "easeOutCubic", "value": "easeOutCubic" }, { "label": "easeInOutCubic", "value": "easeInOutCubic" }, { "label": "easeInQuart", "value": "easeInQuart" }, { "label": "easeOutQuart", "value": "easeOutQuart" }, { "label": "easeInOutQuart", "value": "easeInOutQuart" }, { "label": "easeInQuint", "value": "easeInQuint" }, { "label": "easeOutQuint", "value": "easeOutQuint" }, { "label": "easeInOutQuint", "value": "easeInOutQuint" }, { "label": "easeInOutSine", "value": "easeInOutSine" }, { "label": "easeInExpo", "value": "easeInExpo" }, { "label": "easeOutExpo", "value": "easeOutExpo" }, { "label": "easeInOutExpo", "value": "easeInOutExpo" }, { "label": "easeInCirc", "value": "easeInCirc" }, { "label": "easeOutCirc", "value": "easeOutCirc" }, { "label": "easeInOutCirc", "value": "easeInOutCirc" }, { "label": "easeOutBounce", "value": "easeOutBounce" }, { "label": "easeInBack", "value": "easeInBack" }, { "label": "easeOutBack", "value": "easeOutBack" }, { "label": "easeInOutBack", "value": "easeInOutBack" }, { "label": "elastic", "value": "elastic" }, { "label": "swingFromTo", "value": "swingFromTo" }, { "label": "swingFrom", "value": "swingFrom" }, { "label": "swingTo", "value": "swingTo" }, { "label": "bounce", "value": "bounce" }, { "label": "bouncePast", "value": "bouncePast" }, { "label": "easeFromTo", "value": "easeFromTo" }, { "label": "easeFrom", "value": "easeFrom" }, { "label": "easeTo", "value": "easeTo" } ], "name": "FadeOutEasing" }, { "value": "Idle", "type": "Choice", "label": "", "choices": [ { "label": "Idle", "value": "Idle" }, { "label": "Focused", "value": "Focused" }, { "label": "Pressed", "value": "Pressed" } ], "hidden": true, "name": "PreviousState" } ], "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] }, { "author": "", "category": "Input", "extensionNamespace": "", "fullName": "Multitouch joystick and buttons (sprite)", "gdevelopVersion": "", "helpPath": "/objects/multitouch-joystick", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", "name": "SpriteMultitouchJoystick", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", "shortDescription": "Joysticks or buttons for touchscreens.", "version": "1.4.0", "description": [ "Multitouch joysticks can be used the same way as physical gamepads:", "- 4 or 8 directions", "- Analogus pads", "- Player selection", "- Controls mapping for top-down movement and platformer characters", "", "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." ], "origin": { "identifier": "SpriteMultitouchJoystick", "name": "gdevelop-extension-store" }, "tags": [ "multitouch", "joystick", "thumbstick", "controller", "touchscreen", "twin stick", "shooter", "virtual", "platformer", "platform", "top-down" ], "authorIds": [ "gqDaZjCfevOOxBYkK6zlhtZnXCg1", "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", "v0YRpdAnIucZFgiRCCecqVnGKno2", "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" ], "dependencies": [], "globalVariables": [], "sceneVariables": [ { "name": "Controllers", "type": "array", "children": [ { "type": "structure", "children": [ { "name": "Buttons", "type": "array", "children": [ { "type": "structure", "children": [ { "name": "State", "type": "string", "value": "Idle" } ] } ] }, { "name": "Joystick", "type": "structure", "children": [] } ] } ] } ], "eventsFunctions": [ { "description": "Check if a button is pressed on a gamepad.", "fullName": "Multitouch controller button pressed", "functionType": "Condition", "name": "IsButtonPressed", "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StringVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", "\"Pressed\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Button name", "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": "string" } ], "objectGroups": [] }, { "description": "Check if a button is released on a gamepad.", "fullName": "Multitouch controller button released", "functionType": "Condition", "name": "IsButtonReleased", "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "StringVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", "\"Released\"" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Button name", "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": "string" } ], "objectGroups": [] }, { "description": "Change a button state for a multitouch controller.", "fullName": "Button state", "functionType": "Action", "name": "SetButtonState", "private": true, "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetStringVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Buttons[Button].State", "=", "ButtonState" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Button name", "name": "Button", "type": "string" }, { "description": "Button state", "name": "ButtonState", "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Change the dead zone radius of a joystick. 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).", "fullName": "Dead zone radius", "functionType": "Action", "name": "SetDeadZone", "private": true, "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetNumberVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone", "=", "DeadZoneRadius" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "type": "string" }, { "description": "Dead zone radius", "name": "DeadZoneRadius", "supplementaryInformation": "[]", "type": "expression" } ], "objectGroups": [] }, { "description": "Return the dead zone radius of a joystick. 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).", "fullName": "Dead zone radius", "functionType": "Expression", "name": "DeadZone", "private": true, "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].DeadZone" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "type": "string" } ], "objectGroups": [] }, { "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", "fullName": "Angle to 4-way index", "functionType": "ExpressionAndCondition", "name": "AngleTo4Way", "private": true, "sentence": "The angle _PARAM1_ 4-way index", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "mod(round(Angle * 4 / 360), 4)" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Angle", "name": "Angle", "type": "expression" } ], "objectGroups": [] }, { "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", "fullName": "Angle to 8-way index", "functionType": "ExpressionAndCondition", "name": "AngleTo8Way", "private": true, "sentence": "The angle _PARAM1_ 8-way index", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "mod(round(Angle * 8 / 360), 8)" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Angle", "name": "Angle", "type": "expression" } ], "objectGroups": [] }, { "description": "Check if angle is in a given direction.", "fullName": "Angle 4-way direction", "functionType": "Condition", "name": "IsAngleIn4WayDirection", "private": true, "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Right\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo4Way" }, "parameters": [ "", "=", "0", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Down\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo4Way" }, "parameters": [ "", "=", "1", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Left\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo4Way" }, "parameters": [ "", "=", "2", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Up\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo4Way" }, "parameters": [ "", "=", "3", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Angle", "name": "Angle", "type": "expression" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if angle is in a given direction.", "fullName": "Angle 8-way direction", "functionType": "Condition", "name": "IsAngleIn8WayDirection", "private": true, "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Right\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "0", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"DownRight\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "1", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Down\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "2", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"DownLeft\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "3", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Left\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "4", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"UpLeft\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "5", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"Up\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "6", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::CompareStrings" }, "parameters": [ "Direction", "=", "\"UpRight\"" ] }, { "type": { "value": "SpriteMultitouchJoystick::AngleTo8Way" }, "parameters": [ "", "=", "7", "Angle", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Angle", "name": "Angle", "type": "expression" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (4-way)", "functionType": "Condition", "name": "IsDirectionPushed4Way", "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::JoystickForce" }, "parameters": [ "", ">", "0", "ControllerIdentifier", "JoystickIdentifier", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" }, "parameters": [ "", "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (8-way)", "functionType": "Condition", "name": "IsDirectionPushed8Way", "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::JoystickForce" }, "parameters": [ "", ">", "0", "ControllerIdentifier", "JoystickIdentifier", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" }, "parameters": [ "", "SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", "private": true, "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "the force of multitouch contoller stick (from 0 to 1).", "fullName": "Stick force", "functionType": "ExpressionAndCondition", "name": "StickForce", "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "max(0, Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier)) / (1 - SpriteMultitouchJoystick::DeadZone(ControllerIdentifier, JoystickIdentifier))" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Stick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", "fullName": "Joystick force", "functionType": "Action", "name": "SetJoystickForce", "private": true, "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetNumberVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Force", "=", "Value" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "type": "string" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", "fullName": "Stick angle", "functionType": "Expression", "name": "StickAngle", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", "fullName": "Joystick angle", "functionType": "Action", "name": "SetJoystickAngle", "private": true, "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetNumberVariable" }, "parameters": [ "Controllers[ControllerIdentifier].Joystick[JoystickIdentifier].Angle", "=", "Value" ] } ] } ], "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "type": "string" }, { "description": "Value", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "description": "Return the multitouch contoller 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::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "SpriteMultitouchJoystick::JoystickForce(ControllerIdentifier, JoystickIdentifier) * cos(ToRad(SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)))" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Return the multitouch contoller 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::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "SpriteMultitouchJoystick::JoystickForce(ControllerIdentifier, JoystickIdentifier) * sin(ToRad(SpriteMultitouchJoystick::JoystickAngle(ControllerIdentifier, JoystickIdentifier)))" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier", "type": "expression" }, { "description": "Joystick name", "name": "JoystickIdentifier", "supplementaryInformation": "[\"Primary\",\"Secondary\"]", "type": "stringWithSelector" } ], "objectGroups": [] } ], "eventsBasedBehaviors": [ { "description": "Joystick that can be controlled by interacting with a touchscreen.", "fullName": "Multitouch Joystick", "name": "MultitouchJoystick", "objectType": "", "private": true, "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::SetDeadZone" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "DeadZoneRadius", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "onDeActivate", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "HasGameJustResumed" }, "parameters": [ "" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", "" ] } ] }, { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Manage touches", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "HasAnyTouchOrMouseStarted" }, "parameters": [ "" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "StartedTouchOrMouseCount()", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "CollisionPoint" }, "parameters": [ "Object", "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "StartedTouchOrMouseId(TouchIndex)" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" }, "parameters": [ "Object", "Behavior", "+", "1" ] } ] } ] } ] }, { "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, "g": 230, "r": 255, "textB": 0, "textG": 0, "textR": 0 }, "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "HasTouchEnded" }, "parameters": [ "", "TouchId" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" }, "parameters": [ "Object", "Behavior", "" ] } ] } ], "parameters": [] }, { "colorB": 228, "colorG": 176, "colorR": 74, "creationTime": 0, "name": "Update joystick position", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" }, "parameters": [ "Object", "Behavior", "!=", "0" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" }, "parameters": [ "Object", "Behavior", "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))", "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0))" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" }, "parameters": [ "Object", "Behavior", "=", "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(TouchId, Object.Layer(), 0), TouchY(TouchId, Object.Layer(), 0)) / Object.Width(), 0, 1)", "" ] } ] } ], "parameters": [] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "the joystick force (from 0 to 1).", "fullName": "Joystick force", "functionType": "ExpressionAndCondition", "name": "JoystickForce", "sentence": "the joystick force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "max(0, JoystickForce - DeadZoneRadius) / (1 - DeadZoneRadius)" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickForce", "name": "SetJoystickForce", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" }, "parameters": [ "Object", "Behavior", "=", "Value" ] }, { "type": { "value": "SpriteMultitouchJoystick::SetJoystickForce" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "JoystickForce", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", "fullName": "Joystick angle", "functionType": "Expression", "name": "JoystickAngle", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "JoystickAngle" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", "fullName": "Joystick angle", "functionType": "Action", "name": "SetJoystickAngle", "private": true, "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" }, "parameters": [ "Object", "Behavior", "=", "Value" ] }, { "type": { "value": "SpriteMultitouchJoystick::SetJoystickAngle" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "JoystickAngle", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" }, { "description": "Angle", "name": "Value", "type": "expression" } ], "objectGroups": [] }, { "description": "Return the 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::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "Return the 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::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (4-way movement)", "functionType": "Condition", "name": "IsDirectionPushed4Way", "sentence": "_PARAM0_ is pushed in direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" }, "parameters": [ "Object", "Behavior", ">", "0", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" }, "parameters": [ "", "JoystickAngle", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (8-way movement)", "functionType": "Condition", "name": "IsDirectionPushed8Way", "sentence": "_PARAM0_ is pushed in direction _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::JoystickForce" }, "parameters": [ "Object", "Behavior", ">", "0", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" }, "parameters": [ "", "JoystickAngle", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if a joystick is pressed.", "fullName": "Joystick pressed", "functionType": "Condition", "name": "IsPressed", "sentence": "Joystick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" }, "parameters": [ "Object", "Behavior", "!=", "0" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "Reset the joystick values (except for angle, which stays the same)", "fullName": "Reset", "functionType": "Action", "name": "Reset", "private": true, "sentence": "Reset the joystick of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" }, "parameters": [ "Object", "Behavior", "=", "0", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "the multitouch controller identifier.", "fullName": "Multitouch controller identifier", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "ControllerIdentifier", "sentence": "the multitouch controller identifier", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "ControllerIdentifier" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", "name": "SetControllerIdentifier", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "the joystick name.", "fullName": "Joystick name", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "JoystickIdentifier", "sentence": "the joystick name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "JoystickIdentifier" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", "name": "SetJoystickIdentifier", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "description": "the dead zone radius (range: 0 to 1) of the joystick. 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).", "fullName": "Dead zone radius", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "DeadZoneRadius", "sentence": "the dead zone radius", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "DeadZoneRadius" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", "name": "SetDeadZoneRadius", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" }, "parameters": [ "Object", "Behavior", "=", "Value" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { "value": "Primary", "type": "String", "label": "Joystick name", "name": "JoystickIdentifier" }, { "value": "0.4", "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "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)", "name": "DeadZoneRadius" }, { "value": "0", "type": "Number", "label": "Joystick angle (range: -180 to 180)", "hidden": true, "name": "JoystickAngle" }, { "value": "0", "type": "Number", "label": "Joystick force (range: 0 to 1)", "hidden": true, "name": "JoystickForce" }, { "value": "0", "type": "Number", "label": "", "hidden": true, "name": "TouchId" }, { "value": "", "type": "Number", "label": "", "hidden": true, "name": "TouchIndex" } ], "sharedPropertyDescriptors": [] }, { "description": "Detect button presses made on a touchscreen.", "fullName": "Multitouch button", "name": "MultitouchButton", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" }, "parameters": [ "Object", "Behavior", "" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" }, "parameters": [ "Object", "Behavior", "no" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" }, "parameters": [ "Object", "Behavior", "\"Idle\"", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" }, "parameters": [ "Object", "Behavior", "" ] }, { "type": { "value": "HasAnyTouchOrMouseStarted" }, "parameters": [ "" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "StartedTouchOrMouseCount()", "conditions": [], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CollisionPoint" }, "parameters": [ "Object", "TouchX(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)", "TouchY(StartedTouchOrMouseId(TouchIndex), Object.Layer(), 0)" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "StartedTouchOrMouseId(TouchIndex)" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" }, "parameters": [ "Object", "Behavior", "\"Pressed\"", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" }, "parameters": [ "Object", "Behavior", "+", "1" ] } ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" }, "parameters": [ "Object", "Behavior", "" ] }, { "type": { "value": "HasTouchEnded" }, "parameters": [ "", "TouchId" ] } ], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" }, "parameters": [ "Object", "Behavior", "\"Released\"", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" }, "parameters": [ "Object", "Behavior", "yes" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", "type": "behavior" } ], "objectGroups": [] }, { "description": "Check if button is released.", "fullName": "Button released", "functionType": "Condition", "name": "IsReleased", "sentence": "Button _PARAM0_ is released", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", "type": "behavior" } ], "objectGroups": [] }, { "description": "Check if button is pressed.", "fullName": "Button pressed", "functionType": "Condition", "name": "IsPressed", "sentence": "Button _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" }, "parameters": [ "Object", "Behavior", "!=", "0" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", "type": "behavior" } ], "objectGroups": [] }, { "fullName": "Button state", "functionType": "Action", "name": "SetButtonState", "private": true, "sentence": "Mark the button _PARAM0_ as _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::SetButtonState" }, "parameters": [ "", "ControllerIdentifier", "ButtonIdentifier", "ButtonState", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", "type": "behavior" }, { "description": "Button state", "name": "ButtonState", "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", "type": "stringWithSelector" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { "value": "A", "type": "String", "label": "Button identifier", "name": "ButtonIdentifier" }, { "value": "0", "type": "Number", "label": "TouchID", "hidden": true, "name": "TouchId" }, { "value": "", "type": "Number", "label": "", "hidden": true, "name": "TouchIndex" }, { "value": "", "type": "Boolean", "label": "Button released", "hidden": true, "name": "IsReleased" } ], "sharedPropertyDescriptors": [] }, { "description": "Control a platformer character with a multitouch controller.", "fullName": "Platformer multitouch controller mapper", "name": "PlatformerMultitouchMapper", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Left\"", "" ] } ], "actions": [ { "type": { "value": "PlatformBehavior::SimulateLeftKey" }, "parameters": [ "Object", "Property" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Right\"", "" ] } ], "actions": [ { "type": { "value": "PlatformBehavior::SimulateRightKey" }, "parameters": [ "Object", "Property" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Up\"", "" ] } ], "actions": [ { "type": { "value": "PlatformBehavior::SimulateUpKey" }, "parameters": [ "Object", "Property" ] }, { "type": { "value": "PlatformBehavior::SimulateLadderKey" }, "parameters": [ "Object", "Property" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Down\"", "" ] } ], "actions": [ { "type": { "value": "PlatformBehavior::SimulateDownKey" }, "parameters": [ "Object", "Property" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsButtonPressed" }, "parameters": [ "", "ControllerIdentifier", "JumpButton", "\"Down\"" ] } ], "actions": [ { "type": { "value": "PlatformBehavior::SimulateJumpKey" }, "parameters": [ "Object", "Property" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Platform character behavior", "extraInformation": [ "PlatformBehavior::PlatformerObjectBehavior" ], "choices": [], "name": "Property" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", "group": "Controls", "choices": [ { "label": "Primary", "value": "Primary" }, { "label": "Secondary", "value": "Secondary" } ], "name": "JoystickIdentifier" }, { "value": "A", "type": "String", "label": "Jump button name", "group": "Controls", "name": "JumpButton" } ], "sharedPropertyDescriptors": [] }, { "description": "Control a top-down character with a multitouch controller.", "fullName": "Top-down multitouch controller mapper", "name": "TopDownMultitouchMapper", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", "Behavior", "=", "\"Analog\"" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateStick" }, "parameters": [ "Object", "TopDownMovement", "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", "SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier)" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", "Behavior", "=", "\"360°\"" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateStick" }, "parameters": [ "Object", "TopDownMovement", "SpriteMultitouchJoystick::StickAngle(ControllerIdentifier, JoystickIdentifier)", "sign(SpriteMultitouchJoystick::StickForce(ControllerIdentifier, JoystickIdentifier))" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" }, "parameters": [ "Object", "Behavior", "=", "\"8 Directions\"" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "TopDownMovementBehavior::DiagonalsAllowed" }, "parameters": [ "Object", "TopDownMovement" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Left\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Right\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Up\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Down\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "TopDownMovementBehavior::DiagonalsAllowed" }, "parameters": [ "Object", "TopDownMovement" ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Left\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Right\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Up\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"Down\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"UpLeft\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, "parameters": [ "Object", "TopDownMovement" ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"UpRight\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateUpKey" }, "parameters": [ "Object", "TopDownMovement" ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"DownLeft\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, "parameters": [ "Object", "TopDownMovement" ] }, { "type": { "value": "TopDownMovementBehavior::SimulateLeftKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "", "ControllerIdentifier", "JoystickIdentifier", "\"DownRight\"", "" ] } ], "actions": [ { "type": { "value": "TopDownMovementBehavior::SimulateDownKey" }, "parameters": [ "Object", "TopDownMovement" ] }, { "type": { "value": "TopDownMovementBehavior::SimulateRightKey" }, "parameters": [ "Object", "TopDownMovement" ] } ] } ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SpriteMultitouchJoystick::TopDownMultitouchMapper", "type": "behavior" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "", "type": "Behavior", "label": "Top-down movement behavior", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], "choices": [], "name": "TopDownMovement" }, { "value": "1", "type": "Number", "label": "Controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", "choices": [ { "label": "Primary", "value": "Primary" }, { "label": "Secondary", "value": "Secondary" } ], "name": "JoystickIdentifier" }, { "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" } ], "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [ { "areaMaxX": 64, "areaMaxY": 64, "areaMaxZ": 64, "areaMinX": 0, "areaMinY": 0, "areaMinZ": 0, "defaultName": "Joystick", "description": "Joystick for touchscreens.", "fullName": "Multitouch Joystick", "isUsingLegacyInstancesRenderer": true, "name": "SpriteMultitouchJoystick", "objects": [ { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Thumb", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [], "animations": [ { "name": "Idle", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [] } ] } ] }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Border", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { "name": "MultitouchJoystick", "type": "SpriteMultitouchJoystick::MultitouchJoystick", "ControllerIdentifier": 1, "JoystickIdentifier": "Primary", "FloatingEnabled": false, "DeadZoneRadius": 0.4, "JoystickAngle": 0, "JoystickForce": 0, "TouchId": 0, "TouchIndex": 0 } ], "animations": [ { "name": "Idle", "useMultipleDirections": false, "directions": [ { "looping": false, "timeBetweenFrames": 0.08, "sprites": [] } ] } ] } ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ { "objectName": "Thumb" }, { "objectName": "Border" } ] }, "objectsGroups": [], "layers": [ { "ambientLightColorB": 200, "ambientLightColorG": 200, "ambientLightColorR": 200, "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": [], "editionSettings": {}, "eventsFunctions": [ { "fullName": "", "functionType": "Action", "name": "onCreated", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "Create" }, "parameters": [ "", "Border", "0", "0", "" ] }, { "type": { "value": "Create" }, "parameters": [ "", "Thumb", "0", "0", "" ] }, { "type": { "value": "ChangePlan" }, "parameters": [ "Border", "=", "1" ] }, { "type": { "value": "ChangePlan" }, "parameters": [ "Thumb", "=", "2" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Border", "=", "0", "=", "0" ] }, { "type": { "value": "SetCenter" }, "parameters": [ "Thumb", "=", "0", "=", "0" ] }, { "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, "parameters": [ "Object", "" ] }, { "type": { "value": "SetIncludedInParentCollisionMask" }, "parameters": [ "Thumb", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "doStepPostEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "MettreAutour" }, "parameters": [ "Thumb", "Border", "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", "Border.MultitouchJoystick::JoystickAngle()" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "fullName": "", "functionType": "Action", "name": "onHotReloading", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" }, "parameters": [ "Object", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "Pass the object property values to the behavior.", "fullName": "Update configuration", "functionType": "Action", "name": "UpdateConfiguration", "private": true, "sentence": "Update the configuration of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Object.PropertyControllerIdentifier()", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Object.PropertyJoystickIdentifier()", "" ] }, { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Object.PropertyDeadZoneRadius()", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "De/activate control of the joystick.", "fullName": "De/activate control", "functionType": "Action", "name": "ActivateControl", "sentence": "Activate control of _PARAM0_: _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "inverted": true, "value": "GetArgumentAsBoolean" }, "parameters": [ "\"ShouldActivate\"" ] } ], "actions": [ { "type": { "value": "ActivateBehavior" }, "parameters": [ "Border", "MultitouchJoystick", "no" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "GetArgumentAsBoolean" }, "parameters": [ "\"ShouldActivate\"" ] } ], "actions": [ { "type": { "value": "ActivateBehavior" }, "parameters": [ "Border", "MultitouchJoystick", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" }, { "description": "Activate", "name": "ShouldActivate", "type": "yesorno" } ], "objectGroups": [] }, { "description": "Check if a stick is pressed.", "fullName": "Stick pressed", "functionType": "Condition", "name": "IsPressed", "sentence": "Stick _PARAM0_ is pressed", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" }, "parameters": [ "Border", "MultitouchJoystick", "!=" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the joystick force (from 0 to 1).", "fullName": "Joystick force (deprecated)", "functionType": "ExpressionAndCondition", "name": "JoystickForce", "private": true, "sentence": "the joystick force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::JoystickForce()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the strick force (from 0 to 1).", "fullName": "Stick force", "functionType": "ExpressionAndCondition", "name": "StickForce", "sentence": "the stick force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::JoystickForce()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the stick force on X axis (from -1 at the left to 1 at the right).", "fullName": "Stick X force", "functionType": "ExpressionAndCondition", "name": "StickForceX", "sentence": "the stick X force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::StickForceX()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", "fullName": "Stick Y force", "functionType": "ExpressionAndCondition", "name": "StickForceY", "sentence": "the stick Y force", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::StickForceY()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "Return the angle the joystick is pointing towards (from -180 to 180).", "fullName": "Joystick angle (deprecated)", "functionType": "Expression", "name": "JoystickAngle", "private": true, "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::JoystickAngle()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "Return the angle the stick is pointing towards (from -180 to 180).", "fullName": "Stick angle", "functionType": "Expression", "name": "StickAngle", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::JoystickAngle()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (4-way movement)", "functionType": "Condition", "name": "IsDirectionPushed4Way", "sentence": "_PARAM0_ is pushed in direction _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed4Way" }, "parameters": [ "Border", "MultitouchJoystick", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "Check if joystick is pushed in a given direction.", "fullName": "Joystick pushed in a direction (8-way movement)", "functionType": "Condition", "name": "IsDirectionPushed8Way", "sentence": "_PARAM0_ is pushed in direction _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed8Way" }, "parameters": [ "Border", "MultitouchJoystick", "Direction", "" ] } ], "actions": [ { "type": { "value": "SetReturnBoolean" }, "parameters": [ "True" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" }, { "description": "Direction", "name": "Direction", "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", "type": "stringWithSelector" } ], "objectGroups": [] }, { "description": "the multitouch controller identifier (1, 2, 3, 4...).", "fullName": "Multitouch controller identifier", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "ControllerIdentifier", "sentence": "the multitouch controller identifier", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::PropertyControllerIdentifier()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "ControllerIdentifier", "name": "SetControllerIdentifier", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Value", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the joystick name of the object.", "fullName": "Joystick name", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "JoystickIdentifier", "sentence": "the joystick name", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnString" }, "parameters": [ "Border.MultitouchJoystick::PropertyJoystickIdentifier()" ] } ] } ], "expressionType": { "type": "string" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "JoystickIdentifier", "name": "SetJoystickIdentifier", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Value", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "description": "the dead zone radius of the joystick (range: 0 to 1). 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).", "fullName": "Dead zone radius", "functionType": "ExpressionAndCondition", "group": "Multitouch Joystick configuration", "name": "DeadZoneRadius", "sentence": "the dead zone radius", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ "Border.MultitouchJoystick::PropertyDeadZoneRadius()" ] } ] } ], "expressionType": { "type": "expression" }, "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] }, { "fullName": "", "functionType": "ActionWithOperator", "getterName": "DeadZoneRadius", "name": "SetDeadZoneRadius", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" }, "parameters": [ "Border", "MultitouchJoystick", "=", "Value", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "type": "object" } ], "objectGroups": [] } ], "propertyDescriptors": [ { "value": "1", "type": "Number", "label": "Multitouch controller identifier (1, 2, 3, 4...)", "name": "ControllerIdentifier" }, { "value": "Primary", "type": "Choice", "label": "Joystick name", "choices": [ { "label": "Primary", "value": "Primary" }, { "label": "Secondary", "value": "Secondary" } ], "name": "JoystickIdentifier" }, { "value": "0.4", "type": "Number", "label": "Dead zone radius (range: 0 to 1)", "description": "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)", "name": "DeadZoneRadius" }, { "value": "Center-center", "type": "String", "label": "", "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], "choices": [], "hidden": true, "name": "ThumbAnchorOrigin" }, { "value": "Center-center", "type": "Number", "label": "", "description": "Only used by the scene editor.", "hidden": true, "name": "ThumbAnchorTarget" }, { "value": "true", "type": "Boolean", "label": "", "description": "Only used by the scene editor.", "extraInformation": [ "Thumb" ], "choices": [], "hidden": true, "name": "ThumbIsScaledProportionally" }, { "value": "Center-center", "type": "String", "label": "", "description": "Only used by the scene editor.", "hidden": true, "name": "ParentOrigin" } ], "variants": [] } ] }, { "author": "", "category": "Camera", "extensionNamespace": "", "fullName": "Smooth Camera", "gdevelopVersion": "", "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.3.2", "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": [], "eventsBasedBehaviors": [ { "description": "Smoothly scroll to follow an object.", "fullName": "Smooth Camera", "name": "SmoothCamera", "objectType": "", "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": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" }, "parameters": [ "Object", "Behavior" ] } ], "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": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" }, "parameters": [ "Object", "Behavior", "yes" ] }, { "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": "SmoothCamera::SmoothCamera::PropertyFollowOnX" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" }, "parameters": [ "Object", "Behavior", "=", "CameraX(Object.Layer(), 0)" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CameraX" }, "parameters": [ "", ">", "Object.Behavior::FreeAreaRight()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraX" }, "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": "CameraX" }, "parameters": [ "", "<", "OldX - LeftwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraX" }, "parameters": [ "", "=", "OldX - LeftwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CameraX" }, "parameters": [ "", "<", "Object.Behavior::FreeAreaLeft()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraX" }, "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": "CameraX" }, "parameters": [ "", ">", "OldX + RightwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraX" }, "parameters": [ "", "=", "OldX + RightwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" }, "parameters": [ "Object", "Behavior" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" }, "parameters": [ "Object", "Behavior", "=", "CameraY(Object.Layer(), 0)" ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CameraY" }, "parameters": [ "", ">", "Object.Behavior::FreeAreaBottom()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraY" }, "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": "CameraY" }, "parameters": [ "", "<", "OldY - UpwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraY" }, "parameters": [ "", "=", "OldY - UpwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "CameraY" }, "parameters": [ "", "<", "Object.Behavior::FreeAreaTop()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraY" }, "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": "CameraY" }, "parameters": [ "", ">", "OldY + DownwardSpeedMax * TimeDelta()", "Object.Layer()", "0" ] } ], "actions": [ { "type": { "value": "SetCameraY" }, "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": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" }, "parameters": [ "Object", "Behavior", "=", "TimeFromStart() + WaitingDuration" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" }, "parameters": [ "Object", "Behavior", "=", "WaitingSpeedXMax" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" }, "parameters": [ "Object", "Behavior", "=", "WaitingSpeedYMax" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" }, "parameters": [ "Object", "Behavior", "=", "CatchUpDuration" ] } ] }, { "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": "WaitingDuration", "type": "expression" }, { "description": "Waiting maximum camera target speed X", "name": "WaitingSpeedXMax", "type": "expression" }, { "description": "Waiting maximum camera target speed Y", "name": "WaitingSpeedYMax", "type": "expression" }, { "description": "Catch up duration (in seconds)", "name": "CatchUpDuration", "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": "Egal" }, "parameters": [ "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", ">", "0" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "+", "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": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" }, "parameters": [ "Object", "Behavior", "!=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" }, "parameters": [ "Object", "Behavior", "!=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" }, "parameters": [ "Object", "Behavior", "!=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" }, "parameters": [ "Object", "Behavior", "!=", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" }, "parameters": [ "Object", "Behavior", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "GetArgumentAsBoolean" }, "parameters": [ "\"FollowOnX\"" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" }, "parameters": [ "Object", "Behavior", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow on X axis", "name": "FollowOnX", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" }, "parameters": [ "Object", "Behavior", "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "GetArgumentAsBoolean" }, "parameters": [ "\"FollowOnY\"" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" }, "parameters": [ "Object", "Behavior", "yes" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow on Y axis", "name": "FollowOnY", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" }, "parameters": [ "Object", "Behavior", "=", "max(0, SetFollowFreeAreaRight)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow free area right border", "name": "SetFollowFreeAreaRight", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" }, "parameters": [ "Object", "Behavior", "=", "max(0, SetFollowFreeAreaLeft)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow free area left border", "name": "SetFollowFreeAreaLeft", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" }, "parameters": [ "Object", "Behavior", "=", "max(0, FollowFreeAreaTop)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow free area top border", "name": "FollowFreeAreaTop", "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": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" }, "parameters": [ "Object", "Behavior", "=", "max(0, SetFollowFreeAreaBottom)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Follow free area bottom border", "name": "SetFollowFreeAreaBottom", "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": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" }, "parameters": [ "Object", "Behavior", "=", "max(0, Speed)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Leftward maximum speed (in ratio per second)", "name": "Speed", "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": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" }, "parameters": [ "Object", "Behavior", "=", "max(0, Speed)" ] } ] } ], "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": "Speed", "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": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" }, "parameters": [ "Object", "Behavior", "=", "max(0, Speed)" ] } ] } ], "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": "Speed", "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": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" }, "parameters": [ "Object", "Behavior", "=", "max(0, Speed)" ] } ] } ], "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": "Speed", "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": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "clamp(0, 1, LeftwardSpeed)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "log(1 - LeftwardSpeed)" ] } ] } ], "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": "LeftwardSpeed", "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": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "clamp(0, 1, RightwardSpeed)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "log(1 - RightwardSpeed)" ] } ] } ], "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": "RightwardSpeed", "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": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "clamp(0, 1, DownwardSpeed)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "log(1 - DownwardSpeed)" ] } ] } ], "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": "DownwardSpeed", "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": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "clamp(0, 1, UpwardSpeed)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" }, "parameters": [ "Object", "Behavior", "=", "log(1 - UpwardSpeed)" ] } ] } ], "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": "UpwardSpeed", "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", "name": "SetOffsetXOp", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" }, "parameters": [ "Object", "Behavior", "=", "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", "=", "CameraOffsetX", "" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Camera offset X", "name": "CameraOffsetX", "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", "name": "SetOffsetYOp", "sentence": "", "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::SetPropertyCameraOffsetY" }, "parameters": [ "Object", "Behavior", "=", "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::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": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" }, "parameters": [ "Object", "Behavior", "=", "min(0, ForecastTime)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Forecast time", "name": "ForecastTime", "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": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" }, "parameters": [ "Object", "Behavior", "=", "min(0, CameraDelay)" ] } ] } ], "parameters": [ { "description": "Object", "name": "Object", "type": "object" }, { "description": "Behavior", "name": "Behavior", "supplementaryInformation": "SmoothCamera::SmoothCamera", "type": "behavior" }, { "description": "Camera delay", "name": "CameraDelay", "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": "Egal" }, "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": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" }, "parameters": [ "Object", "Behavior", "=", "Object.CenterX()" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" }, "parameters": [ "Object", "Behavior", "=", "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": "Egal" }, "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": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" }, "parameters": [ "Object", "Behavior", "=", "Object.Variable(__SmoothCamera.ObjectX[0])" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" }, "parameters": [ "Object", "Behavior", "=", "Object.Variable(__SmoothCamera.ObjectY[0])" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "Egal" }, "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": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" }, "parameters": [ "Object", "Behavior", "+", "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": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" }, "parameters": [ "Object", "Behavior", ">", "0" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" }, "parameters": [ "Object", "Behavior", "=", "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": "Egal" }, "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": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" }, "parameters": [ "Object", "Behavior", ">", "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": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" }, "parameters": [ "Object", "Behavior", ">", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" }, "parameters": [ "Object", "Behavior", ">", "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": "Egal" }, "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": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" }, "parameters": [ "Object", "Behavior", "=", "DelayedCenterX" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" }, "parameters": [ "Object", "Behavior", "=", "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": "Egal" }, "parameters": [ "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", ">=", "2" ] }, { "type": { "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" }, "parameters": [ "Object", "Behavior", ">", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" }, "parameters": [ "Object", "Behavior", ">", "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": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] }, { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" }, "parameters": [ "Object", "Behavior", "+", "Object.Variable(__SmoothCamera.ForecastHistoryX[Index])" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "+", "1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" }, "parameters": [ "Object", "Behavior", "/", "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": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] }, { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" }, "parameters": [ "Object", "Behavior", "+", "Object.Variable(__SmoothCamera.ForecastHistoryY[Index])" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "+", "1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" }, "parameters": [ "Object", "Behavior", "/", "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": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" }, "parameters": [ "Object", "Behavior", "=", "0" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "0" ] } ] }, { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" }, "parameters": [ "Object", "Behavior", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" }, "parameters": [ "Object", "Behavior", "+", "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" }, "parameters": [ "Object", "Behavior", "+", "(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "+", "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": "Egal" }, "parameters": [ "abs(ForecastHistoryVarianceX)", "<", "1" ] }, { "type": { "value": "Egal" }, "parameters": [ "abs(ForecastHistoryVarianceY)", "<", "1" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" }, "parameters": [ "Object", "Behavior", "=", "DelayedCenterX" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" }, "parameters": [ "Object", "Behavior", "=", "DelayedCenterY" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Or" }, "parameters": [], "subInstructions": [ { "type": { "value": "Egal" }, "parameters": [ "abs(ForecastHistoryVarianceX)", ">=", "1" ] }, { "type": { "value": "Egal" }, "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": "Egal" }, "parameters": [ "abs(ForecastHistoryVarianceX)", ">=", "abs(ForecastHistoryVarianceY)" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" }, "parameters": [ "Object", "Behavior", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceX" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" }, "parameters": [ "Object", "Behavior", "=", "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": "Egal" }, "parameters": [ "abs(ForecastHistoryVarianceX)", "<", "abs(ForecastHistoryVarianceY)" ] } ], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" }, "parameters": [ "Object", "Behavior", "=", "ForecastHistoryCovariance / ForecastHistoryVarianceY" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "ProjectedOldestX" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" }, "parameters": [ "Object", "Behavior", "=", "ProjectedOldestY" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" }, "parameters": [ "Object", "Behavior", "=", "Index" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" }, "parameters": [ "Object", "Behavior", "=", "ProjectedNewestX" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" }, "parameters": [ "Object", "Behavior", "=", "ProjectedNewestY" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" }, "parameters": [ "Object", "Behavior", "=", "ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" }, "parameters": [ "Object", "Behavior", "=", "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": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" }, "parameters": [ "Object", "Behavior", "=", "(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" }, "parameters": [ "Object", "Behavior", "=", "NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" }, "parameters": [ "Object", "Behavior", "=", "(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))" ] }, { "type": { "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" }, "parameters": [ "Object", "Behavior", "=", "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": [] } ], "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" } ], "sharedPropertyDescriptors": [] }, { "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", "fullName": "Smooth platformer camera", "name": "SmoothPlatformerCamera", "objectType": "", "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": [] } ], "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" } ], "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] } ], "externalLayouts": [] }