From 498b78bc269c98c2dbc4a54372500d2d7b89d363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 14 Apr 2023 20:32:20 +0200 Subject: [PATCH 001/114] WIP --- examples/smoothy/README.md | 1 + examples/smoothy/TAGS.md | 1 + examples/smoothy/assets/BlueBubble.png | Bin 0 -> 478 bytes examples/smoothy/assets/Cross.png | Bin 0 -> 208 bytes examples/smoothy/assets/GreenBubble.png | Bin 0 -> 476 bytes examples/smoothy/assets/Launcher.png | Bin 0 -> 4861 bytes examples/smoothy/assets/PurpuleBubble.png | Bin 0 -> 476 bytes examples/smoothy/assets/RedBubble.png | Bin 0 -> 473 bytes examples/smoothy/assets/SideBorder.png | Bin 0 -> 180 bytes examples/smoothy/assets/TopBorder.png | Bin 0 -> 179 bytes examples/smoothy/assets/YellowBubble.png | Bin 0 -> 477 bytes examples/smoothy/smoothy.json | 18097 ++++++++++++++++++++ 12 files changed, 18099 insertions(+) create mode 100644 examples/smoothy/README.md create mode 100644 examples/smoothy/TAGS.md create mode 100644 examples/smoothy/assets/BlueBubble.png create mode 100644 examples/smoothy/assets/Cross.png create mode 100644 examples/smoothy/assets/GreenBubble.png create mode 100644 examples/smoothy/assets/Launcher.png create mode 100644 examples/smoothy/assets/PurpuleBubble.png create mode 100644 examples/smoothy/assets/RedBubble.png create mode 100644 examples/smoothy/assets/SideBorder.png create mode 100644 examples/smoothy/assets/TopBorder.png create mode 100644 examples/smoothy/assets/YellowBubble.png create mode 100644 examples/smoothy/smoothy.json diff --git a/examples/smoothy/README.md b/examples/smoothy/README.md new file mode 100644 index 000000000..122c0cc7e --- /dev/null +++ b/examples/smoothy/README.md @@ -0,0 +1 @@ +A Bust-a-Move clone to show how to make a match 3 game. \ No newline at end of file diff --git a/examples/smoothy/TAGS.md b/examples/smoothy/TAGS.md new file mode 100644 index 000000000..2928a3cb5 --- /dev/null +++ b/examples/smoothy/TAGS.md @@ -0,0 +1 @@ +game \ No newline at end of file diff --git a/examples/smoothy/assets/BlueBubble.png b/examples/smoothy/assets/BlueBubble.png new file mode 100644 index 0000000000000000000000000000000000000000..9df3950d1d96142f4aac89177fe5b5690350bd12 GIT binary patch literal 478 zcmV<40U`d0P)pGkV!;AR7l6gm&s1UFc5|fT!1%XDNACG91zQk02RGe2*l27u)G8p zptj*93KeR(*}hN?F*CsgmC`h6635b?N=cm0_ISpB2}#g4Z_R`!^n%aT1*ie)fIh7{ z;XS6#;kSbClB{j!(M(aH_B^iM;iD#@a3EFeI}(%%y#*g=r2zhseDRsyNKQ0njB;6r z&cW!=NCD;QxNgjNEE8YwxV*^$*efQlW8ofCN4Z0-U=D%r ztv+ziZif-?V(z8MQz(f$*f;ZkC|oMEE9e~X5Vr&ATD9%H)8!{MmvmXb0Esc9 U&!K5aoB#j-07*qoM6N<$f{o$PfdBvi literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/Cross.png b/examples/smoothy/assets/Cross.png new file mode 100644 index 0000000000000000000000000000000000000000..009f1e68e8752f1807cf89a74eb4132f85f7661c GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3oCO|{#S9GGLLkg|>2BR0pkR}y zi(`n#@#F*v)`|mvL!STtVQ^P>$u4G(trN8P7F-G1q@#XJA*N=Nu6mfUV&Nnp#k}#8 zOQcVix93)g^-q`Vm?UCaadncE{*#EFP}{X$3l}CEuDscl^SAlfqluEoOHTSRhc)nI zOtegxdZZz&oB5i6#D!(&8_d43ZKpGj!8s8R7l6gmrG8=Fc5|fY=9f_C=c5#S)c+J0V>!<2*j&!1vc1$ zZn**ot^ri2?JmxSvWS_9OiC%FX_MHNenpDneDTcK^M{ZOqoKE^L`avUVwb*RPjGF6 zK8@PuULCF#e3s-L4Lvs_72lVNcHqT2qwu3@ICm_l4EZ*^pg97tUjcjdL$;Y2s5O}o z0ry~XG&Z!S$XEQ-)81q%6d#ZQy(<9NClRpQR5;}Fq-ba_^!z9-r@BN%z^D#ZFBC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uOQQNKozYEtsU40oW&Bus1E)X8K(cGUiL} z!r<?AQYIM^I`}bI4eydDRM=jNV;cvIsTe^O(tZ*1?ir1DL+}8nc3YR=odm=z5IxVP~aTAIVOV%^n!D63pKHaHm;?z3q!R7_&S+EKJt8 zm<~1fknOPI1FXF)bqc_J9Gm|i3XTfx3OWb8#LYrFMlJL1O39VEw8#1la$}cx_L1I# P00000NkvXXu0mjf)E(27 literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/SideBorder.png b/examples/smoothy/assets/SideBorder.png new file mode 100644 index 0000000000000000000000000000000000000000..f1fbf4d330cf242d92075285a3885da2e5e1a57e GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GGLLkg|>2BR0pkSJ( zi(^Q|t+y8p1sNDPSQLJX8_u-6Co_*nWP#D#^Ii=Mj7%&X0tyb4Fm~iKo;k4CbLuLG Qa-fY2p00i_>zopr05cdSDF6Tf literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/TopBorder.png b/examples/smoothy/assets/TopBorder.png new file mode 100644 index 0000000000000000000000000000000000000000..c6c4cf8f1176edef2f5662eff17ca5a6febf1e38 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GGLLkg|>2BR0pkS(} zi(^Q|t+y8(1sNDv7z|Xe3VOO0SyZn%u*mB9W&s6<1_nkZ77mIS@1pJHm?GEZ9L@(? O$l&Sf=d#Wzp$PyqQYEGU literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/YellowBubble.png b/examples/smoothy/assets/YellowBubble.png new file mode 100644 index 0000000000000000000000000000000000000000..4000fa6985b310b7820d3b7835eb8ba72342ac91 GIT binary patch literal 477 zcmV<30V4j1P)pGk4Z#9R7l6gm&s1UFc5}Kxd3m(QWo1BIiLbB!Xmgu2*l27usjD) z4oJk|0T57C4YxQK${}VZH4UYZCQaf*`Y%@OKb{$nzYvn(QP-=ZzC&lF!_K5&b&w1C z)N=LMDX5C?lB|!qn;e%m-D!=fsoT=>8(oI8}MZ}T-+q>;j~N1kA>zF;fKcd5vT zC%6TZgJDg7D1e9^DrHp$m|7Ljp;tK={@(p%thsdPLEfg3Ip2%RsVY!`FLHJwQh4rc}}yc6*d{)S)4Oy+L6s?h_vasabv+xAiw*kH=4bkLax~h-RxN6+^iB9R38FG`kmic`*W8*d$=Jn`W ze4ZZzK6)`={MHA72xd8PRt$g9<-gHKu>Hc&$6>qium@mP0PI~PAk7l+wm0XzmW9K@ zV*M|t1K}R39q#K*JbP)*DYV25oSXe03POdrg5-dgxc-o~R!ff^%g2T3q+$I6n0~tq T7!{KA00000NkvXXu0mjf6pYz| literal 0 HcmV?d00001 diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json new file mode 100644 index 000000000..5abe4fe28 --- /dev/null +++ b/examples/smoothy/smoothy.json @@ -0,0 +1,18097 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "folderProject": false, + "orientation": "portrait", + "packageName": "com.example.smoothy", + "pixelsRounding": false, + "projectUuid": "14f2c425-ec16-42f0-9cf9-160a087b5e26", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Smoothy", + "description": "", + "author": "", + "windowWidth": 854, + "windowHeight": 480, + "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": "", + "liluo-thumbnail": "square-icon.png" + }, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0.2, + "minDuration": 0, + "progressBarColor": 16777215, + "progressBarHeight": 20, + "progressBarMaxWidth": 200, + "progressBarMinWidth": 40, + "progressBarWidthPercent": 30, + "showGDevelopSplash": false, + "showProgressBar": false + }, + "watermark": { + "placement": "bottom-left", + "showWatermark": true + }, + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "authorUsernames": [], + "categories": [ + "action" + ], + "playableDevices": [ + "keyboard", + "mobile" + ], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/BlueBubble.png", + "kind": "image", + "metadata": "", + "name": "BlueBubble.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/GreenBubble.png", + "kind": "image", + "metadata": "", + "name": "GreenBubble.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/PurpuleBubble.png", + "kind": "image", + "metadata": "", + "name": "PurpuleBubble.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/RedBubble.png", + "kind": "image", + "metadata": "", + "name": "RedBubble.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/YellowBubble.png", + "kind": "image", + "metadata": "", + "name": "YellowBubble.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Launcher.png", + "kind": "image", + "metadata": "", + "name": "Launcher.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/SideBorder.png", + "kind": "image", + "metadata": "", + "name": "SideBorder.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/TopBorder.png", + "kind": "image", + "metadata": "", + "name": "TopBorder.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Cross.png", + "kind": "image", + "metadata": "", + "name": "Cross.png", + "smoothed": true, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsGroups": [], + "variables": [ + { + "name": "level", + "type": "string", + "value": "0" + } + ], + "layouts": [ + { + "b": 49, + "disableInputWhenNotFocused": true, + "mangledName": "Game", + "name": "Game", + "r": 99, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 84, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 16, + "gridHeight": 28, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 0.8086342783490695, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "LevelBubble", + "objects": [ + { + "name": "BlueBubble" + }, + { + "name": "YellowBubble" + }, + { + "name": "GreenBubble" + }, + { + "name": "PurpuleBubble" + }, + { + "name": "RedBubble" + } + ] + }, + { + "name": "LinkedBubble", + "objects": [ + { + "name": "BoardBubble" + }, + { + "name": "LinkBubble" + } + ] + } + ], + "variables": [ + { + "name": "neighbors", + "type": "array", + "children": [ + { + "type": "string", + "value": "Left" + }, + { + "type": "string", + "value": "Right" + }, + { + "type": "string", + "value": "TopLeft" + }, + { + "type": "string", + "value": "TopRight" + }, + { + "type": "string", + "value": "BottomLeft" + }, + { + "type": "string", + "value": "BottomRight" + } + ] + }, + { + "name": "neighbor", + "type": "string", + "value": "" + }, + { + "name": "remainingColors", + "type": "array", + "children": [ + { + "type": "string", + "value": "Yellow" + }, + { + "type": "string", + "value": "Green" + }, + { + "type": "string", + "value": "Blue" + }, + { + "type": "string", + "value": "Purple" + }, + { + "type": "string", + "value": "Red" + } + ] + }, + { + "name": "colors", + "type": "array", + "children": [ + { + "type": "string", + "value": "Yellow" + }, + { + "type": "string", + "value": "Green" + }, + { + "type": "string", + "value": "Blue" + }, + { + "type": "string", + "value": "Purple" + }, + { + "type": "string", + "value": "Red" + } + ] + } + ], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Launcher", + "persistentUuid": "b21107d6-61ef-43ae-9d45-209d3d84434d", + "width": 0, + "x": 427, + "y": 240, + "zOrder": 68, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "AimingBubble", + "persistentUuid": "3007bc8e-0dbe-415c-b428-f048fafc109d", + "width": 0, + "x": 380, + "y": 234, + "zOrder": 69, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 520, + "layer": "Borders", + "name": "SideBorder", + "persistentUuid": "3f9c5de6-7866-48f6-999c-8f40039a2863", + "width": 64, + "x": 272, + "y": -20, + "zOrder": 70, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 520, + "layer": "Borders", + "name": "SideBorder", + "persistentUuid": "3be23a1e-eb82-4a53-9d62-040fda58ac39", + "width": 64, + "x": -64, + "y": -19, + "zOrder": 70, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "Borders", + "name": "TopBorder", + "persistentUuid": "ffc2cc08-315e-4def-8410-0466893b8960", + "width": 304, + "x": -16, + "y": -64, + "zOrder": 90, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Gutter", + "persistentUuid": "f0753a74-8af3-4f34-8e31-ca589091383d", + "width": 0, + "x": 16, + "y": -56, + "zOrder": 91, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "BoardBubble", + "persistentUuid": "caed0356-7c01-47a8-9b13-caed8e249e9e", + "width": 0, + "x": -16, + "y": 233, + "zOrder": 92, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "YellowBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [ + { + "name": "Right", + "x": 47, + "y": 15 + }, + { + "name": "Left", + "x": -16, + "y": 15 + }, + { + "name": "UpRight", + "x": -1, + "y": -12 + }, + { + "name": "UpLeft", + "x": 31, + "y": -12 + }, + { + "name": "DownRight", + "x": -1, + "y": 43 + }, + { + "name": "DownLeft", + "x": 31, + "y": 43 + } + ], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "GreenBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [ + { + "name": "Right", + "x": 47, + "y": 15 + }, + { + "name": "Left", + "x": -16, + "y": 15 + }, + { + "name": "UpRight", + "x": -1, + "y": -12 + }, + { + "name": "UpLeft", + "x": 31, + "y": -12 + }, + { + "name": "DownRight", + "x": -1, + "y": 43 + }, + { + "name": "DownLeft", + "x": 31, + "y": 43 + } + ], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "BlueBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [ + { + "name": "Right", + "x": 47, + "y": 15 + }, + { + "name": "Left", + "x": -16, + "y": 15 + }, + { + "name": "TopRight", + "x": -1, + "y": -12 + }, + { + "name": "TopLeft", + "x": 31, + "y": -12 + }, + { + "name": "BottomRight", + "x": -1, + "y": 43 + }, + { + "name": "BottomLeft", + "x": 31, + "y": 43 + } + ], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "PurpuleBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [ + { + "name": "Right", + "x": 47, + "y": 15 + }, + { + "name": "Left", + "x": -16, + "y": 15 + }, + { + "name": "UpRight", + "x": -1, + "y": -12 + }, + { + "name": "UpLeft", + "x": 31, + "y": -12 + }, + { + "name": "DownRight", + "x": -1, + "y": 43 + }, + { + "name": "DownLeft", + "x": 31, + "y": 43 + } + ], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "RedBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [ + { + "name": "Right", + "x": 47, + "y": 15 + }, + { + "name": "Left", + "x": -16, + "y": 15 + }, + { + "name": "UpRight", + "x": -1, + "y": -12 + }, + { + "name": "UpLeft", + "x": 31, + "y": -12 + }, + { + "name": "DownRight", + "x": -1, + "y": 43 + }, + { + "name": "DownLeft", + "x": 31, + "y": 43 + } + ], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Mark", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Cross-1", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Cross.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Launcher", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Turret", + "type": "Turret::Turret", + "SpeedMax": 360, + "Acceleration": 1440, + "Deceleration": 36000, + "Property": false, + "AngleMin": 0, + "AngleMax": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Launcher.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 75, + "y": 75 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "BoardBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": false, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], + "animations": [ + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "LinkBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "AimingBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "FireBullet", + "type": "FireBullet::FireBullet", + "FireCooldown": 0.1, + "HasJustFired": false + } + ], + "animations": [ + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "MovingBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "extraBorder": 32, + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside" + } + ], + "animations": [ + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 5 + }, + { + "x": 30, + "y": 15 + }, + { + "x": 25, + "y": 25 + }, + { + "x": 15, + "y": 30 + }, + { + "x": 5, + "y": 25 + }, + { + "x": 0, + "y": 15 + }, + { + "x": 5, + "y": 5 + }, + { + "x": 15, + "y": 0 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 5 + }, + { + "x": 30, + "y": 15 + }, + { + "x": 25, + "y": 25 + }, + { + "x": 15, + "y": 30 + }, + { + "x": 5, + "y": 25 + }, + { + "x": 0, + "y": 15 + }, + { + "x": 5, + "y": 5 + }, + { + "x": 15, + "y": 0 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 5 + }, + { + "x": 30, + "y": 15 + }, + { + "x": 25, + "y": 25 + }, + { + "x": 15, + "y": 30 + }, + { + "x": 5, + "y": 25 + }, + { + "x": 0, + "y": 15 + }, + { + "x": 5, + "y": 5 + }, + { + "x": 15, + "y": 0 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 5 + }, + { + "x": 30, + "y": 15 + }, + { + "x": 25, + "y": 25 + }, + { + "x": 15, + "y": 30 + }, + { + "x": 5, + "y": 25 + }, + { + "x": 0, + "y": 15 + }, + { + "x": 5, + "y": 5 + }, + { + "x": 15, + "y": 0 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 5 + }, + { + "x": 30, + "y": 15 + }, + { + "x": 25, + "y": 25 + }, + { + "x": 15, + "y": 30 + }, + { + "x": 5, + "y": 25 + }, + { + "x": 0, + "y": 15 + }, + { + "x": 5, + "y": 5 + }, + { + "x": 15, + "y": 0 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "FallingBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "DestroyOutside", + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 32 + } + ], + "animations": [ + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "SideBorder", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "NewObject", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "SideBorder.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "TopBorder", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "NewObject", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "TopBorder.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Gutter", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 32, + "outlineOpacity": 255, + "fillColor": { + "b": 27, + "g": 46, + "r": 54 + }, + "outlineColor": { + "b": 27, + "g": 46, + "r": 54 + }, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none" + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Level Link Graph", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "AimingBubble", + "=", + "RandomInRange(0,4)" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "\"Gutter\"", + "\"m-16 233s72.5-23.5 123 81c50.3 104 193 128 329 129 135 0.349 334-44.8 336-205 1.3-160-230-211-358-209s-248 64.6-249 176c-0.465 112 158 163 260 164s205-56.8 205-131c0.682-74.4-89.5-128-206-128\"", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Gutter", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "levelCompled", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveCounterClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CursorMovement::CursorStayStill" + }, + "parameters": [ + "", + "1", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveToward" + }, + "parameters": [ + "Launcher", + "Turret", + "MouseX(\"\", 0)", + "MouseY(\"\", 0)", + "3", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::IsMoving" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngleToward" + }, + "parameters": [ + "Launcher", + "Turret", + "MouseX(\"\", 0)", + "MouseY(\"\", 0)", + "3" + ] + }, + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "LShift" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "AimingBubble", + "FireBullet", + "AimingBubble.X()", + "AimingBubble.Y()", + "MovingBubble", + "Launcher.Turret::AimingAngle()", + "300", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "AimingBubble", + "BoardBubble", + "", + "", + "yes" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Game\"", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Moving Bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The mustGlue variable avoid to have the BoardBuble from the collision in the context because otherwise it will change color too.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "", + "", + "yes" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Arreter" + }, + "parameters": [ + "MovingBubble" + ] + }, + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "MovingBubble", + "mustGlue", + "True" + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 1702453580, + "ambientLightColorG": 6022704, + "ambientLightColorR": 167801445, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Borders", + "visibility": false, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 36, + "ambientLightColorG": 7379992, + "ambientLightColorR": 32, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "FireBullet", + "type": "FireBullet::FireBullet" + }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement" + }, + { + "name": "Turret", + "type": "Turret::Turret" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Game", + "lastChangeTimeStamp": 0, + "name": "UpdateRemainingColors", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "remainingColors" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "colors", + "valueIteratorVariableName": "color", + "keyIteratorVariableName": "index", + "conditions": [ + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(color)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SceneVariablePushString" + }, + "parameters": [ + "remainingColors", + "VariableString(color)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "VariableChildCount(remainingColors)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "levelCompleted", + "True" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "D8H", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "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IgeDE9IjgiIHkxPSI3IiB4Mj0iOCIgeTI9IjkiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjIzIiB4Mj0iMTgiIHkyPSIyNSIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTEwLjQsMTYuNmMwLjUsMC41LDEuMywwLjUsMS44LDBsMC44LTAuOGwwLjgsMC44YzAuNSwwLjUsMS4zLDAuNSwxLjgsMGMwLjUtMC41LDAuNS0xLjQsMC0xLjlsLTAuOC0wLjhMMTMsMTINCglsLTEuOCwxLjlsLTAuOCwwLjhDOS45LDE1LjIsOS45LDE2LjEsMTAuNCwxNi42eiIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjEyIiB5MT0iMjAiIHgyPSIxNCIgeTI9IjIwIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTMiIHkxPSIxNyIgeDI9IjEzIiB5Mj0iMTkiLz4NCjwvc3ZnPg0K", + "name": "ObjectStack", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_cards_game_solitaire_poker_blackjack_casino.svg", + "shortDescription": "An ordered list of objects and a shuffle action.", + "version": "0.0.8", + "description": [ + "It provides:", + "* Actions to modify a stack of objects", + "* Conditions to access the objects of a stack", + "* A shuffle action", + "", + "It can be helpful for:", + "* Card games", + "* Fair randomness (for instance, to create a stack of predetermined bonus and randomize the order they appear)", + "", + "2 examples use it:", + "* A card system demonstration ([open the project online](https://editor.gdevelop.io/?project=example://card-system))", + "* A Klondike solitaire ([open the project online](https://editor.gdevelop.io/?project=example://klondike-solitaire))" + ], + "origin": { + "identifier": "ObjectStack", + "name": "gdevelop-extension-store" + }, + "tags": [ + "card", + "stack", + "pick", + "list", + "queue" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if the stack contains the object between a range.", + "fullName": "Contain between a range", + "functionType": "Condition", + "name": "ContainsBetween", + "sentence": "_PARAM3_ is into the stack of _PARAM1_ between _PARAM4_ and _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const stackBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "/** @type {Hashtable} */", + "const stackObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");", + "/** @type {Hashtable} */", + "const elementObjectsLists = eventsFunctionContext.getObjectsLists(\"Element\");", + "const lowerBound = Math.max(0, eventsFunctionContext.getArgument(\"LowerBound\"));", + "let upperBound = eventsFunctionContext.getArgument(\"UpperBound\");", + "", + "eventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(", + " (stackObject, element, stackBehaviorName) => {", + " const behavior = stackObject.getBehavior(stackBehaviorName);", + " /** @type {gdjs.RuntimeObject[]} */", + " const stack = behavior.objectStack;", + " let found = false;", + " upperBound = Math.min(upperBound, stack.length - 1);", + " for (let i = lowerBound; i <= upperBound && !found; i++) {", + " found = stack[i] === element;", + " }", + " return found;", + " },", + " stackObjectsLists,", + " elementObjectsLists,", + " false,", + " stackBehaviorName", + ");" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Stack", + "name": "Object", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + }, + { + "description": "Lower bound", + "name": "LowerBound", + "type": "expression" + }, + { + "description": "Upper bound", + "name": "UpperBound", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is on the stack top.", + "fullName": "Stack top", + "functionType": "Condition", + "name": "HasOnTop", + "sentence": "_PARAM3_ is on top of the stack of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const stackBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "/** @type {Hashtable} */", + "const stackObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");", + "/** @type {Hashtable} */", + "const elementObjectsLists = eventsFunctionContext.getObjectsLists(\"Element\");", + "", + "eventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(", + " (stackObject, element, stackBehaviorName) => {", + " const behavior = stackObject.getBehavior(stackBehaviorName);", + " /** @type {gdjs.RuntimeObject[]} */", + " const stack = behavior.objectStack;", + " return stack.length > 0 && stack[stack.length - 1] === element;", + " },", + " stackObjectsLists,", + " elementObjectsLists,", + " false,", + " stackBehaviorName", + ");" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Stack", + "name": "Object", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the stack contains the object.", + "fullName": "Contain", + "functionType": "Condition", + "name": "Contains", + "sentence": "_PARAM3_ is into the stack of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const stackBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "/** @type {Hashtable} */", + "const stackObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");", + "/** @type {Hashtable} */", + "const elementObjectsLists = eventsFunctionContext.getObjectsLists(\"Element\");", + "", + "eventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(", + " (stackObject, element, stackBehaviorName) => {", + " const behavior = stackObject.getBehavior(stackBehaviorName);", + " /** @type {Map */", + " const objectSet = behavior.objectSet;", + " return objectSet.has(element);", + " },", + " stackObjectsLists,", + " elementObjectsLists,", + " false,", + " stackBehaviorName", + ");" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Stack", + "name": "Object", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Hold an ordered list of objects.", + "fullName": "Object Stack", + "name": "ObjectStack", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "behavior.objectStack = [];", + "// Make contains(), remove() and unicity checks more efficients.", + "behavior.objectSet = new Set();", + "", + "if (!runtimeScene.__allObjectStacks) {", + " runtimeScene.__allObjectStacks = new Set();", + " // Its only use is to have a O(1) check for", + " // deleted objects that have never been in a stack.", + " runtimeScene.__objectStacks_allUsedObjects = new Set();", + " // Remove from deleted objects from stacks.", + " gdjs.registerObjectDeletedFromSceneCallback(function (runtimeScene, obj) {", + " if (runtimeScene.__objectStacks_allUsedObjects.has(obj)) {", + " runtimeScene.__objectStacks_allUsedObjects.delete(obj);", + " for (const behavior of runtimeScene.__allObjectStacks) {", + " /** @type {gdjs.RuntimeObject[]} */", + " const stack = behavior.objectStack;", + " /** @type {Map */", + " const objectSet = behavior.objectSet;", + " if (objectSet.has(obj)) {", + " // There should be only one occurrence, but check the whole array just in case.", + " for (let index = stack.indexOf(obj); index >= 0; index = stack.indexOf(obj, index)) {", + " stack.splice(index, 1);", + " }", + " objectSet.delete(obj);", + " }", + " }", + " }", + " });", + "}", + "runtimeScene.__allObjectStacks.add(behavior);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "runtimeScene.__allObjectStacks.delete(behavior);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Add the object on the top of the stack.", + "fullName": "Add on top", + "functionType": "Action", + "name": "AddOnTop", + "sentence": "Add _PARAM2_ on top of the stack of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "const elements = eventsFunctionContext.getObjects(\"Elements\");", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "/** @type {Map */", + "const objectSet = behavior.objectSet;", + "for (const element of elements) {", + " if (!objectSet.has(element)) {", + " stack.push(element);", + " behavior.objectSet.add(element);", + " runtimeScene.__objectStacks_allUsedObjects.add(element);", + " }", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Object", + "name": "Elements", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Insert the object into the stack.", + "fullName": "Insert into the stack", + "functionType": "Action", + "name": "Insert", + "sentence": "Insert _PARAM2_ into the stack of _PARAM0_ at height: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "const elements = eventsFunctionContext.getObjects(\"Elements\");", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "/** @type {Map */", + "const objectSet = behavior.objectSet;", + "if (height < 0 || height > stack.length) {", + " log.error(`Tried to insert in the stack at ${height} where the stack is ${stack.length} height.`);", + " return;", + "}", + "for (const element of elements) {", + " if (!objectSet.has(element)) {", + " stack.splice(height, 0, element);", + " objectSet.add(element);", + " runtimeScene.__objectStacks_allUsedObjects.add(element);", + " }", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Object", + "name": "Elements", + "type": "objectList" + }, + { + "description": "Height", + "name": "Height", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remove the object from the stack.", + "fullName": "Remove from the stack", + "functionType": "Action", + "name": "Remove", + "sentence": "Remove _PARAM2_ from the stack of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "const elements = eventsFunctionContext.getObjects(\"Elements\");", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "/** @type {Map */", + "const objectSet = behavior.objectSet;", + "for (const element of elements) {", + " if (objectSet.has(element)) {", + " // The top element is likely to be removed from the stack.", + " // Make its removal O(1)", + " if (element === stack[stack.length - 1]) {", + " stack.pop();", + " }", + " else {", + " const index = stack.indexOf(element);", + " if (index >= 0) {", + " stack.splice(index, 1);", + " }", + " }", + " objectSet.delete(element);", + " }", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Object", + "name": "Elements", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Remove any object from the stack.", + "fullName": "Clear", + "functionType": "Action", + "name": "Clear", + "sentence": "Remove every object of the stack of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "/** @type {Map */", + "const objectSet = behavior.objectSet;", + "", + "stack.length = 0;", + "objectSet.clear();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the object from a stack into another.", + "fullName": "Move into the stack", + "functionType": "Action", + "name": "MoveInto", + "sentence": "Move the object of the stack of _PARAM3_ from:_PARAM5_ to:_PARAM6_ into the stack of _PARAM0_ at height: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "const stacks = eventsFunctionContext.getObjects(\"Stack\");", + "const stackBehaviorName = eventsFunctionContext.getBehaviorName(\"StackBehavior\");", + "let insertHeight = eventsFunctionContext.getArgument(\"Height\");", + "const lowerBound = Math.max(0, eventsFunctionContext.getArgument(\"LowerBound\"));", + "let upperBound = eventsFunctionContext.getArgument(\"UpperBound\");", + "", + "if (stacks && stacks.length > 0) {", + " /** @type {gdjs.RuntimeObject[]} */", + " const otherStack = stacks[0].getBehavior(stackBehaviorName).objectStack;", + " /** @type {Map */", + " const otherObjectSet = stacks[0].getBehavior(stackBehaviorName).objectSet;", + " /** @type {gdjs.RuntimeObject[]} */", + " const stack = behavior.objectStack;", + " /** @type {Map */", + " const objectSet = behavior.objectSet;", + " if (insertHeight < 0 || insertHeight > stack.length) {", + " log.error(`Tried to insert in the stack at ${insertHeight} where the stack is ${stack.length} height.`);", + " return;", + " }", + " upperBound = Math.min(upperBound, otherStack.length - 1);", + " for (let height = lowerBound; height <= upperBound; height++) {", + " const insertedElement = otherStack[height];", + " stack.splice(insertHeight, 0, insertedElement);", + " objectSet.add(insertedElement);", + " insertHeight++;", + " }", + " if (lowerBound <= upperBound) {", + " for (let height = lowerBound; height <= upperBound; height++) {", + " otherObjectSet.delete(otherStack[height]);", + " }", + " otherStack.splice(lowerBound, upperBound - lowerBound + 1);", + " }", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Height", + "name": "Height", + "type": "expression" + }, + { + "description": "Stack", + "name": "Stack", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "StackBehavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Lower bound", + "name": "LowerBound", + "type": "expression" + }, + { + "description": "Upper bound", + "name": "UpperBound", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Shuffle the stack.", + "fullName": "Shuffle", + "functionType": "Action", + "name": "Shuffle", + "sentence": "Shuffle the stack of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "", + "// Fisher–Yates shuffle", + "for (let i = stack.length - 1; i >= 1; i--) {", + " // TODO use a seed", + " const j = Math.floor(Math.random() * (i + 1));", + " const swap = stack[i];", + " stack[i] = stack[j]", + " stack[j] = swap;", + "}" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "The height of an element in the stack.", + "fullName": "Height of a stack element", + "functionType": "Expression", + "name": "HeightOf", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "const elements = eventsFunctionContext.getObjects(\"Elements\");", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "eventsFunctionContext.returnValue = stack.indexOf(elements[0]);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Object", + "name": "Elements", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "The number of objects in the stack.", + "fullName": "Stack height", + "functionType": "Expression", + "name": "Height", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "eventsFunctionContext.returnValue = stack.length;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Compare the number of objects in the stack.", + "fullName": "Stack height", + "functionType": "Condition", + "name": "CheckHeight", + "sentence": "_PARAM0_ has _PARAM2_ objects in its stack", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "eventsFunctionContext.returnValue = stack.length === height;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Stack height", + "name": "Height", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the stack is empty.", + "fullName": "Is empty", + "functionType": "Condition", + "name": "IsEmpty", + "sentence": "The stack of _PARAM0_ is empty", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "/** @type {gdjs.RuntimeObject[]} */", + "const stack = behavior.objectStack;", + "eventsFunctionContext.returnValue = stack.length === 0;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Curved movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWRhc2hhcnJheTo2LDY7fQ0KCS5zdDN7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5OjQsNDt9DQoJLnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7fQ0KCS5zdDV7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1kYXNoYXJyYXk6My4xMDgxLDMuMTA4MTt9DQoJDQoJCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2UtZGFzaGFycmF5OjQsMzt9DQo8L3N0eWxlPg0KPHJlY3QgeD0iMyIgeT0iMjUiIGNsYXNzPSJzdDAiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz4NCjxyZWN0IHg9IjI1IiB5PSIzIiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjUsNUwyNSw1QzE0LDUsNSwxNCw1LDI1djAiLz4NCjwvc3ZnPg0K", + "name": "CurvedMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_bezier_curve.svg", + "shortDescription": "Move objects on curved paths.", + "version": "1.0.1", + "description": [ + "This extension allows to move objects on Bézier curve paths.", + "- Paths can be built dynamically or from predetermined paths in SVG format.", + "- A behavior moves objects in a given duration a bit like the Tween extension does.", + "- Another behavior moves objects using a speed and an acceleration.", + "- Expressions give access to the path trajectory values for more complex movements.", + "", + "This extension can be used to:", + "- Move enemies that follow a pattern", + "- Animate decorations", + "", + "A collection of [small examples](https://editor.gdevelop.io/?project=example://curved-movement) show how to use this extension." + ], + "origin": { + "identifier": "CurvedMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "bezier", + "curve", + "path", + "movement", + "animate", + "animation", + "smooth" + ], + "authorIds": [ + "AX15J5TSnpSLUglk4nQVamviftr2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::DefineHelperClasses" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Define helper classes JavaScript code.", + "fullName": "Define helper classes", + "functionType": "Action", + "name": "DefineHelperClasses", + "private": true, + "sentence": "Define helper classes JavaScript code", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/**", + " * @param {number[]} array ", + " * @param {number} value", + " */", + "const findLowerIndex = function (array, value) {", + " let low = 0;", + " let high = array.length - 1;", + " let index = 0;", + " while (low < high) {", + " index = low + (((high - low) / 2) | 0);", + " if (array[index] < value) {", + " low = index + 1;", + " } else {", + " high = index;", + " }", + " }", + " if (array[index] > value) {", + " index--;", + " }", + " return index;", + "};", + "", + "const CurvedPath = /** @class */ (function () {", + " /**", + " * @param {number} speedScaleY Set it to 0.5 for pixel isometry.", + " */", + " function CurvedPath(speedScaleY = 1) {", + " /**", + " * @type {CubicBezierCurve[]}", + " */", + " this.curves = [];", + " /**", + " * @type {number[]}", + " */", + " this.curvePreviousLengths = [0];", + " /**", + " * Set it to 0.5 for pixel isometry.", + " */", + " this.speedScaleY = speedScaleY;", + " };", + "", + " CurvedPath.prototype.getCurvePreviousLengths = function () {", + " if (this.curvePreviousLengths.length === 0) {", + " let lengthSum = 0;", + " this.curvePreviousLengths.push(0);", + " for (const curve of this.curves) {", + " lengthSum += curve.getLength();", + " this.curvePreviousLengths.push(lengthSum);", + " }", + " }", + " return this.curvePreviousLengths;", + " }", + "", + " CurvedPath.prototype.clone = function () {", + " const clone = new CurvedPath();", + " clone.curves = this.curves.map(curve => curve.clone());", + " clone.curvePreviousLengths = [...this.curvePreviousLengths];", + " return clone;", + " };", + "", + " CurvedPath.prototype.getSpeedScaleY = function () {", + " return this.speedScaleY;", + " };", + "", + " /**", + " * @param {number} speedScaleY Set it to 0.5 for pixel isometry.", + " */", + " CurvedPath.prototype.setSpeedScaleY = function (speedScaleY) {", + " if (this.speedScaleY === speedScaleY) {", + " return;", + " }", + " this.scale(1, this.speedScaleY / speedScaleY);", + " this.speedScaleY = speedScaleY;", + " };", + "", + " /**", + " * @param {CubicBezierCurve} curve", + " */", + " CurvedPath.prototype._add = function (curve) {", + " this.curves.push(curve);", + " if (this.curvePreviousLengths.length > 0) {", + " this.curvePreviousLengths.push(this.getLength() + curve.getLength());", + " }", + " };", + "", + " /**", + " * @param {number} firstControlX", + " * @param {number} firstControlY", + " * @param {number} secondControlX", + " * @param {number} secondControlY", + " * @param {number} destinationX", + " * @param {number} destinationY", + " * @param {boolean} isRelative", + " */", + " CurvedPath.prototype.addCurve = function (", + " firstControlX,", + " firstControlY,", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative) {", + " const endX = this.getEndX();", + " const endY = this.getEndY();", + " if (isRelative) {", + " firstControlX += endX;", + " firstControlY += endY;", + " secondControlX += endX;", + " secondControlY += endY;", + " destinationX += endX;", + " destinationY += endY;", + " }", + " this._add(new CubicBezierCurve(", + " endX,", + " endY / this.speedScaleY,", + " firstControlX,", + " firstControlY / this.speedScaleY,", + " secondControlX,", + " secondControlY / this.speedScaleY,", + " destinationX,", + " destinationY / this.speedScaleY", + " ));", + " }", + "", + " /**", + " * @param {number} secondControlX", + " * @param {number} secondControlY", + " * @param {number} destinationX", + " * @param {number} destinationY", + " * @param {boolean} isRelative", + " */", + " CurvedPath.prototype.addSmoothCurve = function (", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative) {", + " const endX = this.getEndX();", + " const endY = this.getEndY();", + " if (isRelative) {", + " secondControlX += endX;", + " secondControlY += endY;", + " destinationX += endX;", + " destinationY += endY;", + " }", + " const lastControlX = this.getLastControlX();", + " const lastControlY = this.getLastControlY();", + " let firstControlX = 2 * endX - lastControlX;", + " let firstControlY = 2 * endY - lastControlY;", + "", + " this._add(new CubicBezierCurve(", + " endX,", + " endY / this.speedScaleY,", + " firstControlX,", + " firstControlY / this.speedScaleY,", + " secondControlX,", + " secondControlY / this.speedScaleY,", + " destinationX,", + " destinationY / this.speedScaleY", + " ));", + " }", + "", + "", + " /**", + " * @param {number} destinationX", + " * @param {number} destinationY", + " * @param {boolean} isRelative", + " */", + " CurvedPath.prototype.addLine = function (", + " destinationX,", + " destinationY,", + " isRelative) {", + " const endX = this.getEndX();", + " const endY = this.getEndY();", + " if (isRelative) {", + " destinationX += endX;", + " destinationY += endY;", + " }", + " const lengthX = destinationX - endX;", + " const lengthY = destinationY - endY;", + "", + " // TODO Optimize it with an object dedicated to lines.", + " this._add(new CubicBezierCurve(", + " endX,", + " endY / this.speedScaleY,", + " endX + lengthX / 3,", + " (endY + lengthY / 3) / this.speedScaleY,", + " endX + lengthX * 2 / 3,", + " (endY + lengthY * 2 / 3) / this.speedScaleY,", + " destinationX,", + " destinationY / this.speedScaleY", + " ));", + " }", + "", + " CurvedPath.prototype.close = function () {", + " if (this.curves.length === 0) {", + " return;", + " }", + " const firstCurve = this.curves[0];", + " this.addLine(firstCurve.getOriginX(), firstCurve.getOriginY(), false);", + " }", + "", + " /**", + " * @param {CurvedPath} path", + " */", + " CurvedPath.prototype.append = function (path) {", + " const endX = this.getEndX();", + " const endY = this.getEndY();", + " for (const curve of path.curves) {", + " const clone = curve.clone();", + " for (const point of clone.points) {", + " point[0] += endX;", + " point[1] *= path.scaleY / this.speedScaleY;", + " point[1] += endY;", + " }", + " this.add(clone);", + " }", + " };", + "", + " /**", + " * @param {CurvedPath} path", + " * @param {boolean} shouldFlip", + " */", + " CurvedPath.prototype.appendRotatedPath = function (path, shouldFlip) {", + " const startAngle = Math.atan2(path.curves[0].getFirstControlY(), path.curves[0].getFirstControlX());", + " const rotatedPath = path.clone();", + " rotatedPath.rotate(this.getEndAngle() - startAngle);", + " if (shouldFlip) {", + " rotatedPath.flip();", + " }", + " this.append(rotatedPath, false);", + " };", + "", + " CurvedPath.prototype.clear = function () {", + " this.curves.length = 0;", + " this.curvePreviousLengths.length = 1;", + " this.curvePreviousLengths[0] = 0;", + " };", + "", + " CurvedPath.prototype.getLength = function () {", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " return curvePreviousLengths[curvePreviousLengths.length - 1];", + " };", + "", + " CurvedPath.prototype.isClosed = function () {", + " if (this.curves.length === 0) {", + " return true;", + " }", + " const firstCurve = this.curves[0];", + " const lastCurve = this.curves[this.curves.length - 1];", + " return firstCurve.getOriginX() === lastCurve.getTargetX() &&", + " firstCurve.getOriginY() === lastCurve.getTargetY();", + " };", + "", + " /**", + " * @param {number} length", + " */", + " CurvedPath.prototype.getCurveIndex = function (length) {", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " return Math.min(this.curves.length - 1, findLowerIndex(curvePreviousLengths, length));", + " };", + "", + " /**", + " * @param {number} length", + " */", + " CurvedPath.prototype.getX = function (length) {", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " if (length >= this.getLength()) {", + " return this.getEndX();", + " }", + " const curveIndex = this.getCurveIndex(length);", + " const curve = this.curves[curveIndex];", + " const curveStartLength = curvePreviousLengths[curveIndex];", + " const u = (length - curveStartLength) / curve.getLength();", + " return curve.getX(u);", + " };", + "", + " /**", + " * @param {number} length", + " */", + " CurvedPath.prototype.getY = function (length) {", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " if (length >= this.getLength()) {", + " return this.getEndY();", + " }", + " const curveIndex = this.getCurveIndex(length);", + " const curve = this.curves[curveIndex];", + " const curveStartLength = curvePreviousLengths[curveIndex];", + " const u = (length - curveStartLength) / curve.getLength();", + " return curve.getY(u) * this.speedScaleY;", + " };", + "", + " const workingPoint = [0, 0];", + " /**", + " * @param {number} length", + " * @param {gdjs.AffineTransformation} transformation", + " * @param {[number, number]} transformation", + " */", + " CurvedPath.prototype.getTransformedPosition = function (length, transformation, result) {", + " if (!result) {", + " result = workingPoint;", + " }", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " if (length >= this.getLength()) {", + " result[0] = this.getEndX();", + " result[1] = this.getEndY();", + " }", + " else {", + " const curveIndex = this.getCurveIndex(length);", + " const curve = this.curves[curveIndex];", + " const curveStartLength = curvePreviousLengths[curveIndex];", + " const u = (length - curveStartLength) / curve.getLength();", + " result[0] = curve.getX(u);", + " result[1] = curve.getY(u);", + " }", + " transformation.transform(result, result);", + " result[1] *= this.speedScaleY;", + " return result;", + " };", + "", + " /**", + " * @param {number} x", + " * @param {number} y", + " * @param {gdjs.AffineTransformation} transformation", + " * @param {[number, number]} transformation", + " */", + " CurvedPath.prototype.transformPosition = function (x, y, transformation, result) {", + " if (!result) {", + " result = workingPoint;", + " }", + " result[0] = x;", + " result[1] = y / this.speedScaleY;", + " transformation.transform(result, result);", + " result[1] *= this.speedScaleY;", + " return result;", + " };", + "", + " /**", + " * @param {number} length", + " */", + " CurvedPath.prototype.getAngle = function (length) {", + " const curvePreviousLengths = this.getCurvePreviousLengths();", + " if (this.curves.length === 0) {", + " return 0;", + " }", + " const curveIndex = this.getCurveIndex(length);", + " const curve = this.curves[curveIndex];", + " const curveStartLength = curvePreviousLengths[curveIndex];", + " const u = (length - curveStartLength) / curve.getLength();", + " return curve.getAngle(u);", + " };", + "", + " CurvedPath.prototype.getOriginX = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getOriginX();", + " };", + "", + " CurvedPath.prototype.getOriginY = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getOriginY() * this.speedScaleY;", + " };", + "", + " CurvedPath.prototype.getFirstControlX = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getFirstControlX();", + " };", + "", + " CurvedPath.prototype.getFirstControlY = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getFirstControlY() * this.speedScaleY;", + " };", + "", + " CurvedPath.prototype.getSecondControlX = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getSecondControlX();", + " };", + "", + " CurvedPath.prototype.getSecondControlY = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getSecondControlY() * this.speedScaleY;", + " };", + "", + " CurvedPath.prototype.getTargetX = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getTargetX();", + " };", + "", + " CurvedPath.prototype.getTargetY = function (curveIndex) {", + " return this.curves.length === 0 ? 0 : this.curves[curveIndex].getTargetY() * this.speedScaleY;", + " };", + "", + " CurvedPath.prototype.getLastControlX = function () {", + " return this.getSecondControlX(this.curves.length - 1);", + " };", + "", + " CurvedPath.prototype.getLastControlY = function () {", + " return this.getSecondControlY(this.curves.length - 1);", + " };", + "", + " CurvedPath.prototype.getEndX = function () {", + " return this.getTargetX(this.curves.length - 1);", + " };", + "", + " CurvedPath.prototype.getEndY = function () {", + " return this.getTargetY(this.curves.length - 1);", + " };", + "", + " CurvedPath.prototype.getEndAngle = function () {", + " if (this.curves.length === 0) {", + " return 0;", + " }", + " const lastCurve = this.curves[this.curves.length - 1];", + " return Math.atan2(", + " lastCurve.getTargetY() - lastCurve.getSecondControlY(),", + " lastCurve.getTargetX() - lastCurve.getSecondControlX());", + " };", + "", + " /**", + " * @param {number} translationX", + " * @param {number} translationY", + " */", + " CurvedPath.prototype.translate = function (translationX, translationY) {", + " for (const curve of this.curves) {", + " for (const point of curve.points) {", + " point[0] += translationX;", + " point[1] += translationY / this.speedScaleY;", + " }", + " }", + " };", + "", + " /**", + " * @param {number} scaleX", + " * @param {number} scaleY", + " */", + " CurvedPath.prototype.scale = function (scaleX, scaleY) {", + " for (const curve of this.curves) {", + " for (const point of curve.points) {", + " point[0] *= scaleX;", + " point[1] *= scaleY;", + " }", + " curve.arcLengths.length = 0;", + " }", + " this.curvePreviousLengths.length = 0;", + " };", + "", + " /**", + " * @param {number} angle", + " */", + " CurvedPath.prototype.rotate = function (angle) {", + " const cos = Math.cos(angle);", + " const sin = Math.sin(angle);", + " for (const curve of this.curves) {", + " for (const point of curve.points) {", + " const x = point[0];", + " const y = point[1];", + " point[0] = x * cos - y * sin;", + " point[1] = x * sin + y * cos;", + " }", + " curve.arcLengths.length = 0;", + " }", + " this.curvePreviousLengths.length = 0;", + " };", + "", + " CurvedPath.prototype.invert = function () {", + " const endX = this.getEndX();", + " const endY = this.getEndY();", + " for (const curve of this.curves) {", + " for (const point of curve.points) {", + " point[0] = point[0] - endX;", + " point[1] = point[1] - endY;", + " }", + " curve.points.reverse();", + " curve.arcLengths.length = 0;", + " }", + " this.curves.reverse();", + " this.curvePreviousLengths.length = 0;", + " };", + "", + " /**", + " * Do a symetry around the first control vector.", + " */", + " CurvedPath.prototype.flip = function () {", + " const axisX = this.curves[0].getFirstControlX();", + " const axisY = this.curves[0].getFirstControlY();", + " const axisLength = Math.hypot(axisX, axisY);", + " const ux = axisX / axisLength;", + " const uy = axisY / axisLength;", + "", + " const sx = 2 * ux * ux - 1;", + " const sy = 2 * uy * uy - 1;", + " const rx = 2 * uy * ux;", + " const ry = rx;", + "", + " for (const curve of this.curves) {", + " for (const point of curve.points) {", + " const x = point[0];", + " const y = point[1];", + " point[0] = x * sx + y * rx;", + " point[1] = x * ry + y * sy;", + " }", + " curve.arcLengths.length = 0;", + " }", + " this.curvePreviousLengths.length = 0;", + " };", + "", + " return CurvedPath;", + "})();", + "", + "/**", + " * @param {number} t", + " * @param {number} a", + " * @param {number} b", + " * @param {number} c", + " * @param {number} d", + " */", + "const interpolateCubicCurve = function (t, a, b, c, d) {", + " return (", + " (1 - t) ** 3 * a +", + " 3 * (1 - t) ** 2 * t * b +", + " 3 * (1 - t) * t ** 2 * c +", + " t ** 3 * d", + " );", + "};", + "/**", + " * @param {number} t", + " * @param {number} a", + " * @param {number} b", + " * @param {number} c", + " * @param {number} d", + " */", + "const interpolateCubicCurveDirection = function (t, a, b, c, d) {", + " return (", + " 3 * (1 - t) ** 2 * (b - a) +", + " 6 * (1 - t) * t * (c - b) +", + " 3 * t ** 2 * (d - c)", + " );", + "};", + "", + "", + "const CubicBezierCurve = /** @class */ (function () {", + " /**", + " * @param {number} aX", + " * @param {number} aY", + " * @param {number} bX", + " * @param {number} bY", + " * @param {number} cX", + " * @param {number} cY", + " * @param {number} dX", + " * @param {number} dY", + " */", + " function CubicBezierCurve(aX, aY, bX, bY, cX, cY, dX, dY) {", + " /** @type {[FloatPoint, FloatPoint, FloatPoint, FloatPoint]} */", + " this.points = [[aX, aY], [bX, bY], [cX, cY], [dX, dY]];", + "", + " /** @type {number[]} */", + " this.arcLengths = [];", + " };", + "", + " CubicBezierCurve.prototype.clone = function () {", + " const clone = new CubicBezierCurve();", + " clone.points = this.points.map(point => [...point]);", + " clone.arcLengths = [...this.arcLengths];", + " return clone;", + " }", + "", + " CubicBezierCurve.prototype.getArcLengths = function () {", + " if (this.arcLengths.length === 0) {", + " const segmentsCount = 100;", + " this.arcLengths.length = segmentsCount + 1;", + " this.arcLengths[0] = 0;", + "", + " const aX = this.points[0][0];", + " const aY = this.points[0][1];", + " const bX = this.points[1][0];", + " const bY = this.points[1][1];", + " const cX = this.points[2][0];", + " const cY = this.points[2][1];", + " const dX = this.points[3][0];", + " const dY = this.points[3][1];", + "", + " let oldX = aX;", + " let oldY = aY;", + " let currentLength = 0;", + " for (let i = 1; i <= segmentsCount; i += 1) {", + " const x = interpolateCubicCurve(i * 0.01, aX, bX, cX, dX);", + " const y = interpolateCubicCurve(i * 0.01, aY, bY, cY, dY);", + " currentLength += Math.hypot(x - oldX, y - oldY);", + " this.arcLengths[i] = currentLength;", + " oldX = x;", + " oldY = y;", + " }", + " }", + " return this.arcLengths;", + " };", + "", + " /**", + " * @param {number} u", + " */", + " CubicBezierCurve.prototype.reparametrizeByArcLength = function (u) {", + " const arcLengths = this.getArcLengths();", + " const segmentsCount = arcLengths.length - 1;", + " const targetLength = u * arcLengths[segmentsCount];", + " const index = findLowerIndex(arcLengths, targetLength);", + "", + " const lengthBefore = arcLengths[index];", + " if (lengthBefore === targetLength) {", + " return index / segmentsCount;", + " } else {", + " return (", + " (index +", + " (targetLength - lengthBefore) /", + " (arcLengths[index + 1] - lengthBefore)) /", + " segmentsCount", + " );", + " }", + " };", + "", + " /**", + " * @param {number} u", + " */", + " CubicBezierCurve.prototype.getX = function (u) {", + " return interpolateCubicCurve(", + " this.reparametrizeByArcLength(u),", + " this.points[0][0],", + " this.points[1][0],", + " this.points[2][0],", + " this.points[3][0]", + " );", + " };", + "", + " /**", + " * @param {number} u", + " */", + " CubicBezierCurve.prototype.getY = function (u) {", + " return interpolateCubicCurve(", + " this.reparametrizeByArcLength(u),", + " this.points[0][1],", + " this.points[1][1],", + " this.points[2][1],", + " this.points[3][1]", + " );", + " };", + "", + " /**", + " * @param {number} u", + " */", + " CubicBezierCurve.prototype.getAngle = function (u) {", + " const t = this.reparametrizeByArcLength(u);", + " const directionX = interpolateCubicCurveDirection(", + " t,", + " this.points[0][0],", + " this.points[1][0],", + " this.points[2][0],", + " this.points[3][0]", + " );", + " const directionY = interpolateCubicCurveDirection(", + " t,", + " this.points[0][1],", + " this.points[1][1],", + " this.points[2][1],", + " this.points[3][1]", + " );", + " return Math.atan2(directionY, directionX);", + " };", + "", + " CubicBezierCurve.prototype.getLength = function () {", + " const arcLengths = this.getArcLengths();", + " return arcLengths[arcLengths.length - 1];", + " };", + "", + " CubicBezierCurve.prototype.getOriginX = function () {", + " return this.points[0][0];", + " };", + "", + " CubicBezierCurve.prototype.getOriginY = function () {", + " return this.points[0][1];", + " };", + "", + " CubicBezierCurve.prototype.getFirstControlX = function () {", + " return this.points[1][0];", + " };", + "", + " CubicBezierCurve.prototype.getFirstControlY = function () {", + " return this.points[1][1];", + " };", + "", + " CubicBezierCurve.prototype.getSecondControlX = function () {", + " return this.points[2][0];", + " };", + "", + " CubicBezierCurve.prototype.getSecondControlY = function () {", + " return this.points[2][1];", + " };", + "", + " CubicBezierCurve.prototype.getTargetX = function () {", + " return this.points[3][0];", + " };", + "", + " CubicBezierCurve.prototype.getTargetY = function () {", + " return this.points[3][1];", + " };", + "", + " return CubicBezierCurve;", + "})();", + "", + "const pathRegex = /[CcSsLlMmHhVvZz]|(?:-?\\d+(?:\\.\\d+)?)/g;", + "const svgActions = [\"c\", \"s\", \"l\", \"m\", \"v\", \"h\", \"z\"];", + "", + "/**", + " * @param {string} svgComandsString", + " */", + "CurvedPath.parsePath = function (svgComandsString) {", + " const regExpResults = svgComandsString.match(pathRegex);", + " if (!regExpResults) {", + " return null;", + " }", + " const path = new CurvedPath();", + " let currentAction = \"\";", + " let isRelative = false;", + " let originX = 0;", + " let originY = 0;", + " for (let index = 0; index < regExpResults.length; index++) {", + " const regExpResult = regExpResults[index];", + " if (regExpResult.length === 1) {", + " const lowerCaseRegExpResult = regExpResult.toLowerCase();", + " if (svgActions.indexOf(lowerCaseRegExpResult) >= 0) {", + " currentAction = lowerCaseRegExpResult;", + " isRelative = lowerCaseRegExpResult === regExpResult;", + " index++;", + " }", + " }", + " switch (currentAction) {", + " case \"c\":", + " {", + " if (regExpResults.length < index + 5) {", + " break;", + " }", + " const firstControlX = Number.parseFloat(regExpResults[index + 0]);", + " const firstControlY = Number.parseFloat(regExpResults[index + 1]);", + " const secondControlX = Number.parseFloat(regExpResults[index + 2]);", + " const secondControlY = Number.parseFloat(regExpResults[index + 3]);", + " const destinationX = Number.parseFloat(regExpResults[index + 4]);", + " const destinationY = Number.parseFloat(regExpResults[index + 5]);", + " index += 5;", + " if (isRelative) {", + " path.addCurve(", + " firstControlX,", + " firstControlY,", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative);", + " }", + " else {", + " // Movement paths always start at (0;0).", + " path.addCurve(", + " -originX + firstControlX,", + " -originY + firstControlY,", + " -originX + secondControlX,", + " -originY + secondControlY,", + " -originX + destinationX,", + " -originY + destinationY,", + " isRelative);", + " }", + " break;", + " }", + " case \"s\":", + " {", + " if (regExpResults.length < index + 3) {", + " break;", + " }", + " const secondControlX = Number.parseFloat(regExpResults[index + 0]);", + " const secondControlY = Number.parseFloat(regExpResults[index + 1]);", + " const destinationX = Number.parseFloat(regExpResults[index + 2]);", + " const destinationY = Number.parseFloat(regExpResults[index + 3]);", + " index += 3;", + " if (isRelative) {", + " path.addSmoothCurve(", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative);", + " }", + " else {", + " // Movement paths always start at (0;0).", + " path.addSmoothCurve(", + " -originX + secondControlX,", + " -originY + secondControlY,", + " -originX + destinationX,", + " -originY + destinationY,", + " isRelative);", + " }", + " break;", + " }", + " case \"l\":", + " {", + " if (regExpResults.length < index + 1) {", + " break;", + " }", + " const destinationX = Number.parseFloat(regExpResults[index + 0]);", + " const destinationY = Number.parseFloat(regExpResults[index + 1]);", + " console.log(destinationX + \" ; \" + destinationY);", + " index++;", + " if (isRelative) {", + " path.addLine(", + " destinationX,", + " destinationY,", + " isRelative);", + " }", + " else {", + " // Movement paths always start at (0;0).", + " path.addLine(", + " -originX + destinationX,", + " -originY + destinationY,", + " isRelative);", + " }", + " break;", + " }", + " case \"m\":", + " {", + " if (regExpResults.length < index + 1) {", + " break;", + " }", + " if (index === 1) {", + " originX = Number.parseFloat(regExpResults[index + 0]) || 0;", + " originY = Number.parseFloat(regExpResults[index + 1]) || 0;", + " }", + " index++;", + " currentAction = \"l\";", + " break;", + " }", + " case \"h\":", + " {", + " if (regExpResults.length < index) {", + " break;", + " }", + " const destinationX = Number.parseFloat(regExpResults[index + 0]);", + " const destinationY = 0;", + " if (isRelative) {", + " path.addLine(", + " destinationX,", + " destinationY,", + " isRelative);", + " }", + " else {", + " // Movement paths always start at (0;0).", + " path.addLine(", + " -originX + destinationX,", + " -originY + destinationY,", + " isRelative);", + " }", + " break;", + " }", + " case \"v\":", + " {", + " if (regExpResults.length < index) {", + " break;", + " }", + " const destinationX = 0;", + " const destinationY = Number.parseFloat(regExpResults[index + 0]);", + " if (isRelative) {", + " path.addLine(", + " destinationX,", + " destinationY,", + " isRelative);", + " }", + " else {", + " // Movement paths always start at (0;0).", + " path.addLine(", + " -originX + destinationX,", + " -originY + destinationY,", + " isRelative);", + " }", + " break;", + " }", + " case \"z\":", + " {", + " path.close();", + " break;", + " }", + " default:", + " break;", + " }", + " }", + "// if (originX !== 0 && originY !== 0) {", + "// path.translate(-originX, -originY);", + "// path.curves[0].getOriginX = 0;", + "// }", + " return path;", + "}", + "", + "/**", + " * @param {CurvedPath} path", + " */", + "CurvedPath.toSvg = function (path) {", + " let svgString = 'C';", + " for (const curve of path.curves) {", + " for (const point of curve.points) {", + " svgString += `${point[0]},${point[0]}`;", + " }", + " svgString += ' ';", + " }", + " return path;", + "}", + "", + "gdjs.__curvedMovementExtension = gdjs.__curvedMovementExtension || {};", + "gdjs.__curvedMovementExtension.CurvedPath = CurvedPath;", + "", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Map} */\r", + "runtimeScene.__curvedMovementExtension = { curvedPaths: new Map() };" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Append a cubic Bezier curve at the end of the path.", + "fullName": "Append a curve", + "functionType": "Action", + "name": "AddCubicCurve", + "sentence": "Append a curve to the path _PARAM1_ relatively to the end: _PARAM8_, first control point: _PARAM2_ ; _PARAM3_, second control point: _PARAM4_ ; _PARAM5_, destination: _PARAM6_ ; _PARAM7_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " curvedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(pathName, curvedPath);", + "}", + "", + "let firstControlX = eventsFunctionContext.getArgument(\"FirstControlX\");", + "let firstControlY = eventsFunctionContext.getArgument(\"FirstControlY\");", + "let secondControlX = eventsFunctionContext.getArgument(\"SecondControlX\");", + "let secondControlY = eventsFunctionContext.getArgument(\"SecondControlY\");", + "let destinationX = eventsFunctionContext.getArgument(\"DestinationX\");", + "let destinationY = eventsFunctionContext.getArgument(\"DestinationY\");", + "let isRelative = eventsFunctionContext.getArgument(\"IsRelative\");", + "", + "curvedPath.addCurve(", + " firstControlX,", + " firstControlY,", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative", + ");", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "First control point X", + "name": "FirstControlX", + "type": "expression" + }, + { + "description": "First control point Y", + "name": "FirstControlY", + "type": "expression" + }, + { + "description": "Second Control point X", + "name": "SecondControlX", + "type": "expression" + }, + { + "description": "Second Control point Y", + "name": "SecondControlY", + "type": "expression" + }, + { + "description": "Destination point X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination point Y", + "name": "DestinationY", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Relative", + "name": "IsRelative", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Append a cubic Bezier curve to the end of an object's path. The first control point is symmetrical to the last control point of the path.", + "fullName": "Append a smooth curve", + "functionType": "Action", + "name": "AddSmoothCubicCurve", + "sentence": "Append a smooth curve to the path _PARAM1_ relatively to the end: _PARAM6_, second control point: _PARAM2_ ; _PARAM3_, destination: _PARAM4_ ; _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " curvedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(pathName, curvedPath);", + "}", + "", + "let secondControlX = eventsFunctionContext.getArgument(\"SecondControlX\");", + "let secondControlY = eventsFunctionContext.getArgument(\"SecondControlY\");", + "let destinationX = eventsFunctionContext.getArgument(\"DestinationX\");", + "let destinationY = eventsFunctionContext.getArgument(\"DestinationY\");", + "let isRelative = eventsFunctionContext.getArgument(\"IsRelative\");", + "", + "curvedPath.addSmoothCurve(", + " secondControlX,", + " secondControlY,", + " destinationX,", + " destinationY,", + " isRelative", + ");", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Second Control point X", + "name": "SecondControlX", + "type": "expression" + }, + { + "description": "Second Control point Y", + "name": "SecondControlY", + "type": "expression" + }, + { + "description": "Destination point X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination point Y", + "name": "DestinationY", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Relative", + "name": "IsRelative", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Append a line at the end of the path.", + "fullName": "Append a line", + "functionType": "Action", + "name": "AddLine", + "sentence": "Append a line to the path _PARAM1_ relatively to the end: _PARAM4_, destination: _PARAM2_ ; _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " curvedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(pathName, curvedPath);", + "}", + "", + "let destinationX = eventsFunctionContext.getArgument(\"DestinationX\");", + "let destinationY = eventsFunctionContext.getArgument(\"DestinationY\");", + "let isRelative = eventsFunctionContext.getArgument(\"IsRelative\");", + "", + "curvedPath.addLine(", + " destinationX,", + " destinationY,", + " isRelative", + ");", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Destination point X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination point Y", + "name": "DestinationY", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Relative", + "name": "IsRelative", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Append a line to close the path.", + "fullName": "Close a path", + "functionType": "Action", + "name": "ClosePath", + "sentence": "Close the path _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " curvedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(pathName, curvedPath);", + "}", + "", + "curvedPath.close();", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Create a path from SVG commands, for instance \"M 0,0 C 55,0 100,45 100,100\". Commands are: M = Move, C = Curve, S = Smooth, L = Line. Lower case is for relative positions. The preferred way to build the commands is to use an external SVG editor like Inkscape.", + "fullName": "Create a path from SVG", + "functionType": "Action", + "name": "CreatePathFromSvg", + "sentence": "Create the path _PARAM1_ from the SVG path commands _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "\r", + "const svgCommandsString = eventsFunctionContext.getArgument(\"SvgCommandsString\");\r", + "\r", + "curvedPaths.set(pathName, gdjs.__curvedMovementExtension.CurvedPath.parsePath(svgCommandsString));\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "SVG commands", + "name": "SvgCommandsString", + "supplementaryInformation": "scene", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the SVG commands of a path.", + "fullName": "SVG path commands", + "functionType": "StringExpression", + "name": "ToSvg", + "sentence": "Create the path _PARAM1_ from the SVG path commands _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "\r", + "let curvedPath = curvedPaths.get(pathName);\r", + "eventsFunctionContext.returnValue = curvedPath ? gdjs.__curvedMovementExtension.CurvedPath.toSvg(curvedPath) : '';\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Delete a path from the memory.", + "fullName": "Delete a path", + "functionType": "Action", + "name": "DeletePath", + "sentence": "Delete the path: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "curvedPaths.delete(pathName);", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Append a path to another path.", + "fullName": "Append a path", + "functionType": "Action", + "name": "AppendPath", + "sentence": "Append the path _PARAM2_ to the path _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const modifiedPathName = eventsFunctionContext.getArgument(\"ModifiedPathName\");", + "const addedPathName = eventsFunctionContext.getArgument(\"AddedPathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let addedPath = curvedPaths.get(addedPathName);", + "if (addedPath) {", + " let modifiedPath = curvedPaths.get(modifiedPathName);", + " if (!modifiedPath) {", + " modifiedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(modifiedPathName, modifiedPath);", + " }", + " modifiedPath.append(addedPath);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Name of the path to modify", + "name": "ModifiedPathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Name of the path to add to the first one", + "name": "AddedPathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Append a path to another path. The appended path is rotated to have a smooth junction.", + "fullName": "Append a rotated path", + "functionType": "Action", + "name": "AppendRotatedPath", + "sentence": "Append the path _PARAM2_ rotated to connect to the path _PARAM1_ flip: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const modifiedPathName = eventsFunctionContext.getArgument(\"ModifiedPathName\");", + "const addedPathName = eventsFunctionContext.getArgument(\"AddedPathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let addedPath = curvedPaths.get(addedPathName);", + "if (addedPath) {", + " let modifiedPath = curvedPaths.get(modifiedPathName);", + " if (!modifiedPath) {", + " modifiedPath = new gdjs.__curvedMovementExtension.CurvedPath();", + " curvedPaths.set(modifiedPathName, modifiedPath);", + " }", + " const shouldFlip = eventsFunctionContext.getArgument(\"ShouldFlip\");", + " modifiedPath.appendRotatedPath(addedPath, shouldFlip);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Name of the path to modify", + "name": "ModifiedPathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Name of the path to add to the first one", + "name": "AddedPathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Flip the appended path", + "name": "ShouldFlip", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Return the speed scale on Y axis. This is used to change the view point of a path (top-dwon or isometry).", + "fullName": "Speed scale Y", + "functionType": "Expression", + "group": "Path transformation", + "name": "SpeedScaleY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "const curvedPath = curvedPaths.get(pathName);", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getSpeedScaleY() : 0;", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Change the speed scale on Y axis. This allows to change the view point of a path (top-dwon or isometry).", + "fullName": "Speed scale Y", + "functionType": "Action", + "group": "Path transformation", + "name": "SetSpeedScaleY", + "sentence": "Change the speed scale Y of the path _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (curvedPath) {", + " const scaleY = eventsFunctionContext.getArgument(\"ScaleY\");", + " curvedPath.setSpeedScaleY(scaleY);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Speed scale on Y axis (0.5 for pixel isometry)", + "name": "ScaleY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Invert a path, the end becomes the beginning.", + "fullName": "Invert a path", + "functionType": "Action", + "group": "Path transformation", + "name": "InvertPath", + "sentence": "Invert the path _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (curvedPath) {", + " curvedPath.invert();", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Flip a path.", + "fullName": "Flip a path", + "functionType": "Action", + "group": "Path transformation", + "name": "FlipPath", + "private": true, + "sentence": "Flip the path _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (curvedPath) {", + " curvedPath.flip();", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Flip a path horizontally.", + "fullName": "Flip a path horizontally", + "functionType": "Action", + "group": "Path transformation", + "name": "FlipPathX", + "private": true, + "sentence": "Flip the path _PARAM1_ horizontally", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::ScalePath" + }, + "parameters": [ + "", + "\"\"", + "-1", + "1", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Flip a path vertically.", + "fullName": "Flip a path vertically", + "functionType": "Action", + "group": "Path transformation", + "name": "FlipPathY", + "private": true, + "sentence": "Flip the path _PARAM1_ vertically", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::ScalePath" + }, + "parameters": [ + "", + "\"\"", + "1", + "-1", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Scale a path.", + "fullName": "Scale a path", + "functionType": "Action", + "group": "Path transformation", + "name": "ScalePath", + "sentence": "Scale the path _PARAM1_ by _PARAM2_ ; _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (curvedPath) {", + " const scaleX = eventsFunctionContext.getArgument(\"ScaleX\");", + " const scaleY = eventsFunctionContext.getArgument(\"ScaleY\");", + " curvedPath.scale(scaleX, scaleY);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Scale on X axis", + "name": "ScaleX", + "type": "expression" + }, + { + "description": "Scale on Y axis", + "name": "ScaleY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Rotate a path.", + "fullName": "Rotate a path", + "functionType": "Action", + "group": "Path transformation", + "name": "RotatePath", + "sentence": "Rotate _PARAM2_° the path _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "let curvedPath = curvedPaths.get(pathName);", + "if (curvedPath) {", + " const angle = eventsFunctionContext.getArgument(\"Angle\") * Math.PI / 180;", + " curvedPath.rotate(angle);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Rotation angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a path is closed.", + "fullName": "Is closed", + "functionType": "Condition", + "name": "IsClosed", + "sentence": "The path _PARAM1_ is closed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "", + "const curvedPath = curvedPaths.get(pathName);", + "eventsFunctionContext.returnValue = curvedPath && curvedPath.isClosed();", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the position on X axis of the path for a given length.", + "fullName": "Path X", + "functionType": "Expression", + "name": "PathX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "", + "const length = eventsFunctionContext.getArgument(\"Length\");", + "", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getX(length) : 0;", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Length on the path", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the position on Y axis of the path for a given length.", + "fullName": "Path Y", + "functionType": "Expression", + "name": "PathY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "", + "const length = eventsFunctionContext.getArgument(\"Length\");", + "", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getY(length) : 0;", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Length on the path", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the direction angle of the path for a given length (in degree).", + "fullName": "Path angle", + "functionType": "Expression", + "name": "PathAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "", + "const length = eventsFunctionContext.getArgument(\"Length\");", + "", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getAngle(length) * 180 / Math.PI : 0;", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Length on the path", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the length of the path.", + "fullName": "Path length", + "functionType": "Expression", + "name": "PathLength", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const pathName = eventsFunctionContext.getArgument(\"PathName\");", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getLength() : 0;", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on X axis of the path end.", + "fullName": "Path end X", + "functionType": "Expression", + "name": "PathEndX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getEndX() : 0;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on Y axis of the path end.", + "fullName": "Path end Y", + "functionType": "Expression", + "name": "PathEndY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.getEndY() : 0;\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of lines or curves that make the path.", + "fullName": "Path element count", + "functionType": "Expression", + "group": "Path element", + "name": "ElementCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "eventsFunctionContext.returnValue = curvedPath ? curvedPath.curves.length : 0;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + }, + { + "description": "Return the origin position on X axis of a curve.", + "fullName": "Origin X", + "functionType": "Expression", + "group": "Path element", + "name": "OriginX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getOriginX(index) : 0);\r", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the origin position on Y axis of a curve.", + "fullName": "Origin Y", + "functionType": "Expression", + "group": "Path element", + "name": "OriginY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getOriginY(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the first control point position on X axis of a curve.", + "fullName": "First control X", + "functionType": "Expression", + "group": "Path element", + "name": "FirstControlX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getFirstControlX(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the first control point position on Y axis of a curve.", + "fullName": "First control Y", + "functionType": "Expression", + "group": "Path element", + "name": "FirstControlY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getFirstControlY(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the second control point position on X axis of a curve.", + "fullName": "Second control X", + "functionType": "Expression", + "group": "Path element", + "name": "SecondControlX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getSecondControlX(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the second control point position on Y axis of a curve.", + "fullName": "Second control Y", + "functionType": "Expression", + "group": "Path element", + "name": "SecondControlY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getSecondControlY(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the target position on X axis of a curve.", + "fullName": "Target X", + "functionType": "Expression", + "group": "Path element", + "name": "TargetX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getTargetX(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the target position on Y axis of a curve.", + "fullName": "Target Y", + "functionType": "Expression", + "group": "Path element", + "name": "TargetY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "/** @type {number} */\r", + "const index = eventsFunctionContext.getArgument(\"Index\");\r", + "\r", + "eventsFunctionContext.returnValue = (\r", + " (curvedPath && index >= 0 && index < curvedPath.curves.length)\r", + " ? curvedPath.getTargetY(index) : 0);" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Curve index", + "name": "Index", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Path exists.", + "fullName": "Path exists", + "functionType": "Condition", + "name": "PathExists", + "sentence": "Path _PARAM1_ exists", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "\r", + "const pathName = eventsFunctionContext.getArgument(\"PathName\");\r", + "/** @type {Map} */\r", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;\r", + "const curvedPath = curvedPaths.get(pathName);\r", + "\r", + "eventsFunctionContext.returnValue = !!curvedPath;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Path name", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Move objects on curved paths in a given duration and tween easing function.", + "fullName": "Movement on a curve (duration-based)", + "name": "TweenPathMovement", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Back and forth states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wait", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyPauseDurationBeforeGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "inverted": true, + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Wait\"", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Wait\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Wait\"", + ">=", + "Object.Behavior::PropertyPauseDurationBeforeGoingBack()" + ] + } + ], + "actions": [ + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Wait\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change of direction", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Wait\"", + ">=", + "0" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::TweenPathMovement::PropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Time\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::TweenPathMovement::PropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyOrigin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyOrigin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipXToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipYToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipY" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipXToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipYToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipY" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move on the path", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::TweenPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::UpdatePosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyRotation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyPathAngle() + CurvedMovement::PathAngle(Object.Behavior::PropertyPathName(), Object.Behavior::RepeatedPathPosition()) + Object.Behavior::PropertyRotationOffset() + Object.Behavior::BackOrForthAngle()" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Set the the object on the path according to the current length.", + "fullName": "Update position", + "functionType": "Action", + "name": "UpdatePosition", + "private": true, + "sentence": "Update the position of _PARAM0_ on the path", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "/** @type {string} */", + "const pathName = behavior._getPathName();", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " return;", + "}", + "", + "behavior.workingTransformation = behavior.workingTransformation || new gdjs.AffineTransformation();", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.workingTransformation;", + "", + "const repetitionDone = behavior.RepetitionDone();", + "transformation.setToTranslation(", + " repetitionDone * behavior.PathEndX(),", + " repetitionDone * behavior.PathEndY() / behavior.PathSpeedScaleY()", + ");", + "transformation.preConcatenate(behavior.curvedMovementTransformation);", + "", + "/** @type {number} */", + "const length = behavior.RepeatedPathPosition();", + "/** @type {[number, number]} */", + "const point = curvedPath.getTransformedPosition(length, transformation);", + "const x = point[0] + behavior._getPathOriginX();", + "const y = point[1] + behavior._getPathOriginY();", + "object.setPosition(x, y);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the object to a position by following a path.", + "fullName": "Move on path to a position", + "functionType": "Action", + "name": "MoveTo", + "sentence": "Move _PARAM0_ to _PARAM6_ ; _PARAM7_ on the path: _PARAM2_ repeated _PARAM3_ times in _PARAM4_ seconds with _PARAM5_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"PathName\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Easing\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyRepetitionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"RepetitionCount\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathOriginX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "AngleBetweenPositions(Object.X(), Object.Y(), GetArgumentAsNumber(\"DestinationX\"), Object.Y() + (GetArgumentAsNumber(\"DestinationY\") - Object.Y()) / Object.Behavior::PathSpeedScaleY()) - AngleBetweenPositions(0, 0, Object.Behavior::PathEndX(), Object.Behavior::PathEndY() / Object.Behavior::PathSpeedScaleY())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "DistanceBetweenPositions(Object.X(), Object.Y(), GetArgumentAsNumber(\"DestinationX\"), Object.Y() + (GetArgumentAsNumber(\"DestinationY\") - Object.Y()) / Object.Behavior::PathSpeedScaleY()) / DistanceBetweenPositions(0, 0, Object.Behavior::PathEndX(), Object.Behavior::PathEndY() / Object.Behavior::PathSpeedScaleY()) / GetArgumentAsNumber(\"RepetitionCount\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::InitializeMovement" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Duration in seconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "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" + }, + { + "description": "Destination X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination Y", + "name": "DestinationY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Move the object to a position by following a path and go back.", + "fullName": "Move back and forth to a position", + "functionType": "Action", + "name": "MoveToAndGoBack", + "sentence": "Move back and forth _PARAM0_ to _PARAM6_ ; _PARAM7_ on the path: _PARAM2_ repeated _PARAM3_ times in _PARAM4_ seconds with _PARAM5_ easing, wait _PARAM8_ seconds before going back and loop: _PARAM9_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::MoveTo" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"PathName\")", + "GetArgumentAsNumber(\"RepetitionCount\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "GetArgumentAsNumber(\"DestinationX\")", + "GetArgumentAsNumber(\"DestinationY\")", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPauseDurationBeforeGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitBeforeGoingBackDuration\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Duration in seconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "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" + }, + { + "description": "Destination X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination Y", + "name": "DestinationY", + "type": "expression" + }, + { + "description": "Duration to wait before going back", + "name": "WaitBeforeGoingBackDuration", + "type": "expression" + }, + { + "description": "Loop", + "name": "ShouldLoop", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Move the object by following a path.", + "fullName": "Move on path", + "functionType": "Action", + "name": "Move", + "sentence": "Move _PARAM0_ on the path: _PARAM2_ repeated _PARAM3_ times in _PARAM4_ seconds with _PARAM5_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"PathName\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Easing\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyRepetitionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"RepetitionCount\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathOriginX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPathScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::InitializeMovement" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Duration in seconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "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" + } + ], + "objectGroups": [] + }, + { + "description": "Move the object by following a path and go back.", + "fullName": "Move back and forth", + "functionType": "Action", + "name": "MoveAndGoBack", + "sentence": "Move back and forth _PARAM0_ on the path: _PARAM2_ repeated _PARAM3_ times in _PARAM4_ seconds with _PARAM5_ easing, wait _PARAM6_ seconds before going back and loop: _PARAM7_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::Move" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"PathName\")", + "GetArgumentAsNumber(\"RepetitionCount\")", + "GetArgumentAsNumber(\"Duration\")", + "GetArgumentAsString(\"Easing\")", + "GetArgumentAsNumber(\"DestinationX\")" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyPauseDurationBeforeGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitBeforeGoingBackDuration\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Duration in seconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "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" + }, + { + "description": "Duration to wait before going back", + "name": "WaitBeforeGoingBackDuration", + "type": "expression" + }, + { + "description": "Loop", + "name": "ShouldLoop", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has reached one of the 2 ends of the path.", + "fullName": "Reached an end", + "functionType": "Condition", + "name": "HasReachedAnEnd", + "sentence": "_PARAM0_ reached an end of the path", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::Progress()", + "=", + "Object.Behavior::PropertyTarget()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has finished to move on the path.", + "fullName": "Finished to move", + "functionType": "Condition", + "name": "HasFinishedToMove", + "sentence": "_PARAM0_ has finished to move", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::TweenPathMovement::PropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyShouldGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "CurvedMovement::TweenPathMovement::PropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle of movement on its path.", + "fullName": "Movement angle", + "functionType": "Expression", + "name": "MovementAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPathAngle() + CurvedMovement::PathAngle(Object.Behavior::PropertyPathName(), Object.Behavior::RepeatedPathPosition()) + Object.Behavior::PropertyRotationOffset() + Object.Behavior::BackOrForthAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the object trajectory.", + "fullName": "Draw the trajectory", + "functionType": "Action", + "group": "Debug", + "name": "DrawDebug", + "sentence": "Draw trajectory of _PARAM0_ on _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::UseRelativeCoordinates" + }, + "parameters": [ + "ShapePainter", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "ShapePainter", + "=", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineSize" + }, + "parameters": [ + "ShapePainter", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "", + "/** @type {gdjs.ShapePainterRuntimeObject} */", + "const shapePainter = eventsFunctionContext.getObjects(\"ShapePainter\")[0];", + "if (!shapePainter) {", + " return ;", + "}", + "", + "/** @type {string} */", + "const pathName = behavior._getPathName();", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " return ;", + "}", + "", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.curvedMovementTransformation;", + "let point = behavior.curvedMovementWorkingPoint || [0, 0];", + "", + "let originX = behavior._getPathOriginX();", + "let originY = behavior._getPathOriginY();", + "shapePainter.drawPathMoveTo(originX, originY);", + "const repetitionCount = behavior._getRepetitionCount();", + "let previousLastTargetX = 0;", + "let previousLastTargetY = 0;", + "const endX = curvedPath.getEndX();", + "const endY = curvedPath.getEndY();", + "for (let repetitionIndex = 0; repetitionIndex < repetitionCount; repetitionIndex++) {", + " for (let curveIndex = 0; curveIndex < curvedPath.curves.length; curveIndex++) {", + " point[0] = curvedPath.getFirstControlX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getFirstControlY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const firstControlX = point[0];", + " const firstControlY = point[1];", + "", + " point[0] = curvedPath.getSecondControlX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getSecondControlY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const secondControlX = point[0];", + " const secondControlY = point[1];", + "", + " point[0] = curvedPath.getTargetX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getTargetY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const targetX = point[0];", + " const targetY = point[1];", + "", + " shapePainter.drawPathBezierCurveTo(", + " firstControlX + originX,", + " firstControlY + originY,", + " secondControlX + originX,", + " secondControlY + originY,", + " targetX + originX,", + " targetY + originY);", + " }", + " previousLastTargetX += endX;", + " previousLastTargetY += endY;", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Shape painter", + "name": "ShapePainter", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Change the transformation to apply to the path.", + "fullName": "Path transformation", + "functionType": "Action", + "name": "SetTransformation", + "private": true, + "sentence": "Change the path trasformation of _PARAM0_ to origin _PARAM2_; _PARAM3_ scale by _PARAM4_ and a rotation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "", + "const scale = eventsFunctionContext.getArgument(\"Scale\");", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.curvedMovementTransformation || new gdjs.AffineTransformation()", + "transformation.setToScale(scale, scale);", + "transformation.rotate(angle / 180 * Math.PI);", + "", + "behavior.curvedMovementTransformation = transformation;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + }, + { + "description": "Origin X", + "name": "OriginX", + "type": "expression" + }, + { + "description": "Origin Y", + "name": "OriginY", + "type": "expression" + }, + { + "description": "Scale", + "name": "Scale", + "type": "expression" + }, + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Initialize the movement state.", + "fullName": "Initialize the movement", + "functionType": "Action", + "name": "InitializeMovement", + "private": true, + "sentence": "Initialize the movement of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyViewpoint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Top-down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SetSpeedScaleY" + }, + "parameters": [ + "", + "Object.Behavior::PropertyPathName()", + "1", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyViewpoint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Isometry 2:1 (26.565°)\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SetSpeedScaleY" + }, + "parameters": [ + "", + "Object.Behavior::PropertyPathName()", + "0.5", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetTransformation" + }, + "parameters": [ + "Object", + "Behavior", + "Object.X()", + "Object.Y()", + "Object.Behavior::PropertyPathScale()", + "Object.Behavior::PropertyPathAngle()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__CurvedMovement.Time\"" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyOrigin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::TweenPathMovement::SetPropertyTarget" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipXToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyFlipYToGoBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipY" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of repetitions between the current position and the origin.", + "fullName": "Repetition done", + "functionType": "Expression", + "name": "RepetitionDone", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "floor(Object.Behavior::Progress() * Object.Behavior::PropertyRepetitionCount())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the position on one repeated path.", + "fullName": "Path position", + "functionType": "Expression", + "name": "RepeatedPathPosition", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PathLength() * mod(Object.Behavior::Progress(), 1 / Object.Behavior::PropertyRepetitionCount()) * Object.Behavior::PropertyRepetitionCount()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the progress on the full path from 0 to 1, where 0 means the origin and 1 the end.", + "fullName": "Progress", + "functionType": "Expression", + "name": "Progress", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Tween::Ease(Object.Behavior::PropertyEasing(), Object.Behavior::PropertyOrigin(), Object.Behavior::PropertyTarget(), min(1, Object.ObjectTimerElapsedTime(\"__CurvedMovement.Time\") / Object.Behavior::PropertyDuration()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the length of the path (one repetition only).", + "fullName": "Path length", + "functionType": "Expression", + "name": "PathLength", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathLength(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on X axis of the path end.", + "fullName": "Path end X", + "functionType": "Expression", + "name": "PathEndX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathEndX(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on Y axis of the path end.", + "fullName": "Path end Y", + "functionType": "Expression", + "name": "PathEndY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathEndY(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the speed scale on Y axis of the path.", + "fullName": "Path speed scale Y", + "functionType": "Expression", + "name": "PathSpeedScaleY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::SpeedScaleY(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle to use when the object is going back or not.", + "fullName": "Back or forth angle", + "functionType": "Expression", + "name": "BackOrForthAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::TweenPathMovement::PropertyIsGoingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "180" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::TweenPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Rotate object", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Rotation" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Rotation offset", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RotationOffset" + }, + { + "value": "", + "type": "Boolean", + "label": "Flip on X to go back", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FlipXToGoBack" + }, + { + "value": "", + "type": "Boolean", + "label": "Flip on Y to go back", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FlipYToGoBack" + }, + { + "value": "1", + "type": "Number", + "label": "Speed scale", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "SpeedScale" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathOriginX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathOriginY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Target" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Origin" + }, + { + "value": "", + "type": "String", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathName" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Duration" + }, + { + "value": "", + "type": "String", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Easing" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingElementIndex" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "X" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Y" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathAngle" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathScale" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "RepetitionCount" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldGoBack" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldLoop" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "RepetitionDoneCount" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsGoingBack" + }, + { + "value": "0", + "type": "Number", + "label": "Pause duration before going back", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PauseDurationBeforeGoingBack" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingPathOriginX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingPathOriginY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DebugLineStrokeWidth" + }, + { + "value": "Top-Down", + "type": "Choice", + "label": "Viewpoint", + "description": "", + "group": "", + "extraInformation": [ + "Top-Down", + "Isometry 2:1 (26.565°)" + ], + "hidden": false, + "name": "Viewpoint" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Move objects on curved paths at a given speed.", + "fullName": "Movement on a curve (speed-based)", + "name": "SpeedPathMovement", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move on the path", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::CanMoveFurther" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPreviousSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySpeed()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update speed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetedSpeed()" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyAcceleration() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "sign(Object.Behavior::PropertyAcceleration())", + "!=", + "sign(Object.Behavior::PropertyTargetedSpeed() - Object.Behavior::PropertySpeed())" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTargetedSpeed()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the position on the path (the current length) with a Verlet integration.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "(Object.Behavior::PropertyPreviousSpeed() + Object.Behavior::PropertySpeed()) * TimeDelta() / 2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "It's useful to know which way to look at when the speed reached 0.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyIsLookingBack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyIsLookingBack" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the path followed by an object.", + "fullName": "Follow a path", + "functionType": "Action", + "name": "SetPath", + "sentence": "_PARAM0_ follow the path: _PARAM2_ repeated _PARAM3_ times and loop: _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"PathName\")" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyRepetitionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(1, GetArgumentAsNumber(\"RepetitionCount\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathOriginX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::InitializeMovement" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Loop", + "name": "ShouldLoop", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the path followed by an object to reach a position.", + "fullName": "Follow a path to a position", + "functionType": "Action", + "name": "SetPathTo", + "sentence": "_PARAM0_ follow the path _PARAM2_ repeated _PARAM3_ times to reach _PARAM5_ ; _PARAM6_ and loop: _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the path is close or empty, there is no way to reach a destination", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::IsClosed" + }, + "parameters": [ + "", + "GetArgumentAsString(\"PathName\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"PathName\")" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyRepetitionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(1, GetArgumentAsNumber(\"RepetitionCount\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldLoop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathOriginX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "AngleBetweenPositions(Object.X(), Object.Y(), GetArgumentAsNumber(\"DestinationX\"), Object.Y() + (GetArgumentAsNumber(\"DestinationY\") - Object.Y()) / Object.Behavior::PathSpeedScaleY()) - AngleBetweenPositions(0, 0, Object.Behavior::PathEndX(), Object.Behavior::PathEndY() / Object.Behavior::PathSpeedScaleY())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyPathScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "DistanceBetweenPositions(Object.X(), Object.Y(), GetArgumentAsNumber(\"DestinationX\"), Object.Y() + (GetArgumentAsNumber(\"DestinationY\") - Object.Y()) / Object.Behavior::PathSpeedScaleY()) / DistanceBetweenPositions(0, 0, Object.Behavior::PathEndX(), Object.Behavior::PathEndY() / Object.Behavior::PathSpeedScaleY()) / GetArgumentAsNumber(\"RepetitionCount\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::InitializeMovement" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Path name", + "longDescription": "The path can be define with the \"Append curve\" action.", + "name": "PathName", + "supplementaryInformation": "sceneBezierCurve", + "type": "identifier" + }, + { + "description": "Number of repetitions", + "name": "RepetitionCount", + "type": "expression" + }, + { + "description": "Loop", + "name": "ShouldLoop", + "type": "yesorno" + }, + { + "description": "Destination X", + "name": "DestinationX", + "type": "expression" + }, + { + "description": "Destination Y", + "name": "DestinationY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the length between the trajectory origin and the current position.", + "fullName": "Position on the path", + "functionType": "ExpressionAndCondition", + "name": "PositionOnPath", + "sentence": "the length from the trajectory origin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCurrentLength()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the position of the object on the path.", + "fullName": "Position on the path", + "functionType": "ActionWithOperator", + "getterName": "PositionOnPath", + "name": "SetPositionOnPath", + "sentence": "Change the position of _PARAM0_ on the path at the length _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::PropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyCurrentLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(GetArgumentAsNumber(\"Value\"), 0, Object.Behavior::TotalLength())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyCurrentLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(GetArgumentAsNumber(\"Value\"), Object.Behavior::TotalLength())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::UpdatePosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyRotation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyPathAngle() + CurvedMovement::PathAngle(Object.Behavior::PropertyPathName(), Object.Behavior::RepeatedPathPosition()) + Object.Behavior::PropertyRotationOffset() + Object.Behavior::BackOrForthAngle()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Length", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set the the object on the path according to the current length.", + "fullName": "Update position", + "functionType": "Action", + "name": "UpdatePosition", + "private": true, + "sentence": "Update the position of _PARAM0_ on the path", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "/** @type {string} */", + "const pathName = behavior._getPathName();", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " return;", + "}", + "", + "behavior.workingTransformation = behavior.workingTransformation || new gdjs.AffineTransformation();", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.workingTransformation;", + "", + "const repetitionDone = behavior.RepetitionDone();", + "transformation.setToTranslation(", + " repetitionDone * behavior.PathEndX(),", + " repetitionDone * behavior.PathEndY() / behavior.PathSpeedScaleY()", + ");", + "transformation.preConcatenate(behavior.curvedMovementTransformation);", + "", + "/** @type {number} */", + "const length = behavior.RepeatedPathPosition();", + "/** @type {[number, number]} */", + "const point = curvedPath.getTransformedPosition(length, transformation);", + "const x = point[0] + behavior._getPathOriginX();", + "const y = point[1] + behavior._getPathOriginY();", + "object.setPosition(x, y);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the length from the trajectory origin is lesser than a value.", + "fullName": "Current length", + "functionType": "Condition", + "name": "CheckPositionOnPath", + "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PositionOnPath()", + "<", + "GetArgumentAsNumber(\"Length\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Length from the trajectory origin (in pixels)", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has reached the origin position of the path.", + "fullName": "Reached path origin", + "functionType": "Condition", + "name": "HasReachedOrigin", + "sentence": "_PARAM0_ reached the path beginning", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyCurrentLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has reached the target position of the path.", + "fullName": "Reached path target", + "functionType": "Condition", + "name": "HasReachedTarget", + "sentence": "_PARAM0_ reached the path target", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyCurrentLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::TotalLength()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has reached one of the 2 ends of the path.", + "fullName": "Reach an end", + "functionType": "Condition", + "name": "HasReachedAnEnd", + "sentence": "_PARAM0_ reached an end of the path", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object can still move in the current direction.", + "fullName": "Can move further", + "functionType": "Condition", + "name": "CanMoveFurther", + "sentence": "_PARAM0_ can move further on its path", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyShouldLoop" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle of movement on its path.", + "fullName": "Movement angle", + "functionType": "Expression", + "name": "MovementAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPathAngle() + CurvedMovement::PathAngle(Object.Behavior::PropertyPathName(), Object.Behavior::RepeatedPathPosition()) + Object.Behavior::PropertyRotationOffset() + Object.Behavior::BackOrForthAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the speed of the object.", + "fullName": "Speed", + "functionType": "ExpressionAndCondition", + "name": "Speed", + "sentence": "the speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertySpeed()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the current speed of the object.", + "fullName": "Speed", + "functionType": "ActionWithOperator", + "getterName": "Speed", + "name": "SetSpeed", + "sentence": "Change the speed of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyTargetedSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object accelerate until it reaches a given speed.", + "fullName": "Accelerate", + "functionType": "Action", + "name": "AccelarateAt", + "sentence": "_PARAM0_ accelerate at _PARAM3_ to reach the speed of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyTargetedSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetedSpeed\")" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Acceleration\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Targeted speed (in pixels per second)", + "name": "TargetedSpeed", + "type": "expression" + }, + { + "description": "Acceleration (in pixels per second per second)", + "name": "Acceleration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object accelerate to reaches a speed in a given amount of time.", + "fullName": "Accelerate during", + "functionType": "Action", + "name": "AccelarateDuring", + "sentence": "_PARAM0_ accelerate during _PARAM3_ seconds to reach the speed of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyTargetedSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetedSpeed\")" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(GetArgumentAsNumber(\"TargetedSpeed\") - Object.Behavior::PropertySpeed()) / GetArgumentAsNumber(\"Duration\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Targeted speed (in pixels per second)", + "name": "TargetedSpeed", + "type": "expression" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the object trajectory.", + "fullName": "Draw the trajectory", + "functionType": "Action", + "group": "Debug", + "name": "DrawDebug", + "sentence": "Draw trajectory of _PARAM0_ on _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::UseRelativeCoordinates" + }, + "parameters": [ + "ShapePainter", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "ShapePainter", + "=", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineSize" + }, + "parameters": [ + "ShapePainter", + "=", + "32" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "", + "/** @type {gdjs.ShapePainterRuntimeObject} */", + "const shapePainter = eventsFunctionContext.getObjects(\"ShapePainter\")[0];", + "if (!shapePainter) {", + " return ;", + "}", + "", + "/** @type {string} */", + "const pathName = behavior._getPathName();", + "/** @type {Map} */", + "const curvedPaths = runtimeScene.__curvedMovementExtension.curvedPaths;", + "const curvedPath = curvedPaths.get(pathName);", + "if (!curvedPath) {", + " return ;", + "}", + "", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.curvedMovementTransformation;", + "let point = behavior.curvedMovementWorkingPoint || [0, 0];", + "", + "let originX = behavior._getPathOriginX();", + "let originY = behavior._getPathOriginY();", + "shapePainter.drawPathMoveTo(originX, originY);", + "const repetitionCount = behavior._getRepetitionCount();", + "let previousLastTargetX = 0;", + "let previousLastTargetY = 0;", + "const endX = curvedPath.getEndX();", + "const endY = curvedPath.getEndY();", + "for (let repetitionIndex = 0; repetitionIndex < repetitionCount; repetitionIndex++) {", + " for (let curveIndex = 0; curveIndex < curvedPath.curves.length; curveIndex++) {", + " point[0] = curvedPath.getFirstControlX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getFirstControlY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const firstControlX = point[0];", + " const firstControlY = point[1];", + "", + " point[0] = curvedPath.getSecondControlX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getSecondControlY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const secondControlX = point[0];", + " const secondControlY = point[1];", + "", + " point[0] = curvedPath.getTargetX(curveIndex) + previousLastTargetX;", + " point[1] = curvedPath.getTargetY(curveIndex) + previousLastTargetY;", + " if (transformation) {", + " point = curvedPath.transformPosition(point[0], point[1], transformation, point);", + " }", + " const targetX = point[0];", + " const targetY = point[1];", + "", + " shapePainter.drawPathBezierCurveTo(", + " firstControlX + originX,", + " firstControlY + originY,", + " secondControlX + originX,", + " secondControlY + originY,", + " targetX + originX,", + " targetY + originY);", + " }", + " previousLastTargetX += endX;", + " previousLastTargetY += endY;", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Shape painter", + "name": "ShapePainter", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Change the transformation to apply to the path.", + "fullName": "Path transformation", + "functionType": "Action", + "name": "SetTransformation", + "private": true, + "sentence": "Change the path trasformation of _PARAM0_ to origin _PARAM2_; _PARAM3_ scale by _PARAM4_ and a rotation of _PARAM5_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = objects[0].getBehavior(behaviorName);", + "", + "const scale = eventsFunctionContext.getArgument(\"Scale\");", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "/** @type {gdjs.AffineTransformation} */", + "const transformation = behavior.curvedMovementTransformation || new gdjs.AffineTransformation()", + "transformation.setToScale(scale, scale);", + "transformation.rotate(angle / 180 * Math.PI);", + "", + "behavior.curvedMovementTransformation = transformation;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Origin X", + "name": "OriginX", + "type": "expression" + }, + { + "description": "Origin Y", + "name": "OriginY", + "type": "expression" + }, + { + "description": "Scale", + "name": "Scale", + "type": "expression" + }, + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Initialize the movement state.", + "fullName": "Initialize the movement", + "functionType": "Action", + "name": "InitializeMovement", + "private": true, + "sentence": "Initialize the movement of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyViewpoint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Top-down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SetSpeedScaleY" + }, + "parameters": [ + "", + "Object.Behavior::PropertyPathName()", + "1", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyViewpoint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Isometry 2:1 (26.565°)\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SetSpeedScaleY" + }, + "parameters": [ + "", + "Object.Behavior::PropertyPathName()", + "0.5", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetTransformation" + }, + "parameters": [ + "Object", + "Behavior", + "Object.X()", + "Object.Y()", + "Object.Behavior::PropertyPathScale()", + "Object.Behavior::PropertyPathAngle()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the position on one repeated path.", + "fullName": "Repeated path position", + "functionType": "Expression", + "name": "RepeatedPathPosition", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(Object.Behavior::PropertyCurrentLength(), Object.Behavior::PathLength())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PathLength()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of repetitions between the current position and the origin.", + "fullName": "Repetition done", + "functionType": "Expression", + "name": "RepetitionDone", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "floor(Object.Behavior::PropertyCurrentLength() / Object.Behavior::PathLength())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyRepetitionCount() - 1" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the progress on the full path from 0 to 1, where 0 means the origin and 1 the end.", + "fullName": "Progress", + "functionType": "Expression", + "name": "Progress", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(Object.Behavior::PropertyCurrentLength(), Object.Behavior::TotalLength())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the length of the path (one repetition only).", + "fullName": "Path length", + "functionType": "Expression", + "name": "PathLength", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathLength(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the length of the complete trajectory (without looping).", + "fullName": "Total length", + "functionType": "Expression", + "name": "TotalLength", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathLength(Object.Behavior::PropertyPathName()) * Object.Behavior::PropertyRepetitionCount()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on X axis of the path end.", + "fullName": "Path end X", + "functionType": "Expression", + "name": "PathEndX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathEndX(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on Y axis of the path end.", + "fullName": "Path end Y", + "functionType": "Expression", + "name": "PathEndY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::PathEndY(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the speed scale on Y axis of the path.", + "fullName": "Path speed scale Y", + "functionType": "Expression", + "name": "PathSpeedScaleY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "CurvedMovement::SpeedScaleY(Object.Behavior::PropertyPathName())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle to use when the object is going back or not.", + "fullName": "Back or forth angle", + "functionType": "Expression", + "name": "BackOrForthAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyIsLookingBack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "180" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Rotate object", + "description": "", + "group": "Rotation", + "extraInformation": [], + "hidden": false, + "name": "Rotation" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Rotation offset", + "description": "", + "group": "Rotation", + "extraInformation": [], + "hidden": false, + "name": "RotationOffset" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Speed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathOriginX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathOriginY" + }, + { + "value": "", + "type": "String", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathName" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetedSpeed" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Acceleration" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingElementIndex" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "X" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Y" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathAngle" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathScale" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "RepetitionCount" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldLoop" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingPathOriginX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DrawingPathOriginY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DebugLineStrokeWidth" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentLength" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsLookingBack" + }, + { + "value": "Top-Down", + "type": "Choice", + "label": "Viewpoint", + "description": "", + "group": "", + "extraInformation": [ + "Top-Down", + "Isometry 2:1 (26.565°)" + ], + "hidden": false, + "name": "Viewpoint" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "D8H", + "category": "Input", + "extensionNamespace": "", + "fullName": "Cursor movement conditions", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTEsMjhMMTEsMjhjLTMuMywwLTYtMi43LTYtNnYtNGMwLTMuMywyLjctNiw2LTZoMGMzLjMsMCw2LDIuNyw2LDZ2NEMxNywyNS4zLDE0LjMsMjgsMTEsMjh6Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTEiIHkxPSIxNSIgeDI9IjExIiB5Mj0iMTkiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yOSw5YzAsMi41LTIsNC41LTQuNSw0LjVTMjAsMTEuNSwyMCw5VjguNUMyMCw2LDE4LDQsMTUuNSw0UzExLDYsMTEsOC41Ii8+DQo8L3N2Zz4NCg==", + "name": "CursorMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_mouse_pc.svg", + "shortDescription": "Conditions to check the cursor movement (still or moving).", + "version": "1.0.1", + "description": [ + "Provides two conditions:", + "* The cursor is moving", + "* The cursor has stayed still for a given duration" + ], + "origin": { + "identifier": "CursorMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "mouse", + "pointer", + "cursor" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if the cursor has stayed still for the specified time on the default layer.", + "fullName": "Cursor stays still", + "functionType": "Condition", + "name": "CursorStayStill", + "sentence": "Cursor has stayed still for _PARAM1_ seconds ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"__mousemovement_MouseStayStill\"", + "<", + "GetArgumentAsNumber(\"Duration\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CursorMovement::CursorIsMoving" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"__mousemovement_MouseStayStill\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is moving on the default layer.", + "fullName": "Cursor is moving", + "functionType": "Condition", + "name": "CursorIsMoving", + "sentence": "Cursor is moving", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__mousemovement.MousePreX", + "=", + "MouseX(\"\", 0)" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__mousemovement.MousePreY", + "=", + "MouseY(\"\", 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__mousemovement.MousePreX", + "=", + "MouseX(\"\", 0)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__mousemovement.MousePreY", + "=", + "MouseY(\"\", 0)" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "@4ian", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "Fire bullets", + "helpPath": "/extensions/fire-bullet/details", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWJ1bGxldCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNCwyMkgxMFYyMUgxNFYyMk0xMywxMFY3SDExVjEwTDEwLDExLjVWMjBIMTRWMTEuNUwxMywxME0xMiwyQzEyLDIgMTEsMyAxMSw1VjZIMTNWNUMxMyw1IDEzLDMgMTIsMloiIC8+PC9zdmc+", + "name": "FireBullet", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", + "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", + "version": "0.6.1", + "description": [ + "This extension allows objects to fire bullets.", + "", + "It handles:", + "- Cooldown between shots", + "- Firing multiple bullets at a time ([open the project online](https://editor.gdevelop.io/?project=example://fire-bullet))", + "- Ammo management", + "- Overheat", + "", + "It can be used for:", + "- Twin-stick shooters ([open the project online](https://editor.gdevelop.io/?project=example://conviction-of-gun-dude-desktop))", + "- Shoot'em up ([open the project online](https://editor.gdevelop.io/?project=example://space-shooter))", + "", + "A simple example shows how to make firing patterns ([open the project online](https://editor.gdevelop.io/?project=example://firing-patterns))." + ], + "origin": { + "identifier": "FireBullet", + "name": "gdevelop-extension-store" + }, + "tags": [ + "fire", + "bullet", + "spawn", + "firerate", + "reload", + "weapon", + "ranged", + "ammo", + "overheat" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "xpwUwByyImTDcHEqDUqfyg0oRBt1", + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Fire bullets, manage ammo, reloading, and overheating.", + "fullName": "Fire bullets", + "name": "FireBullet", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyStartingAmmo()" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyShotsPerReload()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Take a shot (if triggered)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyHasJustFired" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset firing cooldown", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.FiringCooldown\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update ammo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Subtract 1 from ammo (if not unlimited ammo)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update reloading counter", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyShotsPerReload" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Automatically reload gun when needed", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::IsReloadNeeded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::ReloadAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update Overheat", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increase heat (if needed)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyHeatIncreasePerShot" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyHeatIncreasePerShot()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if this caused overheat", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyOverheatDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::IsOverheated" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.OverheatDuration\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update statistics", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reset firing detection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reload gun when needed", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect when reload is completed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.ReloadingTimer\"", + ">=", + "Object.Behavior::PropertyReloadDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyShotsPerReload()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Only reload the amount of ammo available", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyShotsPerReload(), Object.Behavior::PropertyAmmoQuantity())" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Reduce heat level (based on cooling rate)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::HeatLevel()", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyExponentialCoolingRate" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyExponentialCoolingRate() * Object.Behavior::PropertyHeatLevel())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyLinearCoolingRate" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHeatLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, Object.Behavior::PropertyHeatLevel() - TimeDelta() * Object.Behavior::PropertyLinearCoolingRate())" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets toward a position.", + "fullName": "Fire bullets toward a position", + "functionType": "Action", + "name": "FireTowardPosition", + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward position _PARAM5_;_PARAM6_ with speed _PARAM7_ px/s", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"XPosition\")", + "GetArgumentAsNumber(\"YPosition\")", + "Bullet", + "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"),GetArgumentAsNumber(\"TargetYPosition\"))", + "GetArgumentAsNumber(\"Speed\")", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectList" + }, + { + "description": "Target X position", + "name": "TargetXPosition", + "type": "expression" + }, + { + "description": "Target Y position", + "name": "TargetYPosition", + "type": "expression" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire bullets in the direction of a given angle.", + "fullName": "Fire bullets toward an angle", + "functionType": "Action", + "name": "Fire", + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward angle _PARAM5_ and speed _PARAM6_ px/s", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check if ready to shoot", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHasJustFired" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Single bullet", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PropertyBulletQuantity()", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::FireSingleBullet" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"XPosition\")", + "GetArgumentAsNumber(\"YPosition\")", + "Bullet", + "GetArgumentAsNumber(\"Angle\")", + "GetArgumentAsNumber(\"Speed\")", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Multiple bullets", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PropertyBulletQuantity()", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FireBullet.CurrentBulletAngle", + "=", + "GetArgumentAsNumber(\"Angle\") - Object.Behavior::PropertyFiringArc()/2" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FireBullet.BatchOrderID", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.Behavior::PropertyBulletQuantity()", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::FireSingleBullet" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"XPosition\")", + "GetArgumentAsNumber(\"YPosition\")", + "Bullet", + "Object.Variable(__FireBullet.CurrentBulletAngle) + RandomInRange(-Object.Behavior::PropertyAngleVariance(),Object.Behavior::PropertyAngleVariance())", + "GetArgumentAsNumber(\"Speed\")", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move temp variable to the next angle a bullet will be sent", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FireBullet.CurrentBulletAngle", + "+", + "Object.Behavior::PropertyFiringArc() / (Object.Behavior::PropertyBulletQuantity() - 1)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__FireBullet.BatchOrderID", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectList" + }, + { + "description": "Angle of the bullet, in degrees", + "name": "Angle", + "type": "expression" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Fire a single bullet. This is only meant to be used inside the \"Fire bullet\" action.", + "fullName": "Fire a single bullet", + "functionType": "Action", + "group": "Firing", + "name": "FireSingleBullet", + "private": true, + "sentence": "Fire a single bullet _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, with angle _PARAM5_ and speed _PARAM6_ px/s", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Fire a single bullet", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create bullet", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Bullet", + "GetArgumentAsNumber(\"XPosition\")", + "GetArgumentAsNumber(\"YPosition\")", + "Object.Behavior::PropertyBulletLayer()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move bullet (apply angle and bullet speed variances)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyRandomizedAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Angle\") + RandomInRange(-Object.Behavior::PropertyAngleVariance(), Object.Behavior::PropertyAngleVariance())" + ] + }, + { + "type": { + "value": "AddForceAL" + }, + "parameters": [ + "Bullet", + "Object.Behavior::PropertyRandomizedAngle()", + "GetArgumentAsNumber(\"Speed\") + RandomInRange(-Object.Behavior::PropertyBulletSpeedVariance(), Object.Behavior::PropertyBulletSpeedVariance())", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add identifier variables (to enable advanced picking by users)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Bullet", + "__FireBullet.BulletID", + "=", + "Object.Behavior::PropertyTotalBulletsCreated()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Bullet", + "__FireBullet.BatchID", + "=", + "Object.Behavior::PropertyTotalShotsFired()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Bullet", + "__FireBullet.BatchOrderID", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Rotate newly created bullet, if needed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyRotateBullet" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Bullet", + "=", + "Object.Behavior::PropertyRandomizedAngle()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update statistics", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectList" + }, + { + "description": "Angle of the bullet, in degrees", + "name": "Angle", + "type": "expression" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Reload ammo.", + "fullName": "Reload ammo", + "functionType": "Action", + "name": "ReloadAmmo", + "sentence": "Reload ammo on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOutOfAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.ReloadingTimer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has just fired something.", + "fullName": "Has just fired", + "functionType": "Condition", + "group": "Firing", + "name": "HasJustFired", + "sentence": "_PARAM0_ has just fired", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyHasJustFired" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if bullet rotates to match trajectory.", + "fullName": "Is bullet rotation enabled", + "functionType": "Condition", + "group": "Firing", + "name": "BulletRotationEnabled", + "sentence": "Bullet rotation enabled on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyRotateBullet" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the firing arc (in degrees) where bullets are shot. Bullets are evenly spaced out inside the firing arc.", + "fullName": "Firing arc", + "functionType": "ExpressionAndCondition", + "group": "Multi-Fire", + "name": "FiringArc", + "sentence": "the firing arc", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFiringArc()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FiringArc", + "name": "SetFiringArcOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyFiringArc" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Firing arc (degrees) Range: 0 to 360", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the firing arc (in degrees) where bullets will be shot. Bullets will be evenly spaced out inside the firing arc.", + "fullName": "Set firing arc (deprecated)", + "functionType": "Action", + "group": "Multi-Fire", + "name": "SetFiringArc", + "private": true, + "sentence": "Set firing arc of _PARAM0_ to _PARAM2_ degrees", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetFiringArcOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Firing arc (degrees) Range: 0 to 360", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the angle variance (in degrees) applied to each bullet.", + "fullName": "Angle variance", + "functionType": "ExpressionAndCondition", + "group": "Firing variance", + "name": "AngleVariance", + "sentence": "the angle variance", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyAngleVariance()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "AngleVariance", + "name": "SetAngleVarianceOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAngleVariance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Angle variance (degrees) Range: 0 to 180", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle variance (in degrees) applied to each bullet.", + "fullName": "Set angle variance (deprecated)", + "functionType": "Action", + "group": "Firing", + "name": "SetAngleVariance", + "private": true, + "sentence": "Set angle variance of _PARAM0_ to _PARAM2_ degrees", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetAngleVarianceOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Angle variance (degrees) Range: 0 to 180", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the bullet speed variance (pixels per second) applied to each bullet.", + "fullName": "Bullet speed variance", + "functionType": "ExpressionAndCondition", + "group": "Firing variance", + "name": "BulletSpeedVariance", + "sentence": "the bullet speed variance", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyBulletSpeedVariance()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BulletSpeedVariance", + "name": "SetBulletSpeedVarianceOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyBulletSpeedVariance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Angle variance (degrees) Range: 0 to 180", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the speed variance (pixels per second) applied to each bullet.", + "fullName": "Set bullet speed variance (deprecated)", + "functionType": "Action", + "group": "Multi-Fire", + "name": "SetBulletSpeedVariance", + "private": true, + "sentence": "Set bullet speed variance of _PARAM0_ to _PARAM2_ pixels per second", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetBulletSpeedVarianceOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Angle variance (degrees) Range: 0 to 180", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the number of bullets shot every time the \"fire bullet\" action is used.", + "fullName": "Bullets per shot", + "functionType": "ExpressionAndCondition", + "group": "Multi-Fire", + "name": "BulletQuantity", + "sentence": "the number of bullets per shot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyBulletQuantity()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "BulletQuantity", + "name": "SetBulletQuantityOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyBulletQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Bullets", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the number of bullets shot every time the \"fire bullet\" action is used.", + "fullName": "Set number of bullets per shot (deprecated)", + "functionType": "Action", + "group": "Multi-Fire", + "name": "SetBulletQuantity", + "private": true, + "sentence": "Set number of bullets per shot of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetBulletQuantityOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Bullets", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the layer that bullets are created on.", + "fullName": "Set bullet layer", + "functionType": "Action", + "group": "Firing", + "name": "SetBulletLayer", + "sentence": "Set the layer used to create bullets fired by _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyBulletLayer" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Layer", + "name": "Value", + "type": "layer" + } + ], + "objectGroups": [] + }, + { + "description": "Enable bullet rotation.", + "fullName": "Enable (or disable) bullet rotation", + "functionType": "Action", + "group": "Firing", + "name": "SetRotateBullet", + "sentence": "Enable bullet rotation on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"RotateBullet\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"RotateBullet\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyRotateBullet" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Rotate bullet to match trajetory", + "name": "RotateBullet", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable unlimited ammo.", + "fullName": "Enable (or disable) unlimited ammo", + "functionType": "Action", + "group": "Ammo", + "name": "SetUnlimitedAmmo", + "sentence": "Enable unlimited ammo on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UnlimitedAmmo\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UnlimitedAmmo\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Unlimited ammo", + "name": "UnlimitedAmmo", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the firing cooldown (in seconds) also known as rate of fire.", + "fullName": "Firing cooldown", + "functionType": "ExpressionAndCondition", + "group": "Firing", + "name": "Cooldown", + "sentence": "the firing cooldown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFireCooldown()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Cooldown", + "name": "SetCooldownOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyFireCooldown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Cooldown in seconds", + "name": "NewCooldown", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the firing cooldown, which changes the rate of fire.", + "fullName": "Set firing cooldown (deprecated)", + "functionType": "Action", + "group": "Firing", + "name": "SetCooldown", + "private": true, + "sentence": "Set the fire rate of _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetCooldownOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"NewCooldown\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Cooldown in seconds", + "name": "NewCooldown", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the reload duration (in seconds).", + "fullName": "Reload duration", + "functionType": "ExpressionAndCondition", + "group": "Reload", + "name": "ReloadDuration", + "sentence": "the reload duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyReloadDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ReloadDuration", + "name": "SetReloadDurationOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyReloadDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Reload duration (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the duration to reload ammo.", + "fullName": "Set reload duration (deprecated)", + "functionType": "Action", + "group": "Reload", + "name": "SetReloadDuration", + "private": true, + "sentence": "Set the reload duration of _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetReloadDurationOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Reload duration (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the overheat duration (in seconds). When an object is overheated, it can't fire for this duration.", + "fullName": "Overheat duration", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "OverheatDuration", + "sentence": "the overheat duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyOverheatDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OverheatDuration", + "name": "SetOverheatDurationOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyOverheatDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Overheat duration (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the duration after becoming overheated.", + "fullName": "Set overheat duration (deprecated)", + "functionType": "Action", + "group": "Overheat", + "name": "SetOverheatDuration", + "private": true, + "sentence": "Set the overheat duration of _PARAM0_ to _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetOverheatDurationOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Overheat duration (seconds)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the ammo quantity.", + "fullName": "Ammo quantity", + "functionType": "ExpressionAndCondition", + "group": "Ammo", + "name": "AmmoQuantity", + "sentence": "the ammo quantity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyAmmoQuantity()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "AmmoQuantity", + "name": "SetAmmoQuantityOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Ammo", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the quantity of ammo.", + "fullName": "Set ammo quantity (deprecated)", + "functionType": "Action", + "group": "Ammo", + "name": "SetAmmoQuantity", + "private": true, + "sentence": "Set the ammo quantity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetAmmoQuantityOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Ammo", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the heat increase per shot.", + "fullName": "Heat increase per shot", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "HeatIncreasePerShot", + "sentence": "the heat increase per shot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeatIncreasePerShot()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HeatIncreasePerShot", + "name": "SetHeatPerShotOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyHeatIncreasePerShot" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Heat increase per shot (Range: 0 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the heat increase per shot.", + "fullName": "Set heat increase per shot (deprecated)", + "functionType": "Action", + "group": "Overheat", + "name": "SetHeatPerShot", + "private": true, + "sentence": "Set the heat increase of _PARAM0_ to _PARAM2_ per shot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetHeatPerShotOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Heat increase per shot (Range: 0 to 1)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the max ammo.", + "fullName": "Max ammo", + "functionType": "ExpressionAndCondition", + "group": "Ammo", + "name": "MaxAmmo", + "sentence": "the max ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxAmmo()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxAmmo", + "name": "SetMaxAmmoOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyMaxAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyMaxAmmo" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Max ammo", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the max ammo.", + "fullName": "Set max ammo (deprecated)", + "functionType": "Action", + "group": "Ammo", + "name": "SetMaxAmmo", + "private": true, + "sentence": "Set the max ammo of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetMaxAmmoOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Max ammo", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Reset total shots fired.", + "fullName": "Reset total shots fired", + "functionType": "Action", + "group": "Stats", + "name": "ResetTotalShotsFired", + "sentence": "Reset total shots fired by _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalShotsFired" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset total bullets created.", + "fullName": "Reset total bullets created", + "functionType": "Action", + "group": "Stats", + "name": "ResetTotalBulletsCreated", + "sentence": "Reset total bullets created by _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalBulletsCreated" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset total reloads completed.", + "fullName": "Reset total reloads completed", + "functionType": "Action", + "group": "Stats", + "name": "ResetTotalReloadsCompleted", + "sentence": "Reset total reloads completed by _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyTotalReloadsCompleted" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the number of shots per reload.", + "fullName": "Shots per reload", + "functionType": "ExpressionAndCondition", + "group": "Reload", + "name": "ShotsPerReload", + "sentence": "the shots per reload", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShotsPerReload()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ShotsPerReload", + "name": "SetShotsPerReloadOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsPerReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyShotsPerReload()" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyShotsPerReload()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Shots per reload", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the number of shots per reload.", + "fullName": "Set shots per reload (deprecated)", + "functionType": "Action", + "group": "Reload", + "name": "SetShotsPerReload", + "private": true, + "sentence": "Set the shots per reload of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetShotsPerReloadOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Shots per reload", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automatic reloading.", + "fullName": "Enable (or disable) automatic reloading", + "functionType": "Action", + "group": "Reload", + "name": "SetAutomaticReload", + "sentence": "Enable automatic reloading on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAutomaticReloading" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Enable automatic reloading", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the linear cooling rate (per second).", + "fullName": "Linear cooling rate", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "LinearCoolingRate", + "sentence": "the linear cooling rate", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLinearCoolingRate()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "LinearCoolingRate", + "name": "SetLinearCoolingRateOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyLinearCoolingRate" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Heat cooling rate (per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the linear rate of cooling.", + "fullName": "Set linear cooling rate (deprecated)", + "functionType": "Action", + "group": "Overheat", + "name": "SetLinearCoolingRate", + "private": true, + "sentence": "Set the linear cooling rate of _PARAM0_ to _PARAM2_ per second", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetLinearCoolingRateOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Heat cooling rate (per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the exponential cooling rate, per second.", + "fullName": "Exponential cooling rate", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "ExponentialCoolingRate", + "sentence": "the exponential cooling rate", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyExponentialCoolingRate()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ExponentialCoolingRate", + "name": "SetExponentialCoolingRateOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyExponentialCoolingRate" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Exponential cooling rate", + "name": "Value", + "supplementaryInformation": "[\"Exponential\",\"Linear\"]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the exponential rate of cooling.", + "fullName": "Set exponential cooling rate (deprecated)", + "functionType": "Action", + "group": "Overheat", + "name": "SetExponentialCoolingRate", + "private": true, + "sentence": "Set the exponential cooling rate of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetExponentialCoolingRateOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Exponential cooling rate", + "name": "Value", + "supplementaryInformation": "[\"Exponential\",\"Linear\"]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Increase ammo quantity.", + "fullName": "Increase ammo", + "functionType": "Action", + "name": "IncreaseAmmo", + "sentence": "Increase ammo of _PARAM0_ by _PARAM2_ shots", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "GetArgumentAsNumber(\"AmmoGained\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If Max Ammo is set, do not exceed the value", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyMaxAmmo" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::SetPropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::MaxAmmo(),Object.Behavior::AmmoQuantity())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::IsReloadNeeded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::ReloadAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "Ammo gained", + "name": "AmmoGained", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Layer that bullets are created on.", + "fullName": "Bullet layer", + "functionType": "StringExpression", + "group": "Multi-Fire", + "name": "BulletLayer", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyBulletLayer()" + ] + } + ] + } + ], + "expressionType": { + "type": "layer" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the heat level (range: 0 to 1).", + "fullName": "Heat level", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "HeatLevel", + "sentence": "the heat level", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "min(1,Object.Behavior::PropertyHeatLevel())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Total shots fired (multi-bullet shots are considered one shot).", + "fullName": "Shots fired", + "functionType": "Expression", + "group": "Stats", + "name": "TotalShotsFired", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTotalShotsFired()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Total bullets created.", + "fullName": "Bullets created", + "functionType": "Expression", + "group": "Stats", + "name": "TotalBulletsCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTotalBulletsCreated()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reloads completed.", + "fullName": "Reloads completed", + "functionType": "Expression", + "group": "Stats", + "name": "TotalReloadsCompleted", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTotalReloadsCompleted()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the remaining shots before the next reload is required.", + "fullName": "Shots before next reload", + "functionType": "ExpressionAndCondition", + "group": "Reload", + "name": "ShotsBeforeNextReload", + "sentence": "the remaining shots (before the next reload)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyShotsBeforeNextReload()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the remaining duration before the cooldown will permit a bullet to be fired, in seconds.", + "fullName": "Duration before cooldown end", + "functionType": "ExpressionAndCondition", + "group": "Firing", + "name": "CooldownTimeLeft", + "sentence": "the remaining duration before the cooldown end", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0,Object.Behavior::Cooldown() - Object.ObjectTimerElapsedTime(\"__FireBullet.FiringCooldown\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the remaining duration before the overheat penalty ends, in seconds.", + "fullName": "Duration before overheat end", + "functionType": "ExpressionAndCondition", + "group": "Overheat", + "name": "OverheatTimeLeft", + "sentence": "the remaining duration before the overheat end", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__FireBullet.OverheatDuration\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, Object.Behavior::PropertyOverheatDuration() - Object.ObjectTimerElapsedTime(\"__FireBullet.OverheatDuration\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object is currently performing an ammo reload.", + "fullName": "Is ammo reloading in progress", + "functionType": "Condition", + "group": "Reload", + "name": "IsReloadInProgress", + "sentence": "_PARAM0_ is reloading ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object is ready to shoot.", + "fullName": "Is ready to shoot", + "functionType": "Condition", + "group": "Firing", + "name": "IsReadyToShoot", + "sentence": "_PARAM0_ is ready to shoot", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyHasJustFired" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOutOfAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadNeeded" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsReloadInProgress" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsFiringCooldownActive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsOverheated" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if automatic reloading is enabled.", + "fullName": "Is automatic reloading enabled", + "functionType": "Condition", + "group": "Reload", + "name": "IsAutomaticReloadingEnabled", + "sentence": "Automatic reloading is enabled on_PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyAutomaticReloading" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if ammo is unlimited.", + "fullName": "Is ammo unlimited", + "functionType": "Condition", + "group": "Ammo", + "name": "IsUnlimitedAmmo", + "sentence": "_PARAM0_ has unlimited ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object has no ammo available.", + "fullName": "Is out of ammo", + "functionType": "Condition", + "group": "Ammo", + "name": "IsOutOfAmmo", + "sentence": "_PARAM0_ is out of ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FireBullet::FireBullet::IsUnlimitedAmmo" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::PropertyAmmoQuantity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object needs to reload ammo.", + "fullName": "Is a reload needed", + "functionType": "Condition", + "group": "Reload", + "name": "IsReloadNeeded", + "sentence": "_PARAM0_ needs to reload ammo", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shots per reload must not be \"0\"", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyShotsPerReload" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::PropertyShotsBeforeNextReload" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if object is overheated.", + "fullName": "Is overheated", + "functionType": "Condition", + "group": "Overheat", + "name": "IsOverheated", + "sentence": "_PARAM0_ is overheated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "FireBullet::FireBullet::PropertyHeatLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "1" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::OverheatTimeLeft()", + ">", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if firing cooldown is active.", + "fullName": "Is firing cooldown active", + "functionType": "Condition", + "group": "Firing", + "name": "IsFiringCooldownActive", + "sentence": "Firing cooldown is active on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CooldownTimeLeft()", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Firing cooldown", + "description": "Objects cannot shoot while firing cooldown is active", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FireCooldown" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HasJustFired" + }, + { + "value": "45", + "type": "Number", + "unit": "DegreeAngle", + "label": "Firing arc", + "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", + "group": "Multi-Fire", + "extraInformation": [], + "hidden": false, + "name": "FiringArc" + }, + { + "value": "1", + "type": "Number", + "label": "Number of bullets created at once (Multi-Fire)", + "description": "Multi-Fire bullets will be evenly spaced inside the firing arc", + "group": "Multi-Fire", + "extraInformation": [], + "hidden": false, + "name": "BulletQuantity" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Angle variance", + "description": "Make imperfect aim (Range: 0 to 180 degrees)", + "group": "Firing variance", + "extraInformation": [], + "hidden": false, + "name": "AngleVariance" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate bullets to match their trajectory", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RotateBullet" + }, + { + "value": "0", + "type": "Number", + "label": "Ammo quantity (current)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "AmmoQuantity" + }, + { + "value": "0", + "type": "Number", + "label": "Shots per reload ", + "description": "Use 0 to disable reloading", + "group": "Reload", + "extraInformation": [], + "hidden": false, + "name": "ShotsPerReload" + }, + { + "value": "1", + "type": "Number", + "unit": "Second", + "label": "Reloading duration", + "description": "Objects cannot shoot while reloading is in progress", + "group": "Reload", + "extraInformation": [], + "hidden": false, + "name": "ReloadDuration" + }, + { + "value": "0", + "type": "Number", + "label": "Max ammo ", + "description": "", + "group": "Ammo", + "extraInformation": [], + "hidden": false, + "name": "MaxAmmo" + }, + { + "value": "0", + "type": "Number", + "label": "Shots before next reload", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShotsBeforeNextReload" + }, + { + "value": "0", + "type": "Number", + "label": "Total shots fired", + "description": "Regardless of how many bullets are created, only 1 shot will be counted per frame", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TotalShotsFired" + }, + { + "value": "0", + "type": "Number", + "label": "Total bullets created", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TotalBulletsCreated" + }, + { + "value": "0", + "type": "Number", + "label": "Starting ammo", + "description": "", + "group": "Ammo", + "extraInformation": [], + "hidden": false, + "name": "StartingAmmo" + }, + { + "value": "0", + "type": "Number", + "label": "Total reloads completed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TotalReloadsCompleted" + }, + { + "value": "true", + "type": "Boolean", + "label": "Unlimited ammo", + "description": "", + "group": "Ammo", + "extraInformation": [], + "hidden": false, + "name": "UnlimitedAmmo" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ReloadInProgress" + }, + { + "value": "0", + "type": "Number", + "label": "Heat increase per shot (Range: 0 to 1)", + "description": " Object is overheated when Heat reaches 1", + "group": "Overheat", + "extraInformation": [], + "hidden": false, + "name": "HeatIncreasePerShot" + }, + { + "value": "0", + "type": "Number", + "label": "Heat level (Range: 0 to 1)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HeatLevel" + }, + { + "value": "true", + "type": "Boolean", + "label": "Reload automatically", + "description": "", + "group": "Reload", + "extraInformation": [], + "hidden": false, + "name": "AutomaticReloading" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Overheat duration", + "description": "Object cannot shoot while overheat duration is active", + "group": "Overheat", + "extraInformation": [], + "hidden": false, + "name": "OverheatDuration" + }, + { + "value": "0.1", + "type": "Number", + "label": "Linear cooling rate (per second)", + "description": "", + "group": "Overheat", + "extraInformation": [], + "hidden": false, + "name": "LinearCoolingRate" + }, + { + "value": "0.3", + "type": "Number", + "label": "Exponential cooling rate (per second)", + "description": "Happens faster when heat is high and slower when heat is low", + "group": "Overheat", + "extraInformation": [ + "Linear", + "Exponential" + ], + "hidden": false, + "name": "ExponentialCoolingRate" + }, + { + "value": "", + "type": "String", + "label": "Layer the bullets are created on", + "description": "Base layer by default", + "group": "Shooting configuration", + "extraInformation": [], + "hidden": true, + "name": "BulletLayer" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "RandomizedAngle" + }, + { + "value": "0", + "type": "Number", + "unit": "PixelSpeed", + "label": "Bullet speed variance", + "description": "Bullet speed will be adjusted by a random value within this range", + "group": "Firing variance", + "extraInformation": [], + "hidden": false, + "name": "BulletSpeedVariance" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "D8H", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Turret movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI4LDMxSDR2LTJjMC0xLjEsMC45LTIsMi0yaDIwYzEuMSwwLDIsMC45LDIsMlYzMXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02LDI3YzAtNS41LDQuNS0xMCwxMC0xMHMxMCw0LjUsMTAsMTAiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xNCwxN1YzYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYxNCIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjE0IiB5MT0iMTQiIHgyPSIxOCIgeTI9IjE0Ii8+DQo8L3N2Zz4NCg==", + "name": "Turret", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Cleaning/Cleaning_cleaning_clean_plunger.svg", + "shortDescription": "A turret movement with customizable speed, acceleration and stop angles.", + "version": "1.1.0", + "description": [ + "With this behavior, you can make an object rotate like a turret toward a position.", + "It may be used with the **Bullet** extension to fire objects." + ], + "origin": { + "identifier": "Turret", + "name": "gdevelop-extension-store" + }, + "tags": [ + "turret", + "movement", + "rotation", + "rotate", + "pivot", + "axis", + "aim", + "shoot", + "bullet", + "tank", + "tower" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "A turret movement with customizable speed, acceleration and stop angles.", + "fullName": "Turret movement", + "name": "Turret", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Deceleration", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Turret::Turret::PropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Turret::Turret::PropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "Turret::Turret::PropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "Turret::Turret::PropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "Object.Behavior::PropertyDeceleration() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyDeceleration() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Acceleration", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "Turret::Turret::PropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyAcceleration() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertySpeedMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertySpeedMax()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "Turret::Turret::PropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "Object.Behavior::PropertyAcceleration() * TimeDelta()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "- Object.Behavior::PropertySpeedMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "- Object.Behavior::PropertySpeedMax()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Angle", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyAimingAngle() + Object.Behavior::PropertySpeed() * TimeDelta()", + "Object.Variable(turret_Speed) * TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyHasMoved" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyHasMoved" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls Reset", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + }, + { + "type": { + "value": "Turret::Turret::SetPropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the turret is moving.", + "fullName": "Is moving", + "functionType": "Condition", + "name": "IsMoving", + "sentence": "_PARAM0_ is moving", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyHasMoved" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move clockwise.", + "fullName": "Move clockwise", + "functionType": "Action", + "name": "MoveClockwise", + "sentence": "Move _PARAM0_ clockwise", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyMustMoveClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move counter-clockwise.", + "fullName": "Move counter-clockwise", + "functionType": "Action", + "name": "MoveCounterClockwise", + "sentence": "Move _PARAM0_ counter-clockwise", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyMustMoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "(Object.Behavior::PropertyAngleMin() + Object.Behavior::PropertyAngleMax()) / 2", + "(mod(Object.Behavior::PropertyAngleMin(), 360) + mod(Object.Behavior::PropertyAngleMax(), 360)) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Origin angle is the farest angle from AngleMin and AngleMax, it's used by MoveToward", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyOriginAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(Object.Behavior::PropertyAngleMin() + Object.Behavior::PropertyAngleMax()) / 2 - 180" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Set angle toward a position.", + "fullName": "Set aiming angle toward a position", + "functionType": "Action", + "name": "SetAimingAngleToward", + "sentence": "Set the aiming angle of _PARAM0_ toward _PARAM2_;_PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()", + "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + }, + { + "description": "X position", + "name": "TargetX", + "type": "expression" + }, + { + "description": "Y position", + "name": "TargetY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Move toward a position.", + "fullName": "Move toward a position", + "functionType": "Action", + "name": "MoveToward", + "sentence": "Move _PARAM0_ toward _PARAM2_; _PARAM3_ within a _PARAM4_° margin", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyTargetAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "There is stop angles", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyAngleMin()", + "<", + "Object.Behavior::PropertyAngleMax()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyTargetAngle() + GetArgumentAsNumber(\"AngleMargin\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTargetAngle() - GetArgumentAsNumber(\"AngleMargin\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "No stop angle, the direction is chosen according to the shortest path (never more that 180°)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyAngleMin()", + "=", + "Object.Behavior::PropertyAngleMax()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(180 + Object.Behavior::PropertyTargetAngle() - Object.Behavior::PropertyAimingAngle(), 360)", + "<", + "180 - GetArgumentAsNumber(\"AngleMargin\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(180 + Object.Behavior::PropertyAimingAngle() - Object.Behavior::PropertyTargetAngle(), 360)", + "<", + "180 - GetArgumentAsNumber(\"AngleMargin\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + }, + { + "description": "X position", + "name": "TargetX", + "type": "expression" + }, + { + "description": "Y position", + "name": "TargetY", + "type": "expression" + }, + { + "description": "Angle margin", + "name": "AngleMargin", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the aiming angle.", + "fullName": "Aiming angle", + "functionType": "Action", + "name": "SetAimingAngle", + "sentence": "Change the aiming angle of _PARAM0_ to _PARAM2_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"AimingAngle\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use mod to avoid the angle value to be too large.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyAngleMin()", + "=", + "Object.Behavior::PropertyAngleMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(Object.Behavior::PropertyAimingAngle(), 360)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "There are stop angles, the angle is bounded by these.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyAngleMin()", + "<", + "Object.Behavior::PropertyAngleMax()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyAngleMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyAngleMax()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyAngleMin()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetPropertyAimingAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyAngleMin()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::PropertyRotate" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyAimingAngle()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + }, + { + "description": "Aiming angle", + "name": "AimingAngle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Aiming angle (between 0° and 360° if no stop angle are set).", + "fullName": "Aiming angle", + "functionType": "Expression", + "name": "AimingAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyAimingAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Turret::Turret", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "360", + "type": "Number", + "label": "Maximum rotation speed (in degrees per second)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "SpeedMax" + }, + { + "value": "1440", + "type": "Number", + "label": "Acceleration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Acceleration" + }, + { + "value": "36000", + "type": "Number", + "label": "Deceleration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Deceleration" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rotate the object", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Rotate" + }, + { + "value": "0", + "type": "Number", + "label": "Maximum angle (use the same value for min and max to set no constraint)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "AngleMax" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum angle (use the same value for min and max to set no constraint)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "AngleMin" + }, + { + "value": "0", + "type": "Number", + "label": "Aiming angle property", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "AimingAngle" + }, + { + "value": "", + "type": "Number", + "label": "Speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Speed" + }, + { + "value": "", + "type": "Boolean", + "label": "Must move clockwise", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MustMoveClockwise" + }, + { + "value": "", + "type": "Boolean", + "label": "Must move counter-clockwise", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MustMoveCounterClockwise" + }, + { + "value": "", + "type": "Boolean", + "label": "Has moved", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HasMoved" + }, + { + "value": "", + "type": "Number", + "label": "Target angle (MoveToward)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetAngle" + }, + { + "value": "", + "type": "Number", + "label": "Origin angle: the farest angle from AngleMin and AngleMax", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OriginAngle" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file From 2f8b5eb6a4f5cea8cf576afd2df39bcc7020bb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 15 Apr 2023 22:50:44 +0200 Subject: [PATCH 002/114] WIP: insertion --- examples/smoothy/smoothy.json | 1697 ++++++++++++++++++++++++++------- 1 file changed, 1330 insertions(+), 367 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 5abe4fe28..f09328437 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -212,7 +212,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.8086342783490695, + "zoomFactor": 0.6627256836254674, "windowMask": false }, "objectsGroups": [ @@ -243,7 +243,7 @@ "name": "BoardBubble" }, { - "name": "LinkBubble" + "name": "StartLocation" } ] } @@ -370,45 +370,30 @@ }, { "angle": 0, - "customSize": true, - "height": 520, - "layer": "Borders", - "name": "SideBorder", - "persistentUuid": "3f9c5de6-7866-48f6-999c-8f40039a2863", - "width": 64, - "x": 272, - "y": -20, - "zOrder": 70, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 520, - "layer": "Borders", - "name": "SideBorder", - "persistentUuid": "3be23a1e-eb82-4a53-9d62-040fda58ac39", - "width": 64, - "x": -64, - "y": -19, - "zOrder": 70, + "customSize": false, + "height": 0, + "layer": "", + "name": "GutterPainter", + "persistentUuid": "f0753a74-8af3-4f34-8e31-ca589091383d", + "width": 0, + "x": 16, + "y": -56, + "zOrder": 91, "numberProperties": [], "stringProperties": [], "initialVariables": [] }, { "angle": 0, - "customSize": true, - "height": 64, - "layer": "Borders", - "name": "TopBorder", - "persistentUuid": "ffc2cc08-315e-4def-8410-0466893b8960", - "width": 304, + "customSize": false, + "height": 0, + "layer": "", + "name": "StartLocation", + "persistentUuid": "976a4fbe-d37a-49fc-8791-4d0d6ad9e23b", + "width": 0, "x": -16, - "y": -64, - "zOrder": 90, + "y": 233, + "zOrder": 93, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -419,11 +404,11 @@ "height": 0, "layer": "", "name": "Gutter", - "persistentUuid": "f0753a74-8af3-4f34-8e31-ca589091383d", + "persistentUuid": "d8afc19a-9ff4-43ab-8fea-c48497dbcc65", "width": 0, - "x": 16, - "y": -56, - "zOrder": 91, + "x": -112, + "y": -72, + "zOrder": 94, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -433,12 +418,12 @@ "customSize": false, "height": 0, "layer": "", - "name": "BoardBubble", - "persistentUuid": "caed0356-7c01-47a8-9b13-caed8e249e9e", + "name": "BubbleQueue", + "persistentUuid": "105cd689-5e24-4b05-86ac-f97e82b6cc75", "width": 0, - "x": -16, - "y": 233, - "zOrder": 92, + "x": -112, + "y": 20, + "zOrder": 95, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -1259,13 +1244,44 @@ }, { "assetStoreId": "", - "name": "LinkBubble", + "name": "StartLocation", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": true, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], "animations": [ { "name": "Green", @@ -1588,9 +1604,9 @@ "effects": [], "behaviors": [ { - "extraBorder": 32, "name": "DestroyOutside", - "type": "DestroyOutsideBehavior::DestroyOutside" + "type": "DestroyOutsideBehavior::DestroyOutside", + "extraBorder": 32 } ], "animations": [ @@ -1918,7 +1934,7 @@ }, { "assetStoreId": "", - "name": "FallingBubble", + "name": "InsertedBubble", "tags": "", "type": "Sprite", "updateIfNotVisible": false, @@ -1926,9 +1942,30 @@ "effects": [], "behaviors": [ { - "name": "DestroyOutside", - "type": "DestroyOutsideBehavior::DestroyOutside", - "extraBorder": 32 + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": true, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" } ], "animations": [ @@ -2081,13 +2118,18 @@ }, { "assetStoreId": "", - "name": "SideBorder", + "name": "Gutter", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + } + ], "animations": [ { "name": "NewObject", @@ -2122,13 +2164,18 @@ }, { "assetStoreId": "", - "name": "TopBorder", + "name": "BubbleQueue", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + } + ], "animations": [ { "name": "NewObject", @@ -2163,7 +2210,7 @@ }, { "assetStoreId": "", - "name": "Gutter", + "name": "GutterPainter", "tags": "", "type": "PrimitiveDrawing::Drawer", "variables": [], @@ -2193,7 +2240,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Level Link Graph", + "name": "", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2247,7 +2294,7 @@ "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "BoardBubble", + "StartLocation", "SpeedPathMovement", "\"Gutter\"", "1", @@ -2260,201 +2307,613 @@ "value": "CurvedMovement::SpeedPathMovement::DrawDebug" }, "parameters": [ - "BoardBubble", + "StartLocation", "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ "Gutter", + "ObjectStack", + "BubbleQueue", "" ] } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "levelCompled", - "" - ] - } - ], - "actions": [], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Controls", - "source": "", - "type": "BuiltinCommonInstructions::Group", + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Left" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Turret::Turret::MoveCounterClockwise" + "value": "ModVarScene" }, "parameters": [ - "Launcher", - "Turret", - "" + "index", + "=", + "0" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ { "type": { - "value": "KeyPressed" + "value": "Create" }, "parameters": [ "", - "Right" + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Turret::Turret::MoveClockwise" + "value": "Create" }, "parameters": [ - "Launcher", - "Turret", + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "inverted": true, - "value": "CursorMovement::CursorStayStill" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "", + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", "1", + "", "" ] }, { "type": { - "inverted": true, - "value": "KeyPressed" + "value": "ChangeAnimation" }, "parameters": [ - "", - "Left" + "BoardBubble", + "=", + "Variable(index)" ] }, { "type": { - "inverted": true, - "value": "KeyPressed" + "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ - "", - "Right" + "StartLocation", + "ObjectStack", + "BoardBubble", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Turret::Turret::MoveToward" + "value": "ModVarScene" }, "parameters": [ - "Launcher", - "Turret", - "MouseX(\"\", 0)", - "MouseY(\"\", 0)", - "3", - "" + "index", + "+", + "1" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Turret::Turret::IsMoving" + "value": "Create" }, "parameters": [ - "Launcher", - "Turret", + "", + "InsertedBubble", + "StartLocation.X()", + "StartLocation.Y()", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "MettreAutour" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" + "InsertedBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance.", + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Spawn bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "ObjectStack" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "CurvedMovement::SpeedPathMovement::CheckPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubblePathPosition) - 32", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "50", + "100", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "levelCompled", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveCounterClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CursorMovement::CursorStayStill" + }, + "parameters": [ + "", + "1", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveToward" + }, + "parameters": [ + "Launcher", + "Turret", + "MouseX(\"\", 0)", + "MouseY(\"\", 0)", + "3", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::IsMoving" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance.", "comment2": "" }, { @@ -2462,36 +2921,582 @@ "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngleToward" + }, + "parameters": [ + "Launcher", + "Turret", + "MouseX(\"\", 0)", + "MouseY(\"\", 0)", + "3" + ] + }, + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "LShift" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "AimingBubble", + "FireBullet", + "AimingBubble.X()", + "AimingBubble.Y()", + "MovingBubble", + "Launcher.Turret::AimingAngle()", + "300", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Insert bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "", + "", + "yes" + ] + } + ], + "actions": [ + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "InsertedBubble", + "MovingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "InsertedBubble", + "IsInserting", + "True" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "InitialDeltaX", + "=", + "MovingBubble.X() - BoardBubble.X()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "InitialDeltaY", + "=", + "MovingBubble.Y() - BoardBubble.Y()" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MovingBubble", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "InsertedBubble", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "QueueIndex", + "=", + "Gutter.ObjectStack::HeightOf(BubbleQueue)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LinkedObjects::RemoveAllLinksOf" + }, + "parameters": [ + "", + "InsertedBubble" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "InsertedBubble", + "IsInserting", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "<", + "32" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "PreviousFreedDistance", + "=", + "InsertedBubble.Variable(FreedDistance)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "=", + "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 2, 32)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "InsertedBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "InsertedBubble", + "SpeedPathMovement", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", + "" + ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "InsertedBubble", + "=", + "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", + "=", + "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "InsertedBubble.Variable(BubbleIndex) - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "+", + "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", + "", + "" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "=", + "32" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", - "Left" + "BoardBubble", + "InsertedBubble", + "" ] } ], "actions": [ { "type": { - "value": "Turret::Turret::SetAimingAngleToward" + "value": "ModVarObjet" }, "parameters": [ - "Launcher", - "Turret", - "MouseX(\"\", 0)", - "MouseY(\"\", 0)", - "3" + "InsertedBubble", + "PositionOnPath", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" ] }, { "type": { - "value": "MettreAutour" + "value": "ModVarObjet" }, "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" + "InsertedBubble", + "Speed", + "=", + "BoardBubble.SpeedPathMovement::Speed() + 32" ] } ] @@ -2501,54 +3506,43 @@ "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "ObjectStack::ContainsBetween" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "LShift" - ] - }, - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - } + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "InsertedBubble.Variable(QueueIndex)", + "InsertedBubble.Variable(QueueIndex)", + "" ] } ], "actions": [ { "type": { - "value": "FireBullet::FireBullet::Fire" + "value": "Create" }, "parameters": [ - "AimingBubble", - "FireBullet", - "AimingBubble.X()", - "AimingBubble.Y()", - "MovingBubble", - "Launcher.Turret::AimingAngle()", - "300", + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", "" ] }, { "type": { - "value": "SetAnimationName" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" ] }, { @@ -2556,125 +3550,68 @@ "value": "SetAnimationName" }, "parameters": [ - "AimingBubble", - "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + "BoardBubble", + "InsertedBubble.AnimationName()" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "AimingBubble", - "BoardBubble", - "", - "", - "yes" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Game\"", - "" - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(PositionOnPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "InsertedBubble.Variable(BubbleIndex) - 1", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "InsertedBubble", + "IsInserting", + "False" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "InsertedBubble" ] } ] } ] } - ], - "parameters": [] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Moving Bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The mustGlue variable avoid to have the BoardBuble from the collision in the context because otherwise it will change color too.", - "comment2": "" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "MovingBubble", - "BoardBubble", - "", - "", - "yes" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "Arreter" - }, - "parameters": [ - "MovingBubble" - ] - }, - { - "type": { - "value": "SeparateFromObjects" - }, - "parameters": [ - "MovingBubble", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "MovingBubble", - "mustGlue", - "True" - ] - } ] } ], @@ -2689,7 +3626,7 @@ "followBaseLayerCamera": false, "isLightingLayer": false, "name": "Borders", - "visibility": false, + "visibility": true, "cameras": [], "effects": [] }, @@ -2721,6 +3658,10 @@ "name": "FireBullet", "type": "FireBullet::FireBullet" }, + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" @@ -2865,7 +3806,7 @@ "dependencies": [], "eventsFunctions": [ { - "description": "Check if the stack contains the object between a range.", + "description": "Check if the stack contains the object between a range. The lower and upper bounds are included.", "fullName": "Contain between a range", "functionType": "Condition", "name": "ContainsBetween", @@ -3224,7 +4165,7 @@ "/** @type {Map */", "const objectSet = behavior.objectSet;", "if (height < 0 || height > stack.length) {", - " log.error(`Tried to insert in the stack at ${height} where the stack is ${stack.length} height.`);", + " console.error(`Tried to insert in the stack at ${height} where the stack is ${stack.length} height.`);", " return;", "}", "for (const element of elements) {", @@ -3397,7 +4338,7 @@ " /** @type {Map */", " const objectSet = behavior.objectSet;", " if (insertHeight < 0 || insertHeight > stack.length) {", - " log.error(`Tried to insert in the stack at ${insertHeight} where the stack is ${stack.length} height.`);", + " console.error(`Tried to insert in the stack at ${insertHeight} where the stack is ${stack.length} height.`);", " return;", " }", " upperBound = Math.min(upperBound, otherStack.length - 1);", @@ -9882,34 +10823,56 @@ "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } + "parameters": [ + "Object", + "Behavior", + "!=", + "0" ] - }, + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { "value": "BuiltinCommonInstructions::Or" From 3e292c6a773ca8aac263ca6d385cb0a6785cfafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 00:49:05 +0200 Subject: [PATCH 003/114] Fix insertion. --- examples/smoothy/smoothy.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f09328437..aeefa21d0 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3586,7 +3586,7 @@ "BubbleQueue", "ObjectStack", "BoardBubble", - "InsertedBubble.Variable(BubbleIndex) - 1", + "InsertedBubble.Variable(BubbleIndex)", "" ] }, @@ -3625,6 +3625,7 @@ "ambientLightColorR": 167801445, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Borders", "visibility": true, "cameras": [], @@ -3636,6 +3637,7 @@ "ambientLightColorR": 32, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", "visibility": true, "cameras": [ From 1575f1243274d930e8f0911755117909327dd847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 01:56:04 +0200 Subject: [PATCH 004/114] Match and split. --- examples/smoothy/assets/NewSprite.png | Bin 0 -> 202 bytes examples/smoothy/smoothy.json | 602 ++++++++++++++++++++++++-- 2 files changed, 554 insertions(+), 48 deletions(-) create mode 100644 examples/smoothy/assets/NewSprite.png diff --git a/examples/smoothy/assets/NewSprite.png b/examples/smoothy/assets/NewSprite.png new file mode 100644 index 0000000000000000000000000000000000000000..5f70b8a64765bccaedde116b093d2c9bed3f8539 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|T0C7GLn`9l zUS||!P~c%UTqZ1AaY&Wpr^3SHvtHlXe4lH-V1xVvmJ){@%+rOIFtBPkFmkmBA5dU3 z>~Q316EtWu0MbbU%@RE74N!)10xwA52vCiL9|M%(c0dXw08(r)hXKmyX)x_LXw@u# YwQe4x{JdqKfbL=NboFyt=akR{0Ef3Z^Z)<= literal 0 HcmV?d00001 diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index aeefa21d0..3361c2e6a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -178,6 +178,15 @@ "name": "Cross.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "NewSprite", + "smoothed": true, + "userAdded": true } ], "resourceFolders": [] @@ -427,6 +436,21 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "BubbleClipboard", + "persistentUuid": "558430dc-2ac8-4bd3-87b8-de53fbb4e056", + "width": 0, + "x": -208, + "y": -28, + "zOrder": 96, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -2232,6 +2256,53 @@ "absoluteCoordinates": true, "clearBetweenFrames": false, "antialiasing": "none" + }, + { + "assetStoreId": "", + "name": "BubbleClipboard", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "NewSprite", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] } ], "events": [ @@ -3496,7 +3567,7 @@ "InsertedBubble", "Speed", "=", - "BoardBubble.SpeedPathMovement::Speed() + 32" + "BoardBubble.SpeedPathMovement::Speed()" ] } ] @@ -3519,93 +3590,528 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(PositionOnPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "InsertedBubble.Variable(BubbleIndex)", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "InsertedBubble", + "IsInserting", + "False" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "InsertedBubble" + ] + } ] }, { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Match bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "=", + "InsertedBubble.Variable(BubbleIndex)" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "=", + "InsertedBubble.Variable(BubbleIndex)" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "BoardBubble", + ">=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "0", + "Variable(lowerIndex) -1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleClipboard", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetAnimationName" + "inverted": true, + "value": "ObjectStack::ObjectStack::IsEmpty" }, "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" + "BubbleClipboard", + "ObjectStack", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + "value": "Create" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(PositionOnPath)", + "", + "BubbleQueue", + "-64", + "-64", "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ObjectStack::ObjectStack::Insert" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(Speed)", + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", "" ] }, { "type": { - "value": "ObjectStack::ObjectStack::Insert" + "value": "ObjectStack::ObjectStack::MoveInto" }, "parameters": [ "BubbleQueue", "ObjectStack", - "BoardBubble", - "InsertedBubble.Variable(BubbleIndex)", + "0", + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleClipboard.ObjectStack::Height() - 1", "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "ObjectStack::ObjectStack::IsEmpty" }, "parameters": [ - "InsertedBubble", - "IsInserting", - "False" + "BubbleQueue", + "ObjectStack", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "Cache" + "value": "Delete" }, "parameters": [ - "InsertedBubble" + "BubbleQueue", + "" ] } ] From bded83af8f10bb03d47e586f33b67e0fa1b68162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 13:49:19 +0200 Subject: [PATCH 005/114] Merging --- examples/smoothy/smoothy.json | 1573 +++++++++++++++++---------------- 1 file changed, 822 insertions(+), 751 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 3361c2e6a..036cb7fb5 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -456,13 +456,40 @@ "objects": [ { "assetStoreId": "", - "name": "YellowBubble", + "name": "BoardBubble", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": false, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], "animations": [ { "name": "Yellow", @@ -473,40 +500,9 @@ "timeBetweenFrames": 0.08, "sprites": [ { - "hasCustomCollisionMask": false, + "hasCustomCollisionMask": true, "image": "YellowBubble.png", - "points": [ - { - "name": "Right", - "x": 47, - "y": 15 - }, - { - "name": "Left", - "x": -16, - "y": 15 - }, - { - "name": "UpRight", - "x": -1, - "y": -12 - }, - { - "name": "UpLeft", - "x": 31, - "y": -12 - }, - { - "name": "DownRight", - "x": -1, - "y": 43 - }, - { - "name": "DownLeft", - "x": 31, - "y": 43 - } - ], + "points": [], "originPoint": { "name": "origine", "x": 15, @@ -518,26 +514,49 @@ "x": 0, "y": 0 }, - "customCollisionMask": [] + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] } ] } ] - } - ] - }, - { - "assetStoreId": "", - "name": "GreenBubble", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + }, { - "name": "Green", + "name": "Blue", "useMultipleDirections": false, "directions": [ { @@ -545,40 +564,9 @@ "timeBetweenFrames": 0.08, "sprites": [ { - "hasCustomCollisionMask": false, - "image": "GreenBubble.png", - "points": [ - { - "name": "Right", - "x": 47, - "y": 15 - }, - { - "name": "Left", - "x": -16, - "y": 15 - }, - { - "name": "UpRight", - "x": -1, - "y": -12 - }, - { - "name": "UpLeft", - "x": 31, - "y": -12 - }, - { - "name": "DownRight", - "x": -1, - "y": 43 - }, - { - "name": "DownLeft", - "x": 31, - "y": 43 - } - ], + "hasCustomCollisionMask": true, + "image": "BlueBubble.png", + "points": [], "originPoint": { "name": "origine", "x": 15, @@ -590,26 +578,49 @@ "x": 0, "y": 0 }, - "customCollisionMask": [] + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] } ] } ] - } - ] - }, - { - "assetStoreId": "", - "name": "BlueBubble", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + }, { - "name": "Blue", + "name": "Green", "useMultipleDirections": false, "directions": [ { @@ -617,40 +628,9 @@ "timeBetweenFrames": 0.08, "sprites": [ { - "hasCustomCollisionMask": false, - "image": "BlueBubble.png", - "points": [ - { - "name": "Right", - "x": 47, - "y": 15 - }, - { - "name": "Left", - "x": -16, - "y": 15 - }, - { - "name": "TopRight", - "x": -1, - "y": -12 - }, - { - "name": "TopLeft", - "x": 31, - "y": -12 - }, - { - "name": "BottomRight", - "x": -1, - "y": 43 - }, - { - "name": "BottomLeft", - "x": 31, - "y": 43 - } - ], + "hasCustomCollisionMask": true, + "image": "GreenBubble.png", + "points": [], "originPoint": { "name": "origine", "x": 15, @@ -662,24 +642,47 @@ "x": 0, "y": 0 }, - "customCollisionMask": [] + "customCollisionMask": [ + [ + { + "x": 23.5, + "y": 6.5 + }, + { + "x": 28, + "y": 15 + }, + { + "x": 23.5, + "y": 23.5 + }, + { + "x": 15, + "y": 28 + }, + { + "x": 6.5, + "y": 23.5 + }, + { + "x": 2, + "y": 15 + }, + { + "x": 6.5, + "y": 6.5 + }, + { + "x": 15, + "y": 2 + } + ] + ] } ] } ] - } - ] - }, - { - "assetStoreId": "", - "name": "PurpuleBubble", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + }, { "name": "Purple", "useMultipleDirections": false, @@ -689,273 +692,9 @@ "timeBetweenFrames": 0.08, "sprites": [ { - "hasCustomCollisionMask": false, + "hasCustomCollisionMask": true, "image": "PurpuleBubble.png", - "points": [ - { - "name": "Right", - "x": 47, - "y": 15 - }, - { - "name": "Left", - "x": -16, - "y": 15 - }, - { - "name": "UpRight", - "x": -1, - "y": -12 - }, - { - "name": "UpLeft", - "x": 31, - "y": -12 - }, - { - "name": "DownRight", - "x": -1, - "y": 43 - }, - { - "name": "DownLeft", - "x": 31, - "y": 43 - } - ], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - { - "assetStoreId": "", - "name": "RedBubble", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Red", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "RedBubble.png", - "points": [ - { - "name": "Right", - "x": 47, - "y": 15 - }, - { - "name": "Left", - "x": -16, - "y": 15 - }, - { - "name": "UpRight", - "x": -1, - "y": -12 - }, - { - "name": "UpLeft", - "x": 31, - "y": -12 - }, - { - "name": "DownRight", - "x": -1, - "y": 43 - }, - { - "name": "DownLeft", - "x": 31, - "y": 43 - } - ], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - { - "assetStoreId": "", - "name": "Mark", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Cross-1", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.07999999821186066, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Cross.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - { - "assetStoreId": "", - "name": "Launcher", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Turret", - "type": "Turret::Turret", - "SpeedMax": 360, - "Acceleration": 1440, - "Deceleration": 36000, - "Property": false, - "AngleMin": 0, - "AngleMax": 0 - } - ], - "animations": [ - { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Launcher.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 75, - "y": 75 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - { - "assetStoreId": "", - "name": "BoardBubble", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "SpeedPathMovement", - "type": "CurvedMovement::SpeedPathMovement", - "Rotation": false, - "RotationOffset": 0, - "Speed": 0, - "PathOriginX": 0, - "PathOriginY": 0, - "PathName": "", - "TargetedSpeed": 0, - "Acceleration": 0, - "DrawingElementIndex": 0, - "X": 0, - "Y": 0, - "PathAngle": 0, - "PathScale": 0, - "RepetitionCount": 0, - "ShouldLoop": false, - "DrawingPathOriginX": 0, - "DrawingPathOriginY": 0, - "DebugLineStrokeWidth": 0, - "PreviousSpeed": 0, - "CurrentLength": 0, - "IsLookingBack": false, - "Viewpoint": "Top-Down" - } - ], - "animations": [ - { - "name": "Yellow", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "YellowBubble.png", - "points": [], + "points": [], "originPoint": { "name": "origine", "x": 15, @@ -1009,7 +748,7 @@ ] }, { - "name": "Blue", + "name": "Red", "useMultipleDirections": false, "directions": [ { @@ -1018,7 +757,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "BlueBubble.png", + "image": "RedBubble.png", "points": [], "originPoint": { "name": "origine", @@ -1071,242 +810,50 @@ ] } ] + } + ] + }, + { + "assetStoreId": "", + "name": "StartLocation", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" }, - { - "name": "Green", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "GreenBubble.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 23.5, - "y": 6.5 - }, - { - "x": 28, - "y": 15 - }, - { - "x": 23.5, - "y": 23.5 - }, - { - "x": 15, - "y": 28 - }, - { - "x": 6.5, - "y": 23.5 - }, - { - "x": 2, - "y": 15 - }, - { - "x": 6.5, - "y": 6.5 - }, - { - "x": 15, - "y": 2 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Purple", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "PurpuleBubble.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 23.5, - "y": 6.5 - }, - { - "x": 28, - "y": 15 - }, - { - "x": 23.5, - "y": 23.5 - }, - { - "x": 15, - "y": 28 - }, - { - "x": 6.5, - "y": 23.5 - }, - { - "x": 2, - "y": 15 - }, - { - "x": 6.5, - "y": 6.5 - }, - { - "x": 15, - "y": 2 - } - ] - ] - } - ] - } - ] - }, - { - "name": "Red", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "RedBubble.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 23.5, - "y": 6.5 - }, - { - "x": 28, - "y": 15 - }, - { - "x": 23.5, - "y": 23.5 - }, - { - "x": 15, - "y": 28 - }, - { - "x": 6.5, - "y": 23.5 - }, - { - "x": 2, - "y": 15 - }, - { - "x": 6.5, - "y": 6.5 - }, - { - "x": 15, - "y": 2 - } - ] - ] - } - ] - } - ] - } - ] - }, - { - "assetStoreId": "", - "name": "StartLocation", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ObjectStack", - "type": "ObjectStack::ObjectStack" - }, - { - "name": "SpeedPathMovement", - "type": "CurvedMovement::SpeedPathMovement", - "Rotation": true, - "RotationOffset": 0, - "Speed": 0, - "PathOriginX": 0, - "PathOriginY": 0, - "PathName": "", - "TargetedSpeed": 0, - "Acceleration": 0, - "DrawingElementIndex": 0, - "X": 0, - "Y": 0, - "PathAngle": 0, - "PathScale": 0, - "RepetitionCount": 0, - "ShouldLoop": false, - "DrawingPathOriginX": 0, - "DrawingPathOriginY": 0, - "DebugLineStrokeWidth": 0, - "PreviousSpeed": 0, - "CurrentLength": 0, - "IsLookingBack": false, - "Viewpoint": "Top-Down" - } - ], - "animations": [ + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": true, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], + "animations": [ { "name": "Green", "useMultipleDirections": false, @@ -2142,21 +1689,16 @@ }, { "assetStoreId": "", - "name": "Gutter", + "name": "Mark", "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ - { - "name": "ObjectStack", - "type": "ObjectStack::ObjectStack" - } - ], + "behaviors": [], "animations": [ { - "name": "NewObject", + "name": "Cross-1", "useMultipleDirections": false, "directions": [ { @@ -2165,12 +1707,12 @@ "sprites": [ { "hasCustomCollisionMask": false, - "image": "SideBorder.png", + "image": "Cross.png", "points": [], "originPoint": { "name": "origine", - "x": 0, - "y": 0 + "x": 15, + "y": 15 }, "centerPoint": { "automatic": true, @@ -2188,7 +1730,7 @@ }, { "assetStoreId": "", - "name": "BubbleQueue", + "name": "Launcher", "tags": "", "type": "Sprite", "updateIfNotVisible": false, @@ -2196,8 +1738,106 @@ "effects": [], "behaviors": [ { - "name": "ObjectStack", - "type": "ObjectStack::ObjectStack" + "name": "Turret", + "type": "Turret::Turret", + "SpeedMax": 360, + "Acceleration": 1440, + "Deceleration": 36000, + "Property": false, + "AngleMin": 0, + "AngleMax": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Launcher.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 75, + "y": 75 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Gutter", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + } + ], + "animations": [ + { + "name": "NewObject", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "SideBorder.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "BubbleQueue", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" } ], "animations": [ @@ -2633,12 +2273,12 @@ }, { "type": { - "inverted": true, - "value": "CurvedMovement::SpeedPathMovement::CheckPositionOnPath" + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" }, "parameters": [ "BoardBubble", "SpeedPathMovement", + ">=", "32", "" ] @@ -4063,43 +3703,344 @@ }, { "type": { - "value": "ObjectStack::ObjectStack::Insert" + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Merge queues", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Gutter.ObjectStack::Height() - 2", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + 32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Merge\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" }, "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "0", - "" + "", + "BoardBubble" ] }, { "type": { - "value": "ObjectStack::ObjectStack::MoveInto" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleClipboard.ObjectStack::Height() - 1", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" + "value": "ObjectStack::Contains" }, "parameters": [ + "", "BubbleQueue", "ObjectStack", + "BoardBubble", "" ] } @@ -4107,10 +4048,13 @@ "actions": [ { "type": { - "value": "Delete" + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ - "BubbleQueue", + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", "" ] } @@ -4131,7 +4075,6 @@ "ambientLightColorR": 167801445, "followBaseLayerCamera": false, "isLightingLayer": false, - "isLocked": false, "name": "Borders", "visibility": true, "cameras": [], @@ -4143,7 +4086,6 @@ "ambientLightColorR": 32, "followBaseLayerCamera": false, "isLightingLayer": false, - "isLocked": false, "name": "", "visibility": true, "cameras": [ @@ -4384,6 +4326,74 @@ ], "objectGroups": [] }, + { + "description": "Check if the stack contains the object at a height.", + "fullName": "Contain at", + "functionType": "Condition", + "name": "ContainsAt", + "sentence": "_PARAM3_ is into the stack of _PARAM1_ at _PARAM4_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const stackBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "/** @type {Hashtable} */", + "const stackObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");", + "/** @type {Hashtable} */", + "const elementObjectsLists = eventsFunctionContext.getObjectsLists(\"Element\");", + "", + "// This code is duplicated from ContainsBetween because the picking wouldn't pass from one function to the other.", + "const lowerBound = Math.max(0, eventsFunctionContext.getArgument(\"Height\"));", + "let upperBound = eventsFunctionContext.getArgument(\"Height\");", + "", + "eventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(", + " (stackObject, element, stackBehaviorName) => {", + " const behavior = stackObject.getBehavior(stackBehaviorName);", + " /** @type {gdjs.RuntimeObject[]} */", + " const stack = behavior.objectStack;", + " let found = false;", + " upperBound = Math.min(upperBound, stack.length - 1);", + " for (let i = lowerBound; i <= upperBound && !found; i++) {", + " found = stack[i] === element;", + " }", + " return found;", + " },", + " stackObjectsLists,", + " elementObjectsLists,", + " false,", + " stackBehaviorName", + ");" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Stack", + "name": "Object", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + }, + { + "description": "Height", + "name": "Height", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "Check if an object is on the stack top.", "fullName": "Stack top", @@ -4822,7 +4832,7 @@ "fullName": "Move into the stack", "functionType": "Action", "name": "MoveInto", - "sentence": "Move the object of the stack of _PARAM3_ from:_PARAM5_ to:_PARAM6_ into the stack of _PARAM0_ at height: _PARAM2_", + "sentence": "Move the objects of the stack of _PARAM3_ from:_PARAM5_ to:_PARAM6_ into the stack of _PARAM0_ at height: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -4910,6 +4920,66 @@ ], "objectGroups": [] }, + { + "description": "Move all the object from a stack into another.", + "fullName": "Move all into the stack", + "functionType": "Action", + "name": "MoveAllInto", + "sentence": "Move all the objects of the stack of _PARAM3_ into the stack of _PARAM0_ at height: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"Height\")", + "Stack", + "StackBehavior", + "0", + "Stack.StackBehavior::Height() - 1", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Height", + "name": "Height", + "type": "expression" + }, + { + "description": "Stack", + "name": "Stack", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "StackBehavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Shuffle the stack.", "fullName": "Shuffle", @@ -10890,6 +10960,60 @@ ], "objectGroups": [] }, + { + "description": "Check if the length from the trajectory origin is lesser than a value.", + "fullName": "Current length", + "functionType": "Condition", + "name": "CheckPositionOnPath", + "private": true, + "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PositionOnPath()", + "<", + "GetArgumentAsNumber(\"Length\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Length from the trajectory origin (in pixels)", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "Change the position of the object on the path.", "fullName": "Position on the path", @@ -11080,59 +11204,6 @@ ], "objectGroups": [] }, - { - "description": "Check if the length from the trajectory origin is lesser than a value.", - "fullName": "Current length", - "functionType": "Condition", - "name": "CheckPositionOnPath", - "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PositionOnPath()", - "<", - "GetArgumentAsNumber(\"Length\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Length from the trajectory origin (in pixels)", - "name": "Length", - "type": "expression" - } - ], - "objectGroups": [] - }, { "description": "Check if the object has reached the origin position of the path.", "fullName": "Reached path origin", From 60cb892b22ab0eb66b225c14d352b3419525b93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 17:36:22 +0200 Subject: [PATCH 006/114] Fix merging while inserting. --- examples/smoothy/smoothy.json | 1351 +++++++++++++++++---------------- 1 file changed, 683 insertions(+), 668 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 036cb7fb5..bf2eb0bf1 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2127,37 +2127,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "InsertedBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - } - ] } ] } @@ -2762,6 +2731,15 @@ "", "yes" ] + }, + { + "type": { + "value": "AjoutHasard" + }, + "parameters": [ + "", + "BoardBubble" + ] } ], "actions": [ @@ -2775,6 +2753,37 @@ "" ] }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MovingBubble", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "InsertedBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, { "type": { "value": "SetAnimationName" @@ -2784,6 +2793,19 @@ "MovingBubble.AnimationName()" ] }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "InsertedBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, { "type": { "value": "SetObjectVariableAsBoolean" @@ -2826,79 +2848,30 @@ "=", "MovingBubble.Y() - BoardBubble.Y()" ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "InsertedBubble", - "" - ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "InsertedBubble", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "ObjectVariableAsBoolean" }, "parameters": [ "InsertedBubble", - "QueueIndex", - "=", - "Gutter.ObjectStack::HeightOf(BubbleQueue)" + "IsInserting", + "True" ] } ], + "actions": [], "events": [ { "disabled": true, @@ -2910,209 +2883,76 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", + "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", "", "" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "LinkedObjects::RemoveAllLinksOf" - }, - "parameters": [ - "", - "InsertedBubble" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "InsertedBubble", - "IsInserting", - "True" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "InsertedBubble", - "FreedDistance", - "<", - "32" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "PreviousFreedDistance", - "=", - "InsertedBubble.Variable(FreedDistance)" - ] }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "FreedDistance", - "=", - "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 2, 32)" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" + "value": "VarObjet" }, "parameters": [ - "", - "BoardBubble", "InsertedBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" + "FreedDistance", + "<", + "32" ] } ], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + "value": "ModVarObjet" }, "parameters": [ "InsertedBubble", - "SpeedPathMovement", + "PreviousFreedDistance", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", - "" + "InsertedBubble.Variable(FreedDistance)" ] }, { "type": { - "value": "MettreXY" + "value": "ModVarObjet" }, "parameters": [ "InsertedBubble", + "FreedDistance", "=", - "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", - "=", - "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" + "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 2, 32)" ] } ], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ - "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", "", + "BoardBubble", + "InsertedBubble", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] }, { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "ObjectStack::Contains" }, "parameters": [ "", "BubbleQueue", "ObjectStack", "BoardBubble", - "0", - "InsertedBubble.Variable(BubbleIndex) - 1", "" ] } @@ -3123,12 +2963,24 @@ "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ - "BoardBubble", + "InsertedBubble", "SpeedPathMovement", - "+", - "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", "" ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "InsertedBubble", + "=", + "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", + "=", + "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" + ] } ], "events": [ @@ -3142,91 +2994,126 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", + "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "InsertedBubble.Variable(BubbleIndex) - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "+", + "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", "" ] } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", + "", + "" + ] + } + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "InsertedBubble", - "FreedDistance", - "=", - "32" - ] - } - ], - "actions": [], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "BoardBubble", - "InsertedBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "PositionOnPath", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "VarObjet" }, "parameters": [ "InsertedBubble", - "Speed", + "FreedDistance", "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "InsertedBubble.Variable(QueueIndex)", - "InsertedBubble.Variable(QueueIndex)", - "" + "32" ] } ], @@ -3234,106 +3121,128 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Create" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", + "InsertedBubble", "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" + "value": "ObjectStack::Contains" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", "" ] }, { "type": { - "value": "SetAnimationName" + "value": "ObjectStack::Contains" }, "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + "value": "ModVarObjet" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", + "InsertedBubble", + "PositionOnPath", "=", - "InsertedBubble.Variable(PositionOnPath)", - "" + "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ModVarObjet" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", + "InsertedBubble", + "Speed", "=", - "InsertedBubble.Variable(Speed)", - "" + "BoardBubble.SpeedPathMovement::Speed()" ] }, { "type": { - "value": "ObjectStack::ObjectStack::Insert" + "value": "ModVarObjet" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "InsertedBubble.Variable(BubbleIndex)", - "" + "InsertedBubble", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" ] }, { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "ModVarObjet" }, "parameters": [ "InsertedBubble", - "IsInserting", - "False" + "QueueIndex", + "=", + "Gutter.ObjectStack::HeightOf(BubbleQueue)" ] - }, + } + ], + "events": [ { - "type": { - "value": "Cache" - }, - "parameters": [ - "InsertedBubble" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", + "", + "" + ] + } ] } ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Match bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "InsertedBubble.Variable(QueueIndex)", + "InsertedBubble.Variable(QueueIndex)", + "" + ] + } + ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3341,425 +3250,531 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "Create" }, "parameters": [ - "lowerIndex", - "=", - "InsertedBubble.Variable(BubbleIndex)" + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" ] }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "foundOtherColor", - "False" + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + }, { "type": { - "value": "SceneVariableAsBoolean" + "value": "SetAnimationName" }, "parameters": [ - "foundOtherColor", - "" + "BoardBubble", + "InsertedBubble.AnimationName()" ] }, { "type": { - "value": "VarScene" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ - "lowerIndex", - ">", - "0" + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(PositionOnPath)", + "" ] - } - ], - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ - "lowerIndex", - "-", - "1" + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "InsertedBubble.Variable(BubbleIndex)", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "InsertedBubble", + "IsInserting", + "False" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "InsertedBubble", + "" ] } - ], + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Match bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "ModVarScene" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(lowerIndex)", - "" + "lowerIndex", + "=", + "InsertedBubble.Variable(BubbleIndex)" ] }, { "type": { - "inverted": true, - "value": "AnimationName" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" + "foundOtherColor", + "False" ] } - ], - "actions": [ + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SceneVariableAsBoolean" }, "parameters": [ "foundOtherColor", - "True" + "" ] }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ "lowerIndex", - "+", + "-", "1" ] } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "=", - "InsertedBubble.Variable(BubbleIndex)" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "" + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } ] }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "upperIndex", - "<", - "BubbleQueue.ObjectStack::Height() - 1" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "ModVarScene" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(upperIndex)", - "Variable(upperIndex)", - "" + "upperIndex", + "=", + "InsertedBubble.Variable(BubbleIndex)" ] }, { "type": { - "inverted": true, - "value": "AnimationName" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" + "foundOtherColor", + "False" ] } - ], - "actions": [ + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SceneVariableAsBoolean" }, "parameters": [ "foundOtherColor", - "True" + "" ] }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ "upperIndex", - "-", + "+", "1" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" + ] + } + ] + } ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(upperIndex)", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } ] }, { - "type": { - "value": "PickedInstancesCount" - }, - "parameters": [ - "BoardBubble", - ">=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "BoardBubble", + ">=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "0", + "Variable(lowerIndex) -1", + "" + ] + } ] }, { - "type": { - "value": "ObjectStack::ObjectStack::MoveInto" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "0", - "Variable(lowerIndex) -1", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleClipboard", - "ObjectStack", - "BoardBubble", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleClipboard", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] + "parameters": [] } - ], - "parameters": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BubbleQueue", - "-64", - "-64", - "" ] }, { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "0", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-64", + "-64", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" + ] + } ] }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Insert in Gutter\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } ] } ] From 760bdde61bc2ec634779dab48fe4193c81ec3661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 17:50:53 +0200 Subject: [PATCH 007/114] Reduce firing speed. --- examples/smoothy/smoothy.json | 127 ++++++++++++++++++++++++---------- 1 file changed, 90 insertions(+), 37 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index bf2eb0bf1..9edb8a5b9 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1013,7 +1013,7 @@ { "name": "FireBullet", "type": "FireBullet::FireBullet", - "FireCooldown": 0.1, + "FireCooldown": 0.35, "HasJustFired": false } ], @@ -2663,6 +2663,16 @@ ] } ] + }, + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" + }, + "parameters": [ + "AimingBubble", + "FireBullet", + "" + ] } ], "actions": [ @@ -2680,23 +2690,52 @@ "300", "" ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" - ] - }, + } + ], + "events": [ { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PosX" + }, + "parameters": [ + "MovingBubble", + "=", + "AimingBubble.X()" + ] + }, + { + "type": { + "value": "PosY" + }, + "parameters": [ + "MovingBubble", + "=", + "AimingBubble.Y()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + ] + } ] } ] @@ -2925,7 +2964,7 @@ "InsertedBubble", "FreedDistance", "=", - "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 2, 32)" + "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" ] } ], @@ -3738,15 +3777,23 @@ "ObjectStack", "" ] - }, + } + ], + "events": [ { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Insert in Gutter\"", - "", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" + ] + } ] } ] @@ -3922,19 +3969,25 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", - "", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "", + "" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ From 00113a61dda28fd4eee71d307ea7a20412d231fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 18:15:33 +0200 Subject: [PATCH 008/114] Generalize merging. --- examples/smoothy/smoothy.json | 476 ++++++++++++++++++++-------------- 1 file changed, 288 insertions(+), 188 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 9edb8a5b9..ed155121d 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2405,6 +2405,24 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Move\"", + "", + "" + ] + } + ] + } ] } ], @@ -3795,33 +3813,50 @@ ] } ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "parameters": [] } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - } + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" ] } ] @@ -3844,162 +3879,64 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ - "firstBubblePathPosition", + "queueIndex", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", - "", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", - "", - "" - ] - } + "Gutter.ObjectStack::Height() - 1" ] } ] }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Gutter.ObjectStack::Height() - 2", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" + "value": "VarScene" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" + "queueIndex", + ">", + "0" ] } ], + "conditions": [], "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + "value": "ObjectStack::ContainsAt" }, "parameters": [ + "", + "BubbleQueue", + "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "<=", - "Variable(firstBubblePathPosition) + 32", + "0", "" ] } @@ -4007,31 +3944,57 @@ "actions": [ { "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" + "value": "ModVarScene" }, "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "" + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] }, { "type": { - "value": "ObjectStack::ObjectStack::Remove" + "value": "ModVarScene" }, "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "" + "firstBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" + ] + } ] } ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4040,7 +4003,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Merge\"", + "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", "", "" ] @@ -4052,63 +4015,61 @@ "conditions": [ { "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", + "Variable(queueIndex) - 1", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" + "value": "ObjectStack::HasOnTop" }, "parameters": [ + "", "BubbleQueue", "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", + "BoardBubble", "" ] } ], + "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "AjoutObjConcern" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", "", - "BoardBubble" + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + 32", "" ] } @@ -4116,16 +4077,155 @@ "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ObjectStack::ObjectStack::MoveAllInto" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(firstBubbleSpeed)", + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", "" ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Merge\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", + "" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" ] } ] From 14d41f6011fc4fcb3fce25179374bd7dd322ceed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 18:43:41 +0200 Subject: [PATCH 009/114] Rewind --- examples/smoothy/smoothy.json | 317 ++++++++++++++++++++++++++++++++-- 1 file changed, 300 insertions(+), 17 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index ed155121d..2b288d623 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2127,6 +2127,81 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + } + ] } ] } @@ -3813,23 +3888,6 @@ ] } ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Combo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - } - ], - "parameters": [] } ] } @@ -4234,6 +4292,231 @@ } ], "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 2" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "queueIndex", + ">=", + "0" + ] + } + ], + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "firstBubbleColor", + "=", + "BoardBubble.AnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(firstBubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "-200", + "800", + "" + ] + } + ] + } + ], + "parameters": [] } ], "layers": [ From 91aeb371dcc6839d26787d92c1a9b683a7aeb912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 16 Apr 2023 19:56:29 +0200 Subject: [PATCH 010/114] Combo --- examples/smoothy/smoothy.json | 1163 ++++++++++++++++++++------------- 1 file changed, 719 insertions(+), 444 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 2b288d623..12f00cf6a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2133,6 +2133,16 @@ "repeatExpression": "5", "conditions": [], "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, { "type": { "value": "Create" @@ -2190,16 +2200,6 @@ "BoardBubble", "" ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "-", - "1" - ] } ] } @@ -2483,6 +2483,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3470,451 +3471,32 @@ ] } ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Match bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "=", - "InsertedBubble.Variable(BubbleIndex)" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "lowerIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "-", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(lowerIndex)", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "+", - "1" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "=", - "InsertedBubble.Variable(BubbleIndex)" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "upperIndex", - "<", - "BubbleQueue.ObjectStack::Height() - 1" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(upperIndex)", - "Variable(upperIndex)", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "-", - "1" - ] - } - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(upperIndex)", - "" - ] - }, - { - "type": { - "value": "PickedInstancesCount" - }, - "parameters": [ - "BoardBubble", - ">=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveInto" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "0", - "Variable(lowerIndex) -1", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleClipboard", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] - } - ], - "parameters": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "Create" + "value": "Smoothy::MatchBubbles" }, "parameters": [ "", - "BubbleQueue", - "-64", - "-64", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ "Gutter", "ObjectStack", - "BubbleQueue", - "0", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ "BubbleQueue", "ObjectStack", - "0", + "BoardBubble", + "SpeedPathMovement", + "InsertedBubble.Variable(QueueIndex)", + "InsertedBubble.Variable(BubbleIndex)", "BubbleClipboard", "ObjectStack", "" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Insert in Gutter\"", - "", - "" - ] - } - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" ] } ] @@ -4148,11 +3730,9 @@ }, { "type": { - "value": "ObjectStack::ObjectStack::Remove" + "value": "Delete" }, "parameters": [ - "Gutter", - "ObjectStack", "BubbleQueue", "" ] @@ -4166,9 +3746,60 @@ "-", "1" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "insertedBubbleIndex", + "=", + "BubbleClipboard.ObjectStack::Height() - 1" + ] } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "True" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -4267,6 +3898,59 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "True" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ] } ] } @@ -4665,6 +4349,597 @@ } ], "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "Smoothy", + "helpPath": "", + "iconUrl": "", + "name": "Smoothy", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "Originally automatically extracted from events of the project", + "tags": [], + "authorIds": [], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "Match bubbles", + "functionType": "Action", + "name": "MatchBubbles", + "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "_SmoothyExtension.BubbleColor", + "=", + "BoardBubble.AnimationName()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "BoardBubble", + ">=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "0", + "Variable(lowerIndex) -1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleClipboard", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-64", + "-64", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "SpeedPathMovement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Inserted bubble queue index", + "name": "InsertedBubbleQueueIndex", + "type": "expression" + }, + { + "description": "Inserted bubble index", + "name": "InsertedBubbleIndex", + "supplementaryInformation": "Sprite", + "type": "expression" + }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, { "author": "D8H", "category": "Game mechanic", From 0a0c1123aab0eaddea54e9f231ea0dba7921a3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 21 May 2023 01:18:43 +0200 Subject: [PATCH 011/114] Fix the start condition. --- examples/smoothy/smoothy.json | 411 ++++++++++++++++++---------------- 1 file changed, 222 insertions(+), 189 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 12f00cf6a..d8ae2fd43 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2410,17 +2410,25 @@ "Variable(lastBubblePathPosition) - 32", "" ] - }, + } + ], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubbleSpeed)", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" + ] + } ] } ] @@ -2439,6 +2447,25 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "50", + "100", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2590,8 +2617,7 @@ "textG": 0, "textR": 0 }, - "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia.", - "comment2": "" + "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia." }, { "type": "BuiltinCommonInstructions::Standard", @@ -2687,8 +2713,7 @@ "textG": 0, "textR": 0 }, - "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance.", - "comment2": "" + "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4208,9 +4233,14 @@ "ambientLightColorB": 1702453580, "ambientLightColorG": 6022704, "ambientLightColorR": 167801445, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "Borders", + "renderingType": "", "visibility": true, "cameras": [], "effects": [] @@ -4219,9 +4249,14 @@ "ambientLightColorB": 36, "ambientLightColorG": 7379992, "ambientLightColorR": 32, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, "followBaseLayerCamera": false, "isLightingLayer": false, + "isLocked": false, "name": "", + "renderingType": "", "visibility": true, "cameras": [ { @@ -4274,8 +4309,7 @@ "textG": 0, "textR": 0 }, - "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots.", - "comment2": "" + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." }, { "type": "BuiltinCommonInstructions::Standard", @@ -5931,12 +5965,12 @@ "category": "Movement", "extensionNamespace": "", "fullName": "Curved movement", - "helpPath": "", + "helpPath": "/extensions/curved-movement/details/", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLWRhc2hhcnJheTo2LDY7fQ0KCS5zdDN7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5OjQsNDt9DQoJLnN0NHtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7fQ0KCS5zdDV7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1kYXNoYXJyYXk6My4xMDgxLDMuMTA4MTt9DQoJDQoJCS5zdDZ7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2UtZGFzaGFycmF5OjQsMzt9DQo8L3N0eWxlPg0KPHJlY3QgeD0iMyIgeT0iMjUiIGNsYXNzPSJzdDAiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiLz4NCjxyZWN0IHg9IjI1IiB5PSIzIiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSI0Ii8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjUsNUwyNSw1QzE0LDUsNSwxNCw1LDI1djAiLz4NCjwvc3ZnPg0K", "name": "CurvedMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_bezier_curve.svg", "shortDescription": "Move objects on curved paths.", - "version": "1.0.1", + "version": "1.0.3", "description": [ "This extension allows to move objects on Bézier curve paths.", "- Paths can be built dynamically or from predetermined paths in SVG format.", @@ -6703,7 +6737,7 @@ " return CubicBezierCurve;", "})();", "", - "const pathRegex = /[CcSsLlMmHhVvZz]|(?:-?\\d+(?:\\.\\d+)?)/g;", + "const pathRegex = /[CcSsLlMmHhVvZz]|(?:-?\\d+(?:\\.\\d+)?(?:e-?\\d+)?)/g;", "const svgActions = [\"c\", \"s\", \"l\", \"m\", \"v\", \"h\", \"z\"];", "", "/**", @@ -6801,7 +6835,6 @@ " }", " const destinationX = Number.parseFloat(regExpResults[index + 0]);", " const destinationY = Number.parseFloat(regExpResults[index + 1]);", - " console.log(destinationX + \" ; \" + destinationY);", " index++;", " if (isRelative) {", " path.addLine(", @@ -11034,8 +11067,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update speed", - "comment2": "" + "comment": "Update speed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11117,8 +11149,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update the position on the path (the current length) with a Verlet integration.", - "comment2": "" + "comment": "Update the position on the path (the current length) with a Verlet integration." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11148,8 +11179,7 @@ "textG": 0, "textR": 0 }, - "comment": "It's useful to know which way to look at when the speed reached 0.", - "comment2": "" + "comment": "It's useful to know which way to look at when the speed reached 0." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11430,8 +11460,7 @@ "textG": 0, "textR": 0 }, - "comment": "When the path is close or empty, there is no way to reach a destination", - "comment2": "" + "comment": "When the path is close or empty, there is no way to reach a destination" }, { "type": "BuiltinCommonInstructions::Standard", @@ -11686,60 +11715,6 @@ ], "objectGroups": [] }, - { - "description": "Check if the length from the trajectory origin is lesser than a value.", - "fullName": "Current length", - "functionType": "Condition", - "name": "CheckPositionOnPath", - "private": true, - "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "Object.Behavior::PositionOnPath()", - "<", - "GetArgumentAsNumber(\"Length\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Length from the trajectory origin (in pixels)", - "name": "Length", - "type": "expression" - } - ], - "objectGroups": [] - }, { "description": "Change the position of the object on the path.", "fullName": "Position on the path", @@ -11930,6 +11905,59 @@ ], "objectGroups": [] }, + { + "description": "Check if the length from the trajectory origin is lesser than a value.", + "fullName": "Current length", + "functionType": "Condition", + "name": "CheckPositionOnPath", + "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PositionOnPath()", + "<", + "GetArgumentAsNumber(\"Length\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Length from the trajectory origin (in pixels)", + "name": "Length", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "Check if the object has reached the origin position of the path.", "fullName": "Reached path origin", @@ -12128,56 +12156,34 @@ "conditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "True" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { "value": "BuiltinCommonInstructions::Or" @@ -12212,13 +12218,32 @@ }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } ] } ] @@ -12242,13 +12267,32 @@ }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PropertyAcceleration" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } ] } ] @@ -12636,7 +12680,7 @@ "parameters": [ "ShapePainter", "=", - "32" + "ShapePainter.OutlineSize()" ] } ] @@ -12891,6 +12935,18 @@ "Object.Behavior::PropertyPathAngle()", "" ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] } ] } @@ -12954,8 +13010,7 @@ "textG": 0, "textR": 0 }, - "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one.", - "comment2": "" + "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one." }, { "type": "BuiltinCommonInstructions::Standard", @@ -13045,8 +13100,7 @@ "textG": 0, "textR": 0 }, - "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one.", - "comment2": "" + "comment": "When the object reaches the target, it must stay on the last repetition end and not at the start of a new one." }, { "type": "BuiltinCommonInstructions::Standard", @@ -13993,8 +14047,7 @@ "textG": 0, "textR": 0 }, - "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\".", - "comment2": "" + "comment": "Creators can use the \"FireBullet\" action multiple times in a frame and it will be counted as a single \"shot\"." }, { "type": "BuiltinCommonInstructions::Standard", @@ -14057,8 +14110,7 @@ "textG": 0, "textR": 0 }, - "comment": "Subtract 1 from ammo (if not unlimited ammo)", - "comment2": "" + "comment": "Subtract 1 from ammo (if not unlimited ammo)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14210,8 +14262,7 @@ "textG": 0, "textR": 0 }, - "comment": "Increase heat (if needed)", - "comment2": "" + "comment": "Increase heat (if needed)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14252,8 +14303,7 @@ "textG": 0, "textR": 0 }, - "comment": "Check if this caused overheat", - "comment2": "" + "comment": "Check if this caused overheat" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14378,8 +14428,7 @@ "textG": 0, "textR": 0 }, - "comment": "Detect when reload is completed", - "comment2": "" + "comment": "Detect when reload is completed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14468,8 +14517,7 @@ "textG": 0, "textR": 0 }, - "comment": "Only reload the amount of ammo available", - "comment2": "" + "comment": "Only reload the amount of ammo available" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14862,8 +14910,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move temp variable to the next angle a bullet will be sent", - "comment2": "" + "comment": "Move temp variable to the next angle a bullet will be sent" }, { "type": "BuiltinCommonInstructions::Standard", @@ -14974,8 +15021,7 @@ "textG": 0, "textR": 0 }, - "comment": "Create bullet", - "comment2": "" + "comment": "Create bullet" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15005,8 +15051,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move bullet (apply angle and bullet speed variances)", - "comment2": "" + "comment": "Move bullet (apply angle and bullet speed variances)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15046,8 +15091,7 @@ "textG": 0, "textR": 0 }, - "comment": "Add identifier variables (to enable advanced picking by users)", - "comment2": "" + "comment": "Add identifier variables (to enable advanced picking by users)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15098,8 +15142,7 @@ "textG": 0, "textR": 0 }, - "comment": "Rotate newly created bullet, if needed", - "comment2": "" + "comment": "Rotate newly created bullet, if needed" }, { "type": "BuiltinCommonInstructions::Standard", @@ -15139,8 +15182,7 @@ "textG": 0, "textR": 0 }, - "comment": "Update statistics", - "comment2": "" + "comment": "Update statistics" }, { "type": "BuiltinCommonInstructions::Standard", @@ -17614,8 +17656,7 @@ "textG": 0, "textR": 0 }, - "comment": "If Max Ammo is set, do not exceed the value", - "comment2": "" + "comment": "If Max Ammo is set, do not exceed the value" }, { "type": "BuiltinCommonInstructions::Standard", @@ -18478,8 +18519,7 @@ "textG": 0, "textR": 0 }, - "comment": "Shots per reload must not be \"0\"", - "comment2": "" + "comment": "Shots per reload must not be \"0\"" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19641,8 +19681,7 @@ "textG": 0, "textR": 0 }, - "comment": "Origin angle is the farest angle from AngleMin and AngleMax, it's used by MoveToward", - "comment2": "" + "comment": "Origin angle is the farest angle from AngleMin and AngleMax, it's used by MoveToward" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19694,8 +19733,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax", - "comment2": "" + "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19757,8 +19795,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax", - "comment2": "" + "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19787,8 +19824,7 @@ "textG": 0, "textR": 0 }, - "comment": "There is stop angles", - "comment2": "" + "comment": "There is stop angles" }, { "type": "BuiltinCommonInstructions::Standard", @@ -19874,8 +19910,7 @@ "textG": 0, "textR": 0 }, - "comment": "No stop angle, the direction is chosen according to the shortest path (never more that 180°)", - "comment2": "" + "comment": "No stop angle, the direction is chosen according to the shortest path (never more that 180°)" }, { "type": "BuiltinCommonInstructions::Standard", @@ -20014,8 +20049,7 @@ "textG": 0, "textR": 0 }, - "comment": "Use mod to avoid the angle value to be too large.", - "comment2": "" + "comment": "Use mod to avoid the angle value to be too large." }, { "type": "BuiltinCommonInstructions::Standard", @@ -20055,8 +20089,7 @@ "textG": 0, "textR": 0 }, - "comment": "There are stop angles, the angle is bounded by these.", - "comment2": "" + "comment": "There are stop angles, the angle is bounded by these." }, { "type": "BuiltinCommonInstructions::Standard", From afd6e813f1bd8c086e95a4e5026427fbe82024d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 30 May 2023 20:02:59 +0200 Subject: [PATCH 012/114] Update the fire bullet extension. --- examples/smoothy/smoothy.json | 152 +++++++++++++++++++++++----------- 1 file changed, 102 insertions(+), 50 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d8ae2fd43..3af514af1 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2809,52 +2809,23 @@ "300", "" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PosX" - }, - "parameters": [ - "MovingBubble", - "=", - "AimingBubble.X()" - ] - }, - { - "type": { - "value": "PosY" - }, - "parameters": [ - "MovingBubble", - "=", - "AimingBubble.Y()" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" - ] - } + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" ] } ] @@ -13917,7 +13888,7 @@ "name": "FireBullet", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/bullet.svg", "shortDescription": "Fire bullets, manage ammo, reloading and overheating.", - "version": "0.6.1", + "version": "0.6.3", "description": [ "This extension allows objects to fire bullets.", "", @@ -14657,6 +14628,87 @@ ], "objectGroups": [] }, + { + "description": "Fire bullets toward an object.", + "fullName": "Fire bullets toward an object", + "functionType": "Action", + "name": "FireTowardObject", + "sentence": "Fire _PARAM4_ from _PARAM0_, at position _PARAM2_; _PARAM3_, toward _PARAM5_ with speed _PARAM6_ px/s", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate the trajectory angle and use the \"Fire bullets\" action", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsNumber(\"XPosition\")", + "GetArgumentAsNumber(\"YPosition\")", + "Bullet", + "Object.AngleToObject(TargetObject)", + "GetArgumentAsNumber(\"Speed\")", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FireBullet::FireBullet", + "type": "behavior" + }, + { + "description": "X position, where to create the bullet", + "name": "XPosition", + "type": "expression" + }, + { + "description": "Y position, where to create the bullet", + "name": "YPosition", + "type": "expression" + }, + { + "description": "The bullet object", + "name": "Bullet", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Target object", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Speed of the bullet, in pixels per second", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "Fire bullets toward a position.", "fullName": "Fire bullets toward a position", @@ -14687,7 +14739,7 @@ "GetArgumentAsNumber(\"XPosition\")", "GetArgumentAsNumber(\"YPosition\")", "Bullet", - "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"),GetArgumentAsNumber(\"TargetYPosition\"))", + "Object.AngleToPosition(GetArgumentAsNumber(\"TargetXPosition\"), GetArgumentAsNumber(\"TargetYPosition\"))", "GetArgumentAsNumber(\"Speed\")", "" ] @@ -14723,7 +14775,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Target X position", @@ -14978,7 +15030,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", @@ -15230,7 +15282,7 @@ { "description": "The bullet object", "name": "Bullet", - "type": "objectList" + "type": "objectListOrEmptyIfJustDeclared" }, { "description": "Angle of the bullet, in degrees", From 355e327cf8273d7051da4b729d83c12465a95969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 30 May 2023 21:24:48 +0200 Subject: [PATCH 013/114] Add some comments. --- examples/smoothy/smoothy.json | 330 ++++++++++++++++++++++++++++++++-- 1 file changed, 311 insertions(+), 19 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 3af514af1..80e6aa023 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2410,25 +2410,17 @@ "Variable(lastBubblePathPosition) - 32", "" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubbleSpeed)", - "" - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" ] } ] @@ -3694,6 +3686,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "2 bubble queues are colliding." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4444,6 +4448,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward tail." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -4559,6 +4575,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward head." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -4691,6 +4719,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the leading bubbles in a new BubbleQueue.\n\nA new BubbleQueue can't be modified directly because another BubbleQueue is already picked.\nInstead, the leading bubbles are moved into a temporary queue BubbleClipboard." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4779,6 +4819,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Now that no BubbleQueue is picked, a new one can be created." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4815,7 +4867,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "0", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", "" ] }, @@ -4852,6 +4904,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4940,6 +5004,234 @@ } ], "objectGroups": [] + }, + { + "fullName": "Queue collision", + "functionType": "Action", + "name": "IsQueueColliding", + "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) - 1", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + 32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "SpeedPathMovement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Tailling bubble queue index", + "name": "TaillingQueueIndex", + "supplementaryInformation": "Sprite", + "type": "expression" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [], From cba7157e9a97dd11f84285d394a01ad8e0bedb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Tue, 30 May 2023 21:48:55 +0200 Subject: [PATCH 014/114] Use functions to merge queue. --- examples/smoothy/smoothy.json | 943 +++++++++++++++++----------------- 1 file changed, 471 insertions(+), 472 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 80e6aa023..89eee821c 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3544,414 +3544,48 @@ "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", - "", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", - "", - "" - ] - } - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) - 1", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "2 bubble queues are colliding." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "Variable(firstBubblePathPosition) + 32", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "insertedBubbleIndex", - "=", - "BubbleClipboard.ObjectStack::Height() - 1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "IsRewinding", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "IsRewinding", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Merge\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(firstBubbleSpeed)", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "IsRewinding", - "True" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::MatchBubbles" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "Variable(insertedBubbleIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ] - } + "value": "Smoothy::IsQueueColliding" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MergeQueue" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" ] } ] @@ -4997,19 +4631,237 @@ "type": "objectList" }, { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Queue collision", + "functionType": "Condition", + "name": "IsQueueColliding", + "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + 32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "SpeedPathMovement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", "type": "behavior" + }, + { + "description": "Tailling bubble queue index", + "name": "TaillingQueueIndex", + "supplementaryInformation": "Sprite", + "type": "expression" } ], "objectGroups": [] }, { - "fullName": "Queue collision", + "fullName": "Merge queue", "functionType": "Action", - "name": "IsQueueColliding", - "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", + "name": "MergeQueue", + "sentence": "Merge _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ with the bubble queue ahead", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5023,7 +4875,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex)", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", "" ] }, @@ -5062,52 +4914,6 @@ "BoardBubble.SpeedPathMovement::Speed()" ] } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", - "", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", - "", - "" - ] - } - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", - "", - "" - ] - } ] }, { @@ -5122,7 +4928,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex) - 1", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] }, @@ -5139,10 +4945,83 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "insertedBubbleIndex", + "=", + "BubbleClipboard.ObjectStack::Height() - 1" + ] + } + ], "events": [ { - "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "True" + ] + } + ] + }, + { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -5151,7 +5030,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "\"Merge\"", "", "" ] @@ -5163,13 +5042,22 @@ "conditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + "value": "AjoutObjConcern" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "Variable(firstBubblePathPosition) + 32", + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", "" ] } @@ -5177,11 +5065,111 @@ "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" }, "parameters": [ + "IsRewinding", "True" ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] } ] } @@ -5227,8 +5215,19 @@ { "description": "Tailling bubble queue index", "name": "TaillingQueueIndex", - "supplementaryInformation": "Sprite", "type": "expression" + }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" } ], "objectGroups": [] From 782b62f36c3c7b778358b81d9cd030a6953dc634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 00:19:45 +0200 Subject: [PATCH 015/114] Typo --- examples/smoothy/smoothy.json | 313 +++++++++++++++++++--------------- 1 file changed, 176 insertions(+), 137 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 89eee821c..20ebf5557 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4863,6 +4863,34 @@ "name": "MergeQueue", "sentence": "Merge _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ with the bubble queue ahead", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Merge\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Get information about" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4931,18 +4959,6 @@ "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] } ], "actions": [ @@ -4980,142 +4996,88 @@ } ], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "IsRewinding", - "False" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "ObjectStack::HasOnTop" }, "parameters": [ + "", "BubbleQueue", - "IsRewinding", - "True" + "ObjectStack", + "BoardBubble", + "" ] } ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "ModVarScene" }, "parameters": [ - "IsRewinding", - "True" + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Fix the gap between the 2 bubble queues." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ - "\"Merge\"", - "", + "BoardBubble", + "SpeedPathMovement", + "+", + "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] }, { "type": { - "value": "ObjectStack::HasOnTop" + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", "" ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(firstBubbleSpeed)", - "" - ] - } + "IsRewinding", + "False" ] } ] @@ -5125,55 +5087,132 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectVariableAsBoolean" }, "parameters": [ + "BubbleQueue", "IsRewinding", "True" ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] } ], "actions": [ { "type": { - "value": "Smoothy::MatchBubbles" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "Variable(insertedBubbleIndex)", - "BubbleClipboard", - "ObjectStack", - "" + "IsRewinding", + "True" ] } ] } ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Merge the queue" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Queck for a match at the junction." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ] } ], "parameters": [ From ba25c78514d0d9fc52b09f5b5be057bce318b3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 02:20:49 +0200 Subject: [PATCH 016/114] Fix merging. --- examples/smoothy/smoothy.json | 495 +++++++++++++++++++++------------- 1 file changed, 314 insertions(+), 181 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 20ebf5557..f2255bbae 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3659,71 +3659,19 @@ "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "Smoothy::IsQueueMatching" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", "ObjectStack", "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "firstBubbleColor", - "=", - "BoardBubble.AnimationName()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", + "SpeedPathMovement", "Variable(queueIndex)", "" ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] } ], "actions": [], @@ -3733,11 +3681,15 @@ "conditions": [ { "type": { - "value": "AnimationName" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "BoardBubble", - "VariableString(firstBubbleColor)" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" ] } ], @@ -3751,23 +3703,15 @@ "IsRewinding", "True" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" - ] - } + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" ] } ] @@ -4961,40 +4905,7 @@ ] } ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "insertedBubbleIndex", - "=", - "BubbleClipboard.ObjectStack::Height() - 1" - ] - } - ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5039,7 +4950,20 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], "actions": [ { "type": { @@ -5066,22 +4990,116 @@ ] } ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Merge the queues." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllOnTop" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "ObjectStack" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "IsRewinding", - "False" - ] - } + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "insertedBubbleIndex", + "=", + "BubbleQueue.ObjectStack::Height() - 1" ] }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BubbleClipboard", + "ObjectStack", + "ObjectStack" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Queck for a match at the junction." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -5099,29 +5117,100 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "SetObjectVariableAsBoolean" }, "parameters": [ + "BubbleQueue", "IsRewinding", - "True" + "" + ] + }, + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" ] } ] } ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Merge the queue" + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "SpeedPathMovement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Tailling bubble queue index", + "name": "TaillingQueueIndex", + "type": "expression" + }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Queue match", + "functionType": "Condition", + "name": "IsQueueMatching", + "sentence": "_PARAM5_ from _PARAM1_ at the tail of _PARAM3_ number _PARAM7_ is matching the bubble at the head of the previous queue", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -5134,19 +5223,20 @@ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "GetArgumentAsNumber(\"LeadingQueueIndex\") + 1", "" ] }, { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", "BubbleQueue", "ObjectStack", "BoardBubble", + "0", "" ] } @@ -5154,63 +5244,62 @@ "actions": [ { "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" + "value": "ModVarSceneTxt" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "" + "firstBubbleColor", + "=", + "BoardBubble.AnimationName()" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Queck for a match at the junction." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "IsRewinding", - "True" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"LeadingQueueIndex\")", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Smoothy::MatchBubbles" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", - "Gutter", - "ObjectStack", "BubbleQueue", "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "Variable(insertedBubbleIndex)", - "BubbleClipboard", - "ObjectStack", "" ] + }, + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(firstBubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] } ] } @@ -5252,21 +5341,10 @@ "type": "behavior" }, { - "description": "Tailling bubble queue index", - "name": "TaillingQueueIndex", - "type": "expression" - }, - { - "description": "Bubble clipboard", - "name": "BubbleClipboard", + "description": "Leading bubble queue index", + "name": "LeadingQueueIndex", "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" + "type": "expression" } ], "objectGroups": [] @@ -6041,6 +6119,61 @@ ], "objectGroups": [] }, + { + "description": "Move all the object from a stack into another one at the top.", + "fullName": "Move all on top of the stack", + "functionType": "Action", + "name": "MoveAllOnTop", + "sentence": "Move all the objects of the stack of _PARAM2_ on the top of the stack of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Height()", + "Stack", + "StackBehavior", + "0", + "Stack.StackBehavior::Height() - 1", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Stack", + "name": "Stack", + "type": "objectList" + }, + { + "description": "Stack behavior", + "name": "StackBehavior", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Shuffle the stack.", "fullName": "Shuffle", From ba7a95bbd8cdfab7e24031f318ab044991426477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 02:26:11 +0200 Subject: [PATCH 017/114] Add comments. --- examples/smoothy/smoothy.json | 478 +++++++++++++++++----------------- 1 file changed, 245 insertions(+), 233 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f2255bbae..8c76458ea 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4824,101 +4824,52 @@ ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Get information about" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Fix the gap", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "ModVarScene" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "firstBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] + "comment": "Get information about the queue positions." }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "" - ] - } - ], - "actions": [], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::HasOnTop" + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", "BubbleQueue", "ObjectStack", "BoardBubble", + "0", "" ] } @@ -4929,224 +4880,285 @@ "value": "ModVarScene" }, "parameters": [ - "lastBubblePathPosition", + "firstBubblePathPosition", "=", "BoardBubble.SpeedPathMovement::PositionOnPath()" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Fix the gap between the 2 bubble queues." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", - "BubbleQueue", + "Gutter", "ObjectStack", - "BoardBubble", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "+", - "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } ] }, { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(firstBubbleSpeed)", - "" + "comment": "Fix the gap between the 2 bubble queues." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "+", + "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", + "" + ] + } ] } ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Merge the queues." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "" - ] - } ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllOnTop" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "ObjectStack" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - } - ] + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "insertedBubbleIndex", - "=", - "BubbleQueue.ObjectStack::Height() - 1" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BubbleClipboard", - "ObjectStack", - "ObjectStack" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Merge the queues", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Queck for a match at the junction." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ + "", + "Gutter", + "ObjectStack", "BubbleQueue", - "IsRewinding", - "True" + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" ] } ], "actions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "ObjectStack::ObjectStack::MoveAllOnTop" }, "parameters": [ + "BubbleClipboard", + "ObjectStack", "BubbleQueue", - "IsRewinding", - "" + "ObjectStack", + "ObjectStack" ] }, { "type": { - "value": "Smoothy::MatchBubbles" + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "Variable(insertedBubbleIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "insertedBubbleIndex", + "=", + "BubbleQueue.ObjectStack::Height() - 1" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", "BubbleClipboard", "ObjectStack", - "" + "ObjectStack" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check for a match at the junction." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "" + ] + }, + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + } ] } ] } - ] + ], + "parameters": [] } ], "parameters": [ From 791f64909a867d2b41d951e6b642c2aafffdc402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 14:08:08 +0200 Subject: [PATCH 018/114] Add comments. --- examples/smoothy/smoothy.json | 746 +++++++++++++++++----------------- 1 file changed, 378 insertions(+), 368 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 8c76458ea..b40925a91 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2897,44 +2897,34 @@ }, { "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - }, - { - "type": { - "value": "SetAnimationName" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ "InsertedBubble", - "MovingBubble.AnimationName()" + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" + "value": "LinkedObjects::LinkObjects" }, "parameters": [ - "InsertedBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", "", - "" + "InsertedBubble", + "BoardBubble" ] }, { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "SetAnimationName" }, "parameters": [ "InsertedBubble", - "IsInserting", - "True" + "MovingBubble.AnimationName()" ] }, { @@ -2978,129 +2968,159 @@ "conditions": [], "actions": [], "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "VarObjet" }, "parameters": [ "InsertedBubble", - "IsInserting", - "True" + "FreedDistance", + "<", + "32" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "PreviousFreedDistance", + "=", + "InsertedBubble.Variable(FreedDistance)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "=", + "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" ] } ], - "actions": [], "events": [ { - "disabled": true, + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the inserted bubble ahead of the bubble it collides." + }, + { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ - "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", "", + "BoardBubble", + "InsertedBubble", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "VarObjet" + "value": "ObjectStack::Contains" }, "parameters": [ - "InsertedBubble", - "FreedDistance", - "<", - "32" + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" ] } ], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ "InsertedBubble", - "PreviousFreedDistance", + "SpeedPathMovement", "=", - "InsertedBubble.Variable(FreedDistance)" + "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", + "" ] }, { "type": { - "value": "ModVarObjet" + "value": "MettreXY" }, "parameters": [ "InsertedBubble", - "FreedDistance", "=", - "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" + "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", + "=", + "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" ] } ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "BoardBubble", - "InsertedBubble", - "" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", "" ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "InsertedBubble", - "SpeedPathMovement", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", - "" - ] - }, - { - "type": { - "value": "MettreXY" + "value": "ModVarObjet" }, "parameters": [ "InsertedBubble", + "BubbleIndex", "=", - "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", - "=", - "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" ] } ], @@ -3115,213 +3135,65 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ + "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "InsertedBubble.Variable(BubbleIndex) - 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "+", - "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", "" ] } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", - "", - "" - ] - } - ] - } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "VarObjet" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "InsertedBubble", - "FreedDistance", - "=", - "32" - ] - } - ], - "actions": [], - "events": [ + "comment": "Push all the bubbles of the queue head." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" + "value": "AjoutObjConcern" }, "parameters": [ "", - "BoardBubble", - "InsertedBubble", - "" + "BoardBubble" ] }, { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::ContainsBetween" }, "parameters": [ "", "BubbleQueue", "ObjectStack", "BoardBubble", + "0", + "InsertedBubble.Variable(BubbleIndex) - 1", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "PositionOnPath", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "Speed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "QueueIndex", - "=", - "Gutter.ObjectStack::HeightOf(BubbleQueue)" + "BoardBubble", + "SpeedPathMovement", + "+", + "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", + "" ] } ], @@ -3336,7 +3208,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", + "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", "", "" ] @@ -3344,150 +3216,288 @@ ] } ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "InsertedBubble", + "FreedDistance", + "=", + "32" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "InsertedBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "PositionOnPath", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "Speed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] }, { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "InsertedBubble", + "QueueIndex", + "=", + "Gutter.ObjectStack::HeightOf(BubbleQueue)" + ] + } + ], + "events": [ + { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "InsertedBubble.Variable(QueueIndex)", - "InsertedBubble.Variable(QueueIndex)", "" ] } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(PositionOnPath)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(Speed)", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "InsertedBubble.Variable(BubbleIndex)", - "" - ] - }, - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "InsertedBubble", - "IsInserting", - "False" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "InsertedBubble", - "" - ] - } - ] - } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Actually insert the bubble in the queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "InsertedBubble.Variable(QueueIndex)", + "InsertedBubble.Variable(QueueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Smoothy::MatchBubbles" + "value": "Create" }, "parameters": [ "", - "Gutter", - "ObjectStack", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "BoardBubble", + "InsertedBubble.AnimationName()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(PositionOnPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "InsertedBubble.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ "BubbleQueue", "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "InsertedBubble.Variable(QueueIndex)", "InsertedBubble.Variable(BubbleIndex)", - "BubbleClipboard", - "ObjectStack", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "InsertedBubble", "" ] } ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "InsertedBubble.Variable(QueueIndex)", + "InsertedBubble.Variable(BubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ] } ] } From 1be7f88eddc7348739d7f53f8c75166081c414b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 16:27:07 +0200 Subject: [PATCH 019/114] Add a behavior for inserted bubbles. --- examples/smoothy/smoothy.json | 4251 +++++++++++++++++++-------------- 1 file changed, 2499 insertions(+), 1752 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index b40925a91..78df104e2 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1512,6 +1512,11 @@ "variables": [], "effects": [], "behaviors": [ + { + "name": "InsertedBubble", + "type": "Smoothy::InsertedBubble", + "SpeedPathMovement": "SpeedPathMovement" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement", @@ -2866,882 +2871,1302 @@ "actions": [ { "type": { - "value": "SeparateFromObjects" + "value": "Create" }, "parameters": [ - "MovingBubble", - "BoardBubble", + "", + "InsertedBubble", + "StartLocation.X()", + "StartLocation.Y()", "" ] }, { "type": { - "value": "Delete" + "value": "Smoothy::InsertedBubble::Initialize" }, "parameters": [ + "InsertedBubble", + "InsertedBubble", + "BoardBubble", "MovingBubble", "" ] }, { "type": { - "value": "Create" + "value": "Delete" }, "parameters": [ - "", - "InsertedBubble", - "StartLocation.X()", - "StartLocation.Y()", + "MovingBubble", "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" + "inverted": true, + "value": "Smoothy::InsertedBubble::IsAnimationFinished" }, "parameters": [ "InsertedBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", + "InsertedBubble", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "LinkedObjects::LinkObjects" + "value": "Smoothy::InsertedBubble::PlayInsertion" }, "parameters": [ - "", "InsertedBubble", - "BoardBubble" + "InsertedBubble", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetAnimationName" + "value": "Smoothy::InsertedBubble::IsAnimationFinished" }, "parameters": [ "InsertedBubble", - "MovingBubble.AnimationName()" + "InsertedBubble", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ModVarObjet" + "value": "Smoothy::InsertedBubble::CreateBubble" }, "parameters": [ "InsertedBubble", - "FreedDistance", - "=", - "0" + "InsertedBubble", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] }, { "type": { - "value": "ModVarObjet" + "value": "Smoothy::MatchBubbles" }, "parameters": [ - "InsertedBubble", - "InitialDeltaX", - "=", - "MovingBubble.X() - BoardBubble.X()" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "InsertedBubble.InsertedBubble::QueueIndex()", + "InsertedBubble.InsertedBubble::BubbleIndex()", + "BubbleClipboard", + "ObjectStack", + "" ] - }, + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Merge queues", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ModVarObjet" + "value": "ModVarScene" }, "parameters": [ - "InsertedBubble", - "InitialDeltaY", + "queueIndex", "=", - "MovingBubble.Y() - BoardBubble.Y()" + "Gutter.ObjectStack::Height() - 1" ] } ] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "InsertedBubble", + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "queueIndex", + ">", + "0" + ] + } + ], "conditions": [], "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueColliding" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "Smoothy::MergeQueue" }, "parameters": [ - "\"FreedDistance: \" + InsertedBubble.VariableString(FreedDistance)", "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "VarObjet" + "value": "ModVarScene" }, "parameters": [ - "InsertedBubble", - "FreedDistance", - "<", - "32" + "queueIndex", + "-", + "1" ] } - ], - "actions": [ + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 2" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "queueIndex", + ">=", + "0" + ] + } + ], + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarObjet" + "value": "Smoothy::IsQueueMatching" }, "parameters": [ - "InsertedBubble", - "PreviousFreedDistance", - "=", - "InsertedBubble.Variable(FreedDistance)" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" ] }, { "type": { - "value": "ModVarObjet" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "InsertedBubble", - "FreedDistance", - "=", - "min(InsertedBubble.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetObjectVariableAsBoolean" }, - "comment": "Move the inserted bubble ahead of the bubble it collides." + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "BoardBubble", - "InsertedBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "InsertedBubble", - "SpeedPathMovement", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + InsertedBubble.Variable(FreedDistance)", - "" - ] - }, - { - "type": { - "value": "MettreXY" - }, - "parameters": [ - "InsertedBubble", - "=", - "lerp(BoardBubble.X() + InsertedBubble.Variable(InitialDeltaX), InsertedBubble.X(), InsertedBubble.Variable(FreedDistance) / 32)", - "=", - "lerp(BoardBubble.Y() + InsertedBubble.Variable(InitialDeltaY), InsertedBubble.Y(), InsertedBubble.Variable(FreedDistance) / 32)" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "ToString(InsertedBubble.X()) + \" \" + ToString(InsertedBubble.Y())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Push all the bubbles of the queue head." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "InsertedBubble.Variable(BubbleIndex) - 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "+", - "InsertedBubble.Variable(FreedDistance) - InsertedBubble.Variable(PreviousFreedDistance)", - "" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", - "", - "" - ] - } - ] - } - ] - } + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "VarObjet" + "value": "ModVarScene" }, "parameters": [ - "InsertedBubble", - "FreedDistance", - "=", - "32" + "queueIndex", + "-", + "1" ] } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "BoardBubble", - "InsertedBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "InsertedBubble", - "PositionOnPath", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "-200", + "800", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 1702453580, + "ambientLightColorG": 6022704, + "ambientLightColorR": 167801445, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "Borders", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 36, + "ambientLightColorG": 7379992, + "ambientLightColorR": 32, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "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": [] + } + ], + "behaviorsSharedData": [ + { + "name": "FireBullet", + "type": "FireBullet::FireBullet" + }, + { + "name": "InsertedBubble", + "type": "Smoothy::InsertedBubble" + }, + { + "name": "ObjectStack", + "type": "ObjectStack::ObjectStack" + }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement" + }, + { + "name": "Turret", + "type": "Turret::Turret" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Game", + "lastChangeTimeStamp": 0, + "name": "UpdateRemainingColors", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "remainingColors" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "colors", + "valueIteratorVariableName": "color", + "keyIteratorVariableName": "index", + "conditions": [ + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(color)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SceneVariablePushString" + }, + "parameters": [ + "remainingColors", + "VariableString(color)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "VariableChildCount(remainingColors)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "levelCompleted", + "True" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "Smoothy", + "helpPath": "", + "iconUrl": "", + "name": "Smoothy", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "Originally automatically extracted from events of the project", + "tags": [], + "authorIds": [], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "Match bubbles", + "functionType": "Action", + "name": "MatchBubbles", + "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "_SmoothyExtension.BubbleColor", + "=", + "BoardBubble.AnimationName()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward tail." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" ] }, { "type": { - "value": "ModVarObjet" + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward head." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" }, "parameters": [ - "InsertedBubble", - "Speed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" ] }, { "type": { - "value": "ModVarObjet" + "inverted": true, + "value": "AnimationName" }, "parameters": [ - "InsertedBubble", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" ] - }, + } + ], + "actions": [ { "type": { - "value": "ModVarObjet" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "InsertedBubble", - "QueueIndex", - "=", - "Gutter.ObjectStack::HeightOf(BubbleQueue)" + "foundOtherColor", + "True" ] - } - ], - "events": [ + }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"BubbleIndex: \" + InsertedBubble.VariableString(BubbleIndex)", - "", - "" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" ] } ] - }, + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "DebuggerTools::ConsoleLog" }, - "comment": "Actually insert the bubble in the queue." + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the leading bubbles in a new BubbleQueue.\n\nA new BubbleQueue can't be modified directly because another BubbleQueue is already picked.\nInstead, the leading bubbles are moved into a temporary queue BubbleClipboard." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(upperIndex)", + "" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "InsertedBubble.Variable(QueueIndex)", - "InsertedBubble.Variable(QueueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "BoardBubble", - "InsertedBubble.AnimationName()" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(PositionOnPath)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "InsertedBubble.Variable(Speed)", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "InsertedBubble.Variable(BubbleIndex)", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "InsertedBubble", - "" - ] - } - ] - } + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "BoardBubble", + ">=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::MatchBubbles" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "InsertedBubble.Variable(QueueIndex)", - "InsertedBubble.Variable(BubbleIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - } + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "0", + "Variable(lowerIndex) -1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleClipboard", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Now that no BubbleQueue is picked, a new one can be created." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-64", + "-64", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" ] } ] } ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] } ], - "parameters": [] + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Inserted bubble queue index", + "name": "InsertedBubbleQueueIndex", + "type": "expression" + }, + { + "description": "Inserted bubble index", + "name": "InsertedBubbleIndex", + "supplementaryInformation": "Sprite", + "type": "expression" + }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Merge queues", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "fullName": "Queue collision", + "functionType": "Condition", + "name": "IsQueueColliding", + "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "ModVarScene" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" ] } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + ], + "actions": [ { "type": { - "value": "VarScene" + "value": "ModVarScene" }, "parameters": [ - "queueIndex", - ">", - "0" + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] } ], - "conditions": [], - "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueColliding" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::MergeQueue" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack", "" ] }, { "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "queueIndex", - "-", - "1" + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" ] } ] } ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Combo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 2" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } + "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", + "", + "" ] } ] @@ -3751,17 +4176,20 @@ "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ + "", + "Gutter", + "ObjectStack", "BubbleQueue", - "IsRewinding", - "True" + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "" ] }, { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", @@ -3772,221 +4200,143 @@ ] } ], - "actions": [ + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "", + "" + ] + } + ] + }, { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "-200", - "800", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + 32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ] } ], - "parameters": [] - } - ], - "layers": [ - { - "ambientLightColorB": 1702453580, - "ambientLightColorG": 6022704, - "ambientLightColorR": 167801445, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "Borders", - "renderingType": "", - "visibility": true, - "cameras": [], - "effects": [] - }, - { - "ambientLightColorB": 36, - "ambientLightColorG": 7379992, - "ambientLightColorR": 32, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "parameters": [ { - "defaultSize": true, - "defaultViewport": true, - "height": 0, - "viewportBottom": 1, - "viewportLeft": 0, - "viewportRight": 1, - "viewportTop": 0, - "width": 0 - } - ], - "effects": [] - } - ], - "behaviorsSharedData": [ - { - "name": "FireBullet", - "type": "FireBullet::FireBullet" - }, - { - "name": "ObjectStack", - "type": "ObjectStack::ObjectStack" - }, - { - "name": "SpeedPathMovement", - "type": "CurvedMovement::SpeedPathMovement" - }, - { - "name": "Turret", - "type": "Turret::Turret" - } - ] - } - ], - "externalEvents": [ - { - "associatedLayout": "Game", - "lastChangeTimeStamp": 0, - "name": "UpdateRemainingColors", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, { - "type": { - "value": "VariableClearChildren" - }, - "parameters": [ - "remainingColors" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "colors", - "valueIteratorVariableName": "color", - "keyIteratorVariableName": "index", - "conditions": [ + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(color)" - ] - } - ], - "actions": [ + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, { - "type": { - "value": "SceneVariablePushString" - }, - "parameters": [ - "remainingColors", - "VariableString(color)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { - "type": { - "value": "Egal" - }, - "parameters": [ - "VariableChildCount(remainingColors)", - "=", - "0" - ] - } - ], - "actions": [ + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "levelCompleted", - "True" - ] + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Tailling bubble queue index", + "name": "TaillingQueueIndex", + "supplementaryInformation": "Sprite", + "type": "expression" } - ] - } - ] - } - ], - "eventsFunctionsExtensions": [ - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "Smoothy", - "helpPath": "", - "iconUrl": "", - "name": "Smoothy", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "Originally automatically extracted from events of the project", - "tags": [], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [ + ], + "objectGroups": [] + }, { - "fullName": "Match bubbles", + "fullName": "Merge queue", "functionType": "Action", - "name": "MatchBubbles", - "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", + "name": "MergeQueue", + "sentence": "Merge _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ with the bubble queue ahead", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "\"Merge\"", "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", "" ] - } - ], - "actions": [], + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Fix the gap", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Get information about the queue positions." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3996,379 +4346,203 @@ }, "parameters": [ "", - "BubbleQueue", + "Gutter", "ObjectStack", - "BoardBubble", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ModVarSceneTxt" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "_SmoothyExtension.BubbleColor", - "=", - "BoardBubble.AnimationName()" + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" ] } ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Scan bubbles of the same color toward tail." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ - "lowerIndex", + "firstBubblePathPosition", "=", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "ModVarScene" }, "parameters": [ - "foundOtherColor", - "False" + "firstBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" ] } ] }, { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "foundOtherColor", + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "lowerIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "-", - "1" - ] } ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", "BubbleQueue", "ObjectStack", "BoardBubble", - "Variable(lowerIndex)", - "Variable(lowerIndex)", "" ] - }, - { - "type": { - "inverted": true, - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(_SmoothyExtension.BubbleColor)" - ] } ], "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "True" - ] - }, { "type": { "value": "ModVarScene" }, "parameters": [ - "lowerIndex", - "+", - "1" + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Scan bubbles of the same color toward head." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "=", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")" - ] }, { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "foundOtherColor", - "" - ] + "comment": "Fix the gap between the 2 bubble queues." }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "upperIndex", - "<", - "BubbleQueue.ObjectStack::Height() - 1" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(upperIndex)", - "Variable(upperIndex)", - "" - ] - }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": true, - "value": "AnimationName" + "value": "ObjectStack::Contains" }, "parameters": [ + "", + "BubbleQueue", + "ObjectStack", "BoardBubble", - "VariableString(_SmoothyExtension.BubbleColor)" + "" ] } ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" }, "parameters": [ - "foundOtherColor", - "True" + "BoardBubble", + "SpeedPathMovement", + "+", + "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", + "" ] }, { "type": { - "value": "ModVarScene" + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ - "upperIndex", - "-", - "1" + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(firstBubbleSpeed)", + "" ] } ] } ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move the leading bubbles in a new BubbleQueue.\n\nA new BubbleQueue can't be modified directly because another BubbleQueue is already picked.\nInstead, the leading bubbles are moved into a temporary queue BubbleClipboard." - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Merge the queues", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsBetween" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", - "BubbleQueue", + "Gutter", "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(upperIndex)", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", "" ] - }, - { - "type": { - "value": "PickedInstancesCount" - }, - "parameters": [ - "BoardBubble", - ">=", - "3" - ] } ], "actions": [ { "type": { - "value": "Delete" + "value": "ObjectStack::ObjectStack::MoveAllOnTop" }, "parameters": [ - "BoardBubble", - "" + "BubbleClipboard", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "ObjectStack" ] }, { "type": { - "value": "ObjectStack::ObjectStack::MoveInto" + "value": "Delete" }, "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", "BubbleQueue", - "ObjectStack", - "0", - "Variable(lowerIndex) -1", "" ] } @@ -4379,13 +4553,14 @@ "conditions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", - "BubbleClipboard", + "Gutter", "ObjectStack", - "BoardBubble", + "BubbleQueue", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] } @@ -4393,139 +4568,242 @@ "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", + "insertedBubbleIndex", "=", - "0", - "" + "BubbleQueue.ObjectStack::Height() - 1" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BubbleClipboard", + "ObjectStack", + "ObjectStack" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check for a match at the junction." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "" + ] + }, + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", + "Variable(insertedBubbleIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + } ] } ] } - ] + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Now that no BubbleQueue is picked, a new one can be created." + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Tailling bubble queue index", + "name": "TaillingQueueIndex", + "type": "expression" }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Queue match", + "functionType": "Condition", + "name": "IsQueueMatching", + "sentence": "_PARAM5_ from _PARAM1_ at the tail of _PARAM3_ number _PARAM7_ is matching the bubble at the head of the previous queue", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", - "BubbleQueue", - "-64", - "-64", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "GetArgumentAsNumber(\"LeadingQueueIndex\") + 1", "" ] }, { "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" + "value": "ObjectStack::ContainsAt" }, "parameters": [ + "", "BubbleQueue", "ObjectStack", + "BoardBubble", "0", - "BubbleClipboard", - "ObjectStack", "" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Insert in Gutter\"", - "", - "" - ] - } + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "firstBubbleColor", + "=", + "BoardBubble.AnimationName()" ] } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"LeadingQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" }, "parameters": [ + "", "BubbleQueue", "ObjectStack", + "BoardBubble", "" ] + }, + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(firstBubbleColor)" + ] } ], "actions": [ { "type": { - "value": "Delete" + "value": "SetReturnBoolean" }, "parameters": [ - "BubbleQueue", - "" + "True" ] } ] @@ -4562,162 +4840,176 @@ "type": "objectList" }, { - "description": "SpeedPathMovement", + "description": "Speed path movement", "name": "SpeedPathMovement", "supplementaryInformation": "CurvedMovement::SpeedPathMovement", "type": "behavior" }, { - "description": "Inserted bubble queue index", - "name": "InsertedBubbleQueueIndex", - "type": "expression" - }, - { - "description": "Inserted bubble index", - "name": "InsertedBubbleIndex", + "description": "Leading bubble queue index", + "name": "LeadingQueueIndex", "supplementaryInformation": "Sprite", "type": "expression" - }, - { - "description": "Bubble clipboard", - "name": "BubbleClipboard", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" } ], "objectGroups": [] - }, + } + ], + "eventsBasedBehaviors": [ { - "fullName": "Queue collision", - "functionType": "Condition", - "name": "IsQueueColliding", - "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", - "events": [ + "description": "", + "fullName": "", + "name": "InsertedBubble", + "objectType": "Sprite", + "eventsFunctions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "" - ] - }, + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" } ], + "objectGroups": [] + }, + { + "fullName": "Initialize", + "functionType": "Action", + "name": "Initialize", + "sentence": "Initialize the animation of _PARAM0_ for the insertion of _PARAM3_ next to _PARAM2_", "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "Object", + "SpeedPathMovement", + "\"Gutter\"", + "1", "", "" ] }, { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "SeparateFromObjects" }, "parameters": [ - "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", - "", + "MovingBubble", + "BoardBubble", "" ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "Object", + "BoardBubble" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "MovingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "FreedDistance", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "InitialDeltaX", + "=", + "MovingBubble.X() - BoardBubble.X()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "InitialDeltaY", + "=", + "MovingBubble.Y() - BoardBubble.Y()" + ] } ] } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + ], + "parameters": [ { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" }, { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] + "description": "Board bubble", + "name": "BoardBubble", + "type": "objectList" + }, + { + "description": "Moving bubble", + "name": "MovingBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" } ], - "actions": [], + "objectGroups": [] + }, + { + "fullName": "Play insertion animation", + "functionType": "Action", + "name": "PlayInsertion", + "sentence": "Play the insertion animation of _PARAM0_ in _PARAM6_ from _PARAM4_ of _PARAM2_", "events": [ { "disabled": true, @@ -4729,7 +5021,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "\"FreedDistance: \" + Object.VariableString(FreedDistance)", "", "" ] @@ -4741,197 +5033,284 @@ "conditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + "value": "VarObjet" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "Variable(firstBubblePathPosition) + 32", - "" + "Object", + "FreedDistance", + "<", + "32" ] } ], "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "ModVarObjet" }, "parameters": [ - "True" + "Object", + "PreviousFreedDistance", + "=", + "Object.Variable(FreedDistance)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "FreedDistance", + "=", + "min(Object.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the inserted bubble ahead of the bubble it collides." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "Object", + "SpeedPathMovement", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + Object.Variable(FreedDistance)", + "" + ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "lerp(BoardBubble.X() + Object.Variable(InitialDeltaX), Object.X(), Object.Variable(FreedDistance) / 32)", + "=", + "lerp(BoardBubble.Y() + Object.Variable(InitialDeltaY), Object.Y(), Object.Variable(FreedDistance) / 32)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(Object.X()) + \" \" + ToString(Object.Y())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"BubbleIndex: \" + Object.VariableString(BubbleIndex)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Push all the bubbles of the queue head." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "Object.Variable(BubbleIndex) - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "+", + "Object.Variable(FreedDistance) - Object.Variable(PreviousFreedDistance)", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Push: \" + ToString(PickedInstancesCount(BoardBubble))", + "", + "" + ] + } + ] + } + ] + } ] } ] - } - ] - } - ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "SpeedPathMovement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Tailling bubble queue index", - "name": "TaillingQueueIndex", - "supplementaryInformation": "Sprite", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "fullName": "Merge queue", - "functionType": "Action", - "name": "MergeQueue", - "sentence": "Merge _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ with the bubble queue ahead", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Merge\"", - "", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Fix the gap", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Get information about the queue positions." }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - }, - { - "type": { - "value": "ModVarScene" + "value": "VarObjet" }, "parameters": [ - "firstBubbleSpeed", + "Object", + "FreedDistance", "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "" + "32" ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::HasOnTop" + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" }, "parameters": [ "", @@ -4940,17 +5319,82 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] } ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "ModVarObjet" }, "parameters": [ - "lastBubblePathPosition", + "Object", + "PositionOnPath", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "Speed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "QueueIndex", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" + "Gutter.ObjectStack::HeightOf(BubbleQueue)" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"BubbleIndex: \" + Object.VariableString(BubbleIndex)", + "", + "" + ] + } ] } ] @@ -4965,46 +5409,135 @@ "textG": 0, "textR": 0 }, - "comment": "Fix the gap between the 2 bubble queues." + "comment": "Actually insert the bubble in the queue." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "ObjectStack::ContainsBetween" }, "parameters": [ "", - "BubbleQueue", + "Gutter", "ObjectStack", - "BoardBubble", + "BubbleQueue", + "Object.Variable(QueueIndex)", + "Object.Variable(QueueIndex)", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "+", - "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "BoardBubble", + "Object.AnimationName()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Variable(PositionOnPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Object.Variable(BubbleIndex)", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object", + "" + ] + } ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "Smoothy::MatchBubbles" }, "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", "BoardBubble", "SpeedPathMovement", - "=", - "Variable(firstBubbleSpeed)", + "Object.Variable(QueueIndex)", + "Object.Variable(BubbleIndex)", + "BubbleClipboard", + "ObjectStack", "" ] } @@ -5013,71 +5546,157 @@ ] } ], - "parameters": [] + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Merge the queues", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "fullName": "Animation finished", + "functionType": "Condition", + "name": "IsAnimationFinished", + "sentence": "The insertion animation of _PARAM0_ is finished", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "VarObjet" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\")", - "" + "Object", + "FreedDistance", + "=", + "32" ] } ], "actions": [ { "type": { - "value": "ObjectStack::ObjectStack::MoveAllOnTop" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "ObjectStack" - ] - }, - { - "type": { - "value": "Delete" + "value": "SetReturnBoolean" }, "parameters": [ - "BubbleQueue", - "" + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Create bubble", + "functionType": "Action", + "name": "CreateBubble", + "sentence": "Replace _PARAM0_ by a new _PARAM6_ into _PARAM4_ from _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] } @@ -5085,81 +5704,181 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "ModVarObjet" }, "parameters": [ - "insertedBubbleIndex", + "Object", + "PositionOnPath", "=", - "BubbleQueue.ObjectStack::Height() - 1" + "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" ] }, { "type": { - "value": "ObjectStack::ObjectStack::MoveAllOnTop" + "value": "ModVarObjet" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "BubbleClipboard", - "ObjectStack", - "ObjectStack" + "Object", + "Speed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ModVarObjet" }, - "comment": "Check for a match at the junction." + "parameters": [ + "Object", + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] }, { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "QueueIndex", + "=", + "Gutter.ObjectStack::HeightOf(BubbleQueue)" + ] + } + ], + "events": [ + { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" + "\"BubbleIndex: \" + Object.VariableString(BubbleIndex)", + "", + "" ] } - ], + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Actually insert the bubble in the queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Object.Variable(QueueIndex)", + "Object.Variable(QueueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "Create" }, "parameters": [ - "BubbleQueue", - "IsRewinding", + "", + "BoardBubble", + "Object.SpeedPathMovement::PathOriginX()", + "Object.SpeedPathMovement::PathOriginY()", "" ] }, { "type": { - "value": "Smoothy::MatchBubbles" + "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "BoardBubble", + "Object.AnimationName()" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ "BoardBubble", "SpeedPathMovement", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "Variable(insertedBubbleIndex)", - "BubbleClipboard", + "=", + "Object.Variable(PositionOnPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Variable(Speed)", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "BubbleQueue", "ObjectStack", + "BoardBubble", + "Object.Variable(BubbleIndex)", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object", "" ] } @@ -5168,211 +5887,157 @@ ] } ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "SpeedPathMovement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Tailling bubble queue index", - "name": "TaillingQueueIndex", - "type": "expression" - }, - { - "description": "Bubble clipboard", - "name": "BubbleClipboard", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "Queue match", - "functionType": "Condition", - "name": "IsQueueMatching", - "sentence": "_PARAM5_ from _PARAM1_ at the tail of _PARAM3_ number _PARAM7_ is matching the bubble at the head of the previous queue", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"LeadingQueueIndex\") + 1", - "" - ] + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" }, { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" } ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "firstBubbleColor", - "=", - "BoardBubble.AnimationName()" - ] - } - ] + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Return the index of the queue where the bubble was inserted.", + "fullName": "Queue index", + "functionType": "Expression", + "name": "QueueIndex", + "sentence": "", + "events": [ { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"LeadingQueueIndex\")", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(QueueIndex)" + ] + } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" }, { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(firstBubbleColor)" - ] + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" } ], - "actions": [ + "objectGroups": [] + }, + { + "description": "Return the index of the inserted bubble in the queue.", + "fullName": "Bubble index", + "functionType": "Expression", + "name": "BubbleIndex", + "sentence": "", + "events": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(BubbleIndex)" + ] + } ] } - ] + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubble", + "type": "behavior" + } + ], + "objectGroups": [] } ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "SpeedPathMovement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, + "propertyDescriptors": [ { - "description": "Leading bubble queue index", - "name": "LeadingQueueIndex", - "supplementaryInformation": "Sprite", - "type": "expression" + "value": "", + "type": "Behavior", + "label": "Speed path movement", + "description": "", + "group": "", + "extraInformation": [ + "CurvedMovement::SpeedPathMovement" + ], + "hidden": false, + "name": "SpeedPathMovement" } ], - "objectGroups": [] + "sharedPropertyDescriptors": [] } ], - "eventsBasedBehaviors": [], "eventsBasedObjects": [] }, { @@ -13917,6 +14582,88 @@ } ], "objectGroups": [] + }, + { + "description": "Return the path origin on X axis of the object.", + "fullName": "Path origin X", + "functionType": "Expression", + "group": "Movement on a curve (speed-based) configuration", + "name": "PathOriginX", + "sentence": "the path origin on X axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPathOriginX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the path origin on Y axis of the object.", + "fullName": "Path origin Y", + "functionType": "Expression", + "group": "Movement on a curve (speed-based) configuration", + "name": "PathOriginY", + "sentence": "the path origin on Y axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPathOriginY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ From eb43433c404d1ea7147a957a76da2aef355a202a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 17:51:38 +0200 Subject: [PATCH 020/114] Handle bubbles going back to the start. --- examples/smoothy/smoothy.json | 163 +++++++++++++++++++++++++++++++++- 1 file changed, 162 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 78df104e2..e5790c7cb 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2039,6 +2039,17 @@ "BubbleQueue", "" ] + }, + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "0.9", + "", + "" + ] } ], "events": [ @@ -2250,6 +2261,18 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2288,6 +2311,28 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "32", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"First bubble\"", + "", + "" + ] } ] } @@ -3260,7 +3305,7 @@ "BoardBubble", "SpeedPathMovement", "-200", - "800", + "-800", "" ] } @@ -3268,6 +3313,122 @@ } ], "parameters": [] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Space" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "-100", + "-800", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO What if the queue is rewinded completly?" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] } ], "layers": [ From 0b0a961f55c7e69203a3eb98d50252f5e0ea92fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 31 May 2023 21:19:39 +0200 Subject: [PATCH 021/114] Add the beginning deceleration. --- examples/smoothy/smoothy.json | 172 ++++++++++++++++++++++++++++------ 1 file changed, 142 insertions(+), 30 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index e5790c7cb..63e5e1a42 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2042,17 +2042,34 @@ }, { "type": { - "value": "ZoomCamera" + "value": "ModVarSceneTxt" }, "parameters": [ - "", - "0.9", - "", - "" + "TaillingQueueState", + "=", + "\"Starting\"" ] } ], "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "0.9", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -2312,18 +2329,6 @@ "" ] }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "32", - "" - ] - }, { "type": { "value": "DebuggerTools::ConsoleLog" @@ -2334,6 +2339,67 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "1067", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "88.9", + "" + ] + } + ] + } ] } ] @@ -2536,21 +2602,67 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "50", - "100", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "89.9", + "-889", + "" + ] + } ] - } - ], - "events": [ + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "88.9", + "88.9", + "" + ] + } + ] + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", From 332db622dd842c62d706b787e9b8be32ab5c3baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 00:08:41 +0200 Subject: [PATCH 022/114] Tweak timing of bubble throwing. --- examples/smoothy/smoothy.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 63e5e1a42..f4c7518bb 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2960,7 +2960,7 @@ "AimingBubble.Y()", "MovingBubble", "Launcher.Turret::AimingAngle()", - "300", + "690", "" ] }, @@ -5336,7 +5336,7 @@ "Object", "FreedDistance", "=", - "min(Object.Variable(FreedDistance) + 32 * TimeDelta() * 3, 32)" + "min(Object.Variable(FreedDistance) + 32 * TimeDelta() * 5, 32)" ] } ], From 1c44994e39a7115e050c905dd9be0be348ca1d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 03:30:07 +0200 Subject: [PATCH 023/114] Add some todo about combos. --- examples/smoothy/smoothy.json | 599 ++++++++++++++++++++++++++++++---- 1 file changed, 540 insertions(+), 59 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f4c7518bb..f6c05ef0e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -224,39 +224,7 @@ "zoomFactor": 0.6627256836254674, "windowMask": false }, - "objectsGroups": [ - { - "name": "LevelBubble", - "objects": [ - { - "name": "BlueBubble" - }, - { - "name": "YellowBubble" - }, - { - "name": "GreenBubble" - }, - { - "name": "PurpuleBubble" - }, - { - "name": "RedBubble" - } - ] - }, - { - "name": "LinkedBubble", - "objects": [ - { - "name": "BoardBubble" - }, - { - "name": "StartLocation" - } - ] - } - ], + "objectsGroups": [], "variables": [ { "name": "neighbors", @@ -1840,6 +1808,12 @@ "variables": [], "effects": [], "behaviors": [ + { + "name": "BubbleQueue", + "type": "Smoothy::BubbleQueue", + "State": "Idle", + "ComboLevel": 0 + }, { "name": "ObjectStack", "type": "ObjectStack::ObjectStack" @@ -3095,6 +3069,18 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Make \"match\" a condition that picks the bubbles." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3146,6 +3132,23 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Check for rewind here?\n- between the split queues\n- or a new leading or tailing inserted bubble\n\nWhat if one of the queue became empty?" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ], "parameters": [] @@ -3213,33 +3216,137 @@ ] } ], - "actions": [ - { - "type": { - "value": "Smoothy::MergeQueue" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO No need to match?\n\nKeep the state of the tailling queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MergeQueue" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "BubbleQueue", + "IsRewinding", + "True" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Match tailling bubbles and leading bubbles as a condition.\n\nQueue won't be merged so states are preserved.\nIncrease the combo level of the leading queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Check for rewind here?" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ] + } ] } ] @@ -3274,6 +3381,18 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO It won't be necessary to check for rewind every frame?\n\nOr we keep this and reset the combo level when no rewind happend." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -3589,6 +3708,10 @@ } ], "behaviorsSharedData": [ + { + "name": "BubbleQueue", + "type": "Smoothy::BubbleQueue" + }, { "name": "FireBullet", "type": "FireBullet::FireBullet" @@ -6309,6 +6432,364 @@ } ], "sharedPropertyDescriptors": [] + }, + { + "description": "", + "fullName": "", + "name": "BubbleQueue", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "Update bubble speed", + "functionType": "Action", + "name": "SetBubblesSpeed", + "sentence": "Update speed of _PARAM2_ from _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "", + "", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Split\"", + ">=", + "0.3" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewind\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Split\"", + ">=", + "0.3 + 0.1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewind\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "Idle", + "type": "Choice", + "label": "State", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "JustSplit", + "HitStop", + "Rewind" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Combo level", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ComboLevel" + } + ], + "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] From 4cf4711e357ac48090c6d3e39848c16181646fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 17:35:08 +0200 Subject: [PATCH 024/114] WIP: Rewind animation FSM. --- examples/smoothy/smoothy.json | 2168 ++++++++++++++++++++++++++------- 1 file changed, 1735 insertions(+), 433 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f6c05ef0e..6164b68e6 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2520,145 +2520,6 @@ ], "parameters": [] }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "50", - "100", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "89.9", - "-889", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "VarSceneTxt" - }, - "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "88.9", - "88.9", - "" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Move\"", - "", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3255,11 +3116,11 @@ { "type": { "inverted": true, - "value": "ObjectVariableAsBoolean" + "value": "Smoothy::BubbleQueue::ShouldRewind" }, "parameters": [ "BubbleQueue", - "IsRewinding", + "BubbleQueue", "True" ] } @@ -3274,13 +3135,13 @@ "Gutter", "ObjectStack", "BubbleQueue", + "", "ObjectStack", "BoardBubble", "SpeedPathMovement", "Variable(queueIndex)", "BubbleClipboard", - "ObjectStack", - "" + "ObjectStack" ] }, { @@ -3300,11 +3161,11 @@ "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "Smoothy::BubbleQueue::ShouldRewind" }, "parameters": [ "BubbleQueue", - "IsRewinding", + "BubbleQueue", "True" ] } @@ -3445,75 +3306,275 @@ "Variable(queueIndex)", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ + "\"Rewind\"", "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", "" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "yes", + "" + ] + } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetLeadingQueueShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "yes", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "inverted": true, + "value": "Smoothy::IsQueueMatching" }, "parameters": [ - "\"Rewind\"", "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "queueIndex", - "-", - "1" + "\"Stop rewind\"", + "", + "" ] } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" - ] - }, + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetLeadingQueueShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "no", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::ShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::LeadingQueueShouldRewind" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetBubblesSpeed" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, { "type": { "value": "ObjectStack::Contains" @@ -3525,21 +3586,80 @@ "BoardBubble", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "inverted": true, + "value": "Smoothy::BubbleQueue::LeadingQueueShouldRewind" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "-200", - "-800", + "BubbleQueue", + "BubbleQueue", "" ] } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "89.9", + "-889", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "88.9", + "88.9", + "" + ] + } + ] + } ] } ], @@ -4694,7 +4814,7 @@ "fullName": "Merge queue", "functionType": "Action", "name": "MergeQueue", - "sentence": "Merge _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ with the bubble queue ahead", + "sentence": "Merge _PARAM6_ from _PARAM1_ at _PARAM3_ number _PARAM8_ with the bubble queue ahead", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4921,6 +5041,26 @@ } ], "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "tailState", + "=", + "BubbleQueue.BubbleQueue::TailState()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "tailComboLevel", + "=", + "BubbleQueue.BubbleQueue::TailComboLevel()" + ] + }, { "type": { "value": "ObjectStack::ObjectStack::MoveAllOnTop" @@ -4983,6 +5123,30 @@ "ObjectStack", "ObjectStack" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetTailState" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "=", + "VariableString(tailState)", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetTailComboLevel" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueue", + "=", + "Variable(tailComboLevel)", + "" + ] } ], "events": [ @@ -5069,8 +5233,14 @@ "type": "objectList" }, { - "description": "Object stack behavior", - "name": "ObjectStack", + "description": "Bubble queue behavior", + "name": "BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", "supplementaryInformation": "ObjectStack::ObjectStack", "type": "behavior" }, @@ -6443,303 +6613,1409 @@ "fullName": "Update bubble speed", "functionType": "Action", "name": "SetBubblesSpeed", - "sentence": "Update speed of _PARAM2_ from _PARAM0_", + "sentence": "Update speed of _PARAM2_ from _PARAM0_ for the rewind animation", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::PropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "ObjectStack::Contains" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "", "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::PropertyState" - }, - "parameters": [ "Object", - "Behavior", - "=", - "\"Rewind\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ + "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "", - "", "" ] } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "type": "objectList" - }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Object", - "\"Split\"", - ">=", - "0.3" - ] - } ], "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::PropertyComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ] + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Tail state have precedence over head state." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyComboLevel" + "value": "Smoothy::BubbleQueue::PropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "1" + "\"Idle\"" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueue::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewind\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "88.9", + "88.9", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { - "type": { - "value": "Smoothy::BubbleQueue::PropertyComboLevel" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "Behavior", - ">", - "1" - ] - } - ], - "actions": [ + "comment": "Keep the same speed." + }, { - "type": { - "value": "Smoothy::BubbleQueue::SetPropertyState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep the same speed." + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEnd\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Behavior::ImpactSpeed()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "-444", + "-1333", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tail state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"", + ">=", + "0.3" + ] } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewind\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"TailStop\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"", + ">=", + "0.3 + 0.1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEnd\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEnd\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewind\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Head state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"", + ">=", + "0.3" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"", + ">=", + "0.3 + 0.1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the speed to give to the queue when it collides after a rewind.", + "fullName": "Impact speed", + "functionType": "Expression", + "name": "ImpactSpeed", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "min(-400, -133.3 * Object.Behavior::PropertyTailComboLevel())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Should rewind", + "functionType": "Action", + "name": "SetShouldRewind", + "sentence": "_PARAM0_ should rewind: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldRewind\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldRewind\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + }, + { + "description": "Should rewind", + "name": "ShouldRewind", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "Leading queue should rewind", + "functionType": "Action", + "name": "SetLeadingQueueShouldRewind", + "sentence": "The leading queue of _PARAM0_ should rewind: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldRewind\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldRewind\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + }, + { + "description": "Should rewind", + "name": "ShouldRewind", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "Should rewind", + "functionType": "Condition", + "name": "ShouldRewind", + "sentence": "_PARAM0_ should rewind", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Leading queue should rewind", + "functionType": "Condition", + "name": "LeadingQueueShouldRewind", + "sentence": "The leading queue of _PARAM0_ should rewind", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the tail state of the object. It should only be used by this extension.", + "fullName": "Tail state", + "functionType": "ExpressionAndCondition", + "group": "BubbleQueue configuration", + "name": "TailState", + "sentence": "the tail state", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyTailState()" ] } ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Idle\",\"JustSplit\",\"HitStop\",\"HitStopEnd\",\"Rewinding\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TailState", + "name": "SetTailState", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyState" + "value": "Smoothy::BubbleQueue::SetPropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStop\"" + "GetArgumentAsString(\"Value\")" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the head state of the object. It should only be used by this extension.", + "fullName": "Head state", + "functionType": "ExpressionAndCondition", + "group": "BubbleQueue configuration", + "name": "HeadState", + "sentence": "the head state", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "CompareObjectTimer" + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyHeadState()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"Idle\",\"JustSplit\",\"HitStop\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HeadState", + "name": "SetHeadState", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyHeadState" }, "parameters": [ "Object", - "\"Split\"", - ">=", - "0.3 + 0.1" + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" ] } - ], + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the tail combo level of the object.", + "fullName": "Tail combo level", + "functionType": "ExpressionAndCondition", + "group": "BubbleQueue configuration", + "name": "TailComboLevel", + "sentence": "the tail combo level", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTailComboLevel()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "TailComboLevel", + "name": "SetTailComboLevel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the head combo level of the object.", + "fullName": "Head combo level", + "functionType": "ExpressionAndCondition", + "group": "BubbleQueue configuration", + "name": "HeadComboLevel", + "sentence": "the head combo level", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeadComboLevel()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueue", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "HeadComboLevel", + "name": "SetHeadComboLevel", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyState" + "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" }, "parameters": [ "Object", "Behavior", "=", - "\"Rewind\"" + "GetArgumentAsNumber(\"Value\")" ] } ] @@ -6765,28 +8041,54 @@ { "value": "Idle", "type": "Choice", - "label": "State", + "label": "Tail state", "description": "", "group": "", "extraInformation": [ "Idle", "JustSplit", "HitStop", - "Rewind" + "HitStopEnd", + "Rewinding" + ], + "hidden": true, + "name": "TailState" + }, + { + "value": "Idle", + "type": "Choice", + "label": "Head state", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "JustSplit", + "HitStop" ], "hidden": true, - "name": "State" + "name": "HeadState" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Tail combo level", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TailComboLevel" }, { "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Combo level", + "label": "Head combo level", "description": "", "group": "", "extraInformation": [], "hidden": true, - "name": "ComboLevel" + "name": "HeadComboLevel" } ], "sharedPropertyDescriptors": [] From 438f05d9ab79a28d706bbf650ed000f619a1da00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 18:25:35 +0200 Subject: [PATCH 025/114] WIP: before making "match" a condition. --- examples/smoothy/smoothy.json | 844 +++++++++++++++++++++++++++++++--- 1 file changed, 769 insertions(+), 75 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 6164b68e6..7542bbd9e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2993,23 +2993,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Check for rewind here?\n- between the split queues\n- or a new leading or tailing inserted bubble\n\nWhat if one of the queue became empty?" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] } ], "parameters": [] @@ -3108,14 +3091,13 @@ "textG": 0, "textR": 0 }, - "comment": "TODO No need to match?\n\nKeep the state of the tailling queue." + "comment": "TODO Match tailling bubbles and leading bubbles as a condition.\n\nQueue won't be merged so states are preserved.\nIncrease the combo level of the leading queue." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, "value": "Smoothy::BubbleQueue::ShouldRewind" }, "parameters": [ @@ -3128,39 +3110,49 @@ "actions": [ { "type": { - "value": "Smoothy::MergeQueue" + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BubbleQueue" + ] + }, + { + "type": { + "value": "Smoothy::MatchBubblesBetween" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "", "ObjectStack", "BoardBubble", "SpeedPathMovement", "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" + "" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Use \"match\" as a condition and merge if no match." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { + "inverted": true, "value": "Smoothy::BubbleQueue::ShouldRewind" }, "parameters": [ @@ -3170,41 +3162,43 @@ ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "AjoutObjConcern" }, - "comment": "TODO Match tailling bubbles and leading bubbles as a condition.\n\nQueue won't be merged so states are preserved.\nIncrease the combo level of the leading queue." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "parameters": [ + "", + "BubbleQueue" + ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Smoothy::MergeQueue" }, - "comment": "TODO Check for rewind here?" + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] } ] } @@ -3242,18 +3236,6 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO It won't be necessary to check for rewind every frame?\n\nOr we keep this and reset the combo level when no rewind happend." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -4045,7 +4027,7 @@ "textG": 0, "textR": 0 }, - "comment": "Scan bubbles of the same color toward tail." + "comment": "Scan bubbles of the same color toward the head." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4172,7 +4154,7 @@ "textG": 0, "textR": 0 }, - "comment": "Scan bubbles of the same color toward head." + "comment": "Scan bubbles of the same color toward the tail." }, { "type": "BuiltinCommonInstructions::Standard", @@ -4592,6 +4574,718 @@ ], "objectGroups": [] }, + { + "fullName": "Match bubbles bewteen 2 queues", + "functionType": "Action", + "name": "MatchBubblesBetween", + "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ and the bubble queue ahead", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Scan bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan the leading queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\") - 1", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "bubbleColor", + "=", + "BoardBubble.AnimationName()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward the head." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "=", + "BubbleQueue.ObjectStack::Height()" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(bubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "matchingBubbleCount", + "=", + "BubbleQueue.ObjectStack::Height() - Variable(lowerIndex)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan the tailling queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward the tail." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(bubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "matchingBubbleCount", + "+", + "Variable(upperIndex)" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Remove bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "matchingBubbleCount", + ">=", + "3" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\") - 1", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "BubbleQueue.ObjectStack::Height() - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "Variable(upperIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Tailling queue index", + "name": "TaillingQueueIndex", + "type": "expression" + } + ], + "objectGroups": [] + }, { "fullName": "Queue collision", "functionType": "Condition", From 08884a97c188318e329355384ad06efc6aba9d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 19:05:24 +0200 Subject: [PATCH 026/114] WIP: "Match" as a condition. --- examples/smoothy/smoothy.json | 959 ++++++++++++++++++++++++++++------ 1 file changed, 788 insertions(+), 171 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 7542bbd9e..240f765df 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2930,18 +2930,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Make \"match\" a condition that picks the bubbles." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2972,25 +2960,45 @@ "SpeedPathMovement", "" ] - }, + } + ], + "events": [ { - "type": { - "value": "Smoothy::MatchBubbles" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "InsertedBubble.InsertedBubble::QueueIndex()", - "InsertedBubble.InsertedBubble::BubbleIndex()", - "BubbleClipboard", - "ObjectStack", - "" - ] + "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "InsertedBubble.InsertedBubble::QueueIndex()", + "InsertedBubble.InsertedBubble::BubbleIndex()", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [] } ] } @@ -3002,7 +3010,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Merge queues", + "name": "Queues collision", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -3062,144 +3070,105 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "Smoothy::MatchBubblesBetween" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", "Variable(queueIndex)", "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetSceneVariableAsBoolean" }, - "comment": "TODO Match tailling bubbles and leading bubbles as a condition.\n\nQueue won't be merged so states are preserved.\nIncrease the combo level of the leading queue." - }, + "parameters": [ + "areBubblesMatched", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueue::ShouldRewind" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueue", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "Smoothy::MatchBubblesBetween" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Smoothy::MergeQueue" }, - "comment": "TODO Use \"match\" as a condition and merge if no match." + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueue::ShouldRewind" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueue", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BubbleQueue" - ] - }, - { - "type": { - "value": "Smoothy::MergeQueue" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" ] } ] @@ -3946,7 +3915,7 @@ { "fullName": "Match bubbles", "functionType": "Action", - "name": "MatchBubbles", + "name": "MatchBubblesOld", "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", "events": [ { @@ -4575,33 +4544,672 @@ "objectGroups": [] }, { - "fullName": "Match bubbles bewteen 2 queues", - "functionType": "Action", - "name": "MatchBubblesBetween", - "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ and the bubble queue ahead", + "fullName": "Match bubbles", + "functionType": "Condition", + "name": "MatchBubbles", + "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Scan bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ObjectStack::ContainsAt" }, - "comment": "Scan the leading queue." - }, - { + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "_SmoothyExtension.BubbleColor", + "=", + "BoardBubble.AnimationName()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward the head." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "lowerIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(lowerIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan bubbles of the same color toward the tail." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "=", + "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "False" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "upperIndex", + "<", + "BubbleQueue.ObjectStack::Height() - 1" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(upperIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(_SmoothyExtension.BubbleColor)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "foundOtherColor", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the leading bubbles in a new BubbleQueue.\n\nA new BubbleQueue can't be modified directly because another BubbleQueue is already picked.\nInstead, the leading bubbles are moved into a temporary queue BubbleClipboard." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsBetween" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(lowerIndex)", + "Variable(upperIndex)", + "" + ] + }, + { + "type": { + "value": "PickedInstancesCount" + }, + "parameters": [ + "BoardBubble", + ">=", + "3" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveInto" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "0", + "BubbleQueue", + "ObjectStack", + "0", + "Variable(lowerIndex) -1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleClipboard", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Now that no BubbleQueue is picked, a new one can be created." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-64", + "-64", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::MoveAllInto" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "0", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Insert in Gutter\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Inserted bubble queue index", + "name": "InsertedBubbleQueueIndex", + "type": "expression" + }, + { + "description": "Inserted bubble index", + "name": "InsertedBubbleIndex", + "supplementaryInformation": "Sprite", + "type": "expression" + }, + { + "description": "Bubble clipboard", + "name": "BubbleClipboard", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Match bubbles bewteen 2 queues", + "functionType": "Condition", + "name": "MatchBubblesBetween", + "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ and the bubble queue ahead", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Scan bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Scan the leading queue." + }, + { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -5032,7 +5640,16 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5883,7 +6500,7 @@ }, { "type": { - "value": "Smoothy::MatchBubbles" + "value": "Smoothy::MatchBubblesOld" }, "parameters": [ "", @@ -6784,7 +7401,7 @@ "actions": [ { "type": { - "value": "Smoothy::MatchBubbles" + "value": "Smoothy::MatchBubblesOld" }, "parameters": [ "", From 897964dd25e3adcb942b6292662899c0f545ccb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 1 Jun 2023 19:31:52 +0200 Subject: [PATCH 027/114] WIP: fix some behavior parameters. --- examples/smoothy/smoothy.json | 1130 +++++++-------------------------- 1 file changed, 221 insertions(+), 909 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 240f765df..70e611fec 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1482,7 +1482,7 @@ "behaviors": [ { "name": "InsertedBubble", - "type": "Smoothy::InsertedBubble", + "type": "Smoothy::InsertedBubbleBehavior", "SpeedPathMovement": "SpeedPathMovement" }, { @@ -1809,10 +1809,12 @@ "effects": [], "behaviors": [ { - "name": "BubbleQueue", - "type": "Smoothy::BubbleQueue", - "State": "Idle", - "ComboLevel": 0 + "name": "BubbleQueueBehavior", + "type": "Smoothy::BubbleQueueBehavior", + "TailState": "Idle", + "HeadState": "Idle", + "TailComboLevel": 0, + "HeadComboLevel": 0 }, { "name": "ObjectStack", @@ -2875,7 +2877,7 @@ }, { "type": { - "value": "Smoothy::InsertedBubble::Initialize" + "value": "Smoothy::InsertedBubbleBehavior::Initialize" }, "parameters": [ "InsertedBubble", @@ -2902,7 +2904,7 @@ { "type": { "inverted": true, - "value": "Smoothy::InsertedBubble::IsAnimationFinished" + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" }, "parameters": [ "InsertedBubble", @@ -2914,7 +2916,7 @@ "actions": [ { "type": { - "value": "Smoothy::InsertedBubble::PlayInsertion" + "value": "Smoothy::InsertedBubbleBehavior::PlayInsertion" }, "parameters": [ "InsertedBubble", @@ -2935,7 +2937,7 @@ "conditions": [ { "type": { - "value": "Smoothy::InsertedBubble::IsAnimationFinished" + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" }, "parameters": [ "InsertedBubble", @@ -2947,7 +2949,7 @@ "actions": [ { "type": { - "value": "Smoothy::InsertedBubble::CreateBubble" + "value": "Smoothy::InsertedBubbleBehavior::CreateBubble" }, "parameters": [ "InsertedBubble", @@ -3152,13 +3154,14 @@ "Gutter", "ObjectStack", "BubbleQueue", - "", + "BubbleQueueBehavior", "ObjectStack", "BoardBubble", "SpeedPathMovement", "Variable(queueIndex)", "BubbleClipboard", - "ObjectStack" + "ObjectStack", + "" ] }, { @@ -3292,11 +3295,11 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "yes", "" ] @@ -3323,11 +3326,11 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetLeadingQueueShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetLeadingQueueShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "yes", "" ] @@ -3390,11 +3393,11 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "no", "" ] @@ -3421,11 +3424,11 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetLeadingQueueShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetLeadingQueueShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "no", "" ] @@ -3475,21 +3478,21 @@ "subInstructions": [ { "type": { - "value": "Smoothy::BubbleQueue::ShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::ShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "" ] }, { "type": { - "value": "Smoothy::BubbleQueue::LeadingQueueShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::LeadingQueueShouldRewind" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "" ] } @@ -3499,7 +3502,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetBubblesSpeed" + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" }, "parameters": [ "BubbleQueue", @@ -3528,24 +3531,24 @@ }, { "type": { - "value": "ObjectStack::Contains" + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::LeadingQueueShouldRewind" }, "parameters": [ - "", "BubbleQueue", - "ObjectStack", - "BoardBubble", + "BubbleQueueBehavior", "" ] }, { "type": { - "inverted": true, - "value": "Smoothy::BubbleQueue::LeadingQueueShouldRewind" + "value": "ObjectStack::Contains" }, "parameters": [ + "", "BubbleQueue", - "BubbleQueue", + "ObjectStack", + "BoardBubble", "" ] } @@ -3780,8 +3783,8 @@ ], "behaviorsSharedData": [ { - "name": "BubbleQueue", - "type": "Smoothy::BubbleQueue" + "name": "BubbleQueueBehavior", + "type": "Smoothy::BubbleQueueBehavior" }, { "name": "FireBullet", @@ -3789,760 +3792,129 @@ }, { "name": "InsertedBubble", - "type": "Smoothy::InsertedBubble" + "type": "Smoothy::InsertedBubbleBehavior" }, { "name": "ObjectStack", "type": "ObjectStack::ObjectStack" }, - { - "name": "SpeedPathMovement", - "type": "CurvedMovement::SpeedPathMovement" - }, - { - "name": "Turret", - "type": "Turret::Turret" - } - ] - } - ], - "externalEvents": [ - { - "associatedLayout": "Game", - "lastChangeTimeStamp": 0, - "name": "UpdateRemainingColors", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "VariableClearChildren" - }, - "parameters": [ - "remainingColors" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "colors", - "valueIteratorVariableName": "color", - "keyIteratorVariableName": "index", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(color)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SceneVariablePushString" - }, - "parameters": [ - "remainingColors", - "VariableString(color)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "VariableChildCount(remainingColors)", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "levelCompleted", - "True" - ] - } - ] - } - ] - } - ], - "eventsFunctionsExtensions": [ - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "Smoothy", - "helpPath": "", - "iconUrl": "", - "name": "Smoothy", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "Originally automatically extracted from events of the project", - "tags": [], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [ - { - "fullName": "Match bubbles", - "functionType": "Action", - "name": "MatchBubblesOld", - "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "_SmoothyExtension.BubbleColor", - "=", - "BoardBubble.AnimationName()" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Scan bubbles of the same color toward the head." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "=", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "lowerIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "-", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(lowerIndex)", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(_SmoothyExtension.BubbleColor)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "+", - "1" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Scan bubbles of the same color toward the tail." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "=", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "False" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "upperIndex", - "<", - "BubbleQueue.ObjectStack::Height() - 1" - ] - } - ], - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(upperIndex)", - "Variable(upperIndex)", - "" - ] - }, - { - "type": { - "inverted": true, - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(_SmoothyExtension.BubbleColor)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "foundOtherColor", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "-", - "1" - ] - } - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Move the leading bubbles in a new BubbleQueue.\n\nA new BubbleQueue can't be modified directly because another BubbleQueue is already picked.\nInstead, the leading bubbles are moved into a temporary queue BubbleClipboard." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Variable(lowerIndex)", - "Variable(upperIndex)", - "" - ] - }, - { - "type": { - "value": "PickedInstancesCount" - }, - "parameters": [ - "BoardBubble", - ">=", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveInto" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "0", - "BubbleQueue", - "ObjectStack", - "0", - "Variable(lowerIndex) -1", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleClipboard", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Now that no BubbleQueue is picked, a new one can be created." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BubbleQueue", - "-64", - "-64", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::MoveAllInto" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "0", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Insert in Gutter\"", - "", - "" - ] - } - ] - } - ] - }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement" + }, + { + "name": "Turret", + "type": "Turret::Turret" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Game", + "lastChangeTimeStamp": 0, + "name": "UpdateRemainingColors", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "VariableClearChildren" }, - "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." - }, + "parameters": [ + "remainingColors" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "colors", + "valueIteratorVariableName": "color", + "keyIteratorVariableName": "index", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - } + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(color)" ] } ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Inserted bubble queue index", - "name": "InsertedBubbleQueueIndex", - "type": "expression" - }, - { - "description": "Inserted bubble index", - "name": "InsertedBubbleIndex", - "supplementaryInformation": "Sprite", - "type": "expression" - }, + "actions": [ { - "description": "Bubble clipboard", - "name": "BubbleClipboard", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, + "type": { + "value": "SceneVariablePushString" + }, + "parameters": [ + "remainingColors", + "VariableString(color)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" + "type": { + "value": "Egal" + }, + "parameters": [ + "VariableChildCount(remainingColors)", + "=", + "0" + ] } ], - "objectGroups": [] - }, + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "levelCompleted", + "True" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "Smoothy", + "helpPath": "", + "iconUrl": "", + "name": "Smoothy", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "Originally automatically extracted from events of the project", + "tags": [], + "authorIds": [], + "dependencies": [], + "eventsFunctions": [ { "fullName": "Match bubbles", "functionType": "Condition", @@ -6359,7 +5731,7 @@ "parameters": [ "tailState", "=", - "BubbleQueue.BubbleQueue::TailState()" + "BubbleQueue.BubbleQueueBehavior::TailState()" ] }, { @@ -6369,7 +5741,7 @@ "parameters": [ "tailComboLevel", "=", - "BubbleQueue.BubbleQueue::TailComboLevel()" + "BubbleQueue.BubbleQueueBehavior::TailComboLevel()" ] }, { @@ -6437,11 +5809,11 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "=", "VariableString(tailState)", "" @@ -6449,76 +5821,16 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetTailComboLevel" }, "parameters": [ "BubbleQueue", - "BubbleQueue", + "BubbleQueueBehavior", "=", "Variable(tailComboLevel)", "" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check for a match at the junction." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "BubbleQueue", - "IsRewinding", - "" - ] - }, - { - "type": { - "value": "Smoothy::MatchBubblesOld" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", - "Variable(insertedBubbleIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ] - } ] } ], @@ -6545,8 +5857,8 @@ }, { "description": "Bubble queue behavior", - "name": "BubbleQueue", - "supplementaryInformation": "Smoothy::BubbleQueue", + "name": "BubbleQueueBehavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" }, { @@ -6736,7 +6048,7 @@ { "description": "", "fullName": "", - "name": "InsertedBubble", + "name": "InsertedBubbleBehavior", "objectType": "Sprite", "eventsFunctions": [ { @@ -6761,7 +6073,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" } ], @@ -6865,7 +6177,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" }, { @@ -7433,7 +6745,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" }, { @@ -7515,7 +6827,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" } ], @@ -7774,7 +7086,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" }, { @@ -7850,7 +7162,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" } ], @@ -7891,7 +7203,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubble", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" } ], @@ -7917,7 +7229,7 @@ { "description": "", "fullName": "", - "name": "BubbleQueue", + "name": "BubbleQueueBehavior", "objectType": "", "eventsFunctions": [ { @@ -7961,7 +7273,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -7978,7 +7290,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8021,7 +7333,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8038,7 +7350,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8083,7 +7395,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8100,7 +7412,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8130,7 +7442,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8160,7 +7472,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8197,7 +7509,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" }, { @@ -8251,7 +7563,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" }, "parameters": [ "Object", @@ -8264,7 +7576,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8289,7 +7601,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" }, "parameters": [ "Object", @@ -8302,7 +7614,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8318,7 +7630,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" }, "parameters": [ "Object", @@ -8331,7 +7643,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8349,7 +7661,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8373,7 +7685,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8398,7 +7710,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8411,7 +7723,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8465,7 +7777,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" }, "parameters": [ "Object", @@ -8478,7 +7790,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8503,7 +7815,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" }, "parameters": [ "Object", @@ -8516,7 +7828,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8541,7 +7853,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" }, "parameters": [ "Object", @@ -8554,7 +7866,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8572,7 +7884,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8596,7 +7908,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8629,7 +7941,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -8669,7 +7981,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -8694,7 +8006,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8707,7 +8019,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8718,7 +8030,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" }, "parameters": [ "Object", @@ -8744,7 +8056,7 @@ { "type": { "inverted": true, - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8757,7 +8069,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -8768,7 +8080,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" }, "parameters": [ "Object", @@ -8789,7 +8101,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" }, { @@ -8819,7 +8131,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8832,7 +8144,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8843,7 +8155,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" }, "parameters": [ "Object", @@ -8869,7 +8181,7 @@ { "type": { "inverted": true, - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -8882,7 +8194,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -8893,7 +8205,7 @@ }, { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" }, "parameters": [ "Object", @@ -8914,7 +8226,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" }, { @@ -8936,7 +8248,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", @@ -8967,7 +8279,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -8984,7 +8296,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueue::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -9015,7 +8327,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9057,7 +8369,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9076,7 +8388,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", @@ -9097,7 +8409,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9139,7 +8451,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9158,7 +8470,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", @@ -9179,7 +8491,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9220,7 +8532,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9239,7 +8551,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" }, "parameters": [ "Object", @@ -9260,7 +8572,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9301,7 +8613,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], @@ -9320,7 +8632,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueue::SetPropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" }, "parameters": [ "Object", @@ -9341,7 +8653,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueue", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" } ], From ae542afe9ca3b8ca4d95f0c5a942038a565334b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 02:16:54 +0200 Subject: [PATCH 028/114] Fix simple match. --- examples/smoothy/smoothy.json | 866 +++++++++++++++++++++++++++------- 1 file changed, 700 insertions(+), 166 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 70e611fec..f8f771b67 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2989,9 +2989,9 @@ "Gutter", "ObjectStack", "BubbleQueue", + "BubbleQueueBehavior", "ObjectStack", "BoardBubble", - "SpeedPathMovement", "InsertedBubble.InsertedBubble::QueueIndex()", "InsertedBubble.InsertedBubble::BubbleIndex()", "BubbleClipboard", @@ -3467,53 +3467,6 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::ShouldRewind" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::LeadingQueueShouldRewind" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueue", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3529,17 +3482,6 @@ "" ] }, - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::LeadingQueueShouldRewind" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "" - ] - }, { "type": { "value": "ObjectStack::Contains" @@ -3615,6 +3557,91 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "queueIndex", + ">=", + "0" + ] + } + ], + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "BoardBubble", + "SpeedPathMovement", + "Gutter.ObjectStack::Height() - 1 - Variable(queueIndex)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] + } + ] } ], "parameters": [] @@ -4332,35 +4359,14 @@ "Variable(lowerIndex) -1", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleClipboard", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ + }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustSplit" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", + "BubbleQueue", + "BubbleQueueBehavior", "" ] } @@ -4432,6 +4438,16 @@ "ObjectStack", "" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailJustSplit" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "" + ] } ], "events": [ @@ -4510,6 +4526,12 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, + { + "description": "Bubble queue behavior", + "name": "BubbleQueueBehavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + }, { "description": "Object stack behavior", "name": "ObjectStack", @@ -4522,12 +4544,6 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, { "description": "Inserted bubble queue index", "name": "InsertedBubbleQueueIndex", @@ -6047,7 +6063,7 @@ "eventsBasedBehaviors": [ { "description": "", - "fullName": "", + "fullName": "Inserted bubble", "name": "InsertedBubbleBehavior", "objectType": "Sprite", "eventsFunctions": [ @@ -7228,7 +7244,7 @@ }, { "description": "", - "fullName": "", + "fullName": "Bubble queue", "name": "BubbleQueueBehavior", "objectType": "", "eventsFunctions": [ @@ -7236,7 +7252,7 @@ "fullName": "Update bubble speed", "functionType": "Action", "name": "SetBubblesSpeed", - "sentence": "Update speed of _PARAM2_ from _PARAM0_ for the rewind animation", + "sentence": "Update speed of _PARAM2_ from _PARAM0_ for the rewind animation (queue index from tail: _PARAM4_)", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -7256,6 +7272,22 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "GetArgumentAsString(\"QueueIndex\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -7286,6 +7318,7 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -7300,20 +7333,7 @@ ] } ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "88.9", - "88.9", - "" - ] - } - ] + "actions": [] }, { "type": "BuiltinCommonInstructions::Comment", @@ -7345,6 +7365,46 @@ ], "actions": [] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"" + ] + }, + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"QueueIndexFromTail\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -7418,11 +7478,51 @@ "Object", "Behavior", "=", - "\"HitStop\"" + "\"StopOrTaillingPush\"" ] - } - ], - "actions": [ + }, + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"QueueIndexFromTail\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ { "type": { "value": "CurvedMovement::SpeedPathMovement::SetSpeed" @@ -7522,6 +7622,11 @@ "name": "SpeedPathMovement", "supplementaryInformation": "CurvedMovement::SpeedPathMovement", "type": "behavior" + }, + { + "description": "Queue index from tail", + "name": "QueueIndexFromTail", + "type": "expression" } ], "objectGroups": [] @@ -7544,6 +7649,65 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"StopOrTaillingPush --> Idle\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, { "type": { "value": "CompareObjectTimer" @@ -7582,7 +7746,7 @@ "Object", "Behavior", "=", - "\"Idle\"" + "\"StopOrTaillingPush\"" ] }, { @@ -7667,18 +7831,7 @@ "Object", "Behavior", "=", - "\"TailStop\"" - ] - }, - { - "type": { - "value": "CompareObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"", - ">=", - "0.3 + 0.1" + "\"HitStopEnd\"" ] } ], @@ -7691,16 +7844,7 @@ "Object", "Behavior", "=", - "\"HitStopEnd\"" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"TailSplit\"" + "\"Rewind\"" ] } ] @@ -7716,7 +7860,18 @@ "Object", "Behavior", "=", - "\"HitStopEnd\"" + "\"HitStop\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"", + ">=", + "0.3 + 0.1" ] } ], @@ -7729,7 +7884,7 @@ "Object", "Behavior", "=", - "\"Rewind\"" + "\"HitStopEnd\"" ] }, { @@ -7758,6 +7913,46 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, { "type": { "value": "CompareObjectTimer" @@ -7796,7 +7991,7 @@ "Object", "Behavior", "=", - "\"Idle\"" + "\"StopOrTaillingPush\"" ] }, { @@ -8006,13 +8201,32 @@ }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } ] } ], @@ -8038,6 +8252,15 @@ "+", "1" ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] } ] }, @@ -8064,29 +8287,41 @@ "=", "\"Idle\"" ] - } - ], - "actions": [ + }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"Idle\"" + "\"JustSplit\"" ] }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "0" + "\"StopOrTaillingPush\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" + }, + "parameters": [ + "Object", + "Behavior", + "" ] } ] @@ -8131,19 +8366,38 @@ }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [ - { - "type": { + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ @@ -8189,6 +8443,30 @@ "=", "\"Idle\"" ] + }, + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"" + ] } ], "actions": [ @@ -8333,11 +8611,267 @@ ], "objectGroups": [] }, + { + "fullName": "Tail just split", + "functionType": "Action", + "name": "SetTailJustSplit", + "sentence": "Change tail state of _PARAM0_ to just split", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Head just split", + "functionType": "Action", + "name": "SetHeadJustSplit", + "sentence": "Change head state of _PARAM0_ to just split", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Tail idle", + "functionType": "Action", + "name": "SetTailIdle", + "private": true, + "sentence": "Change tail state of _PARAM0_ to idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\" --> Idle\"", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Head idle", + "functionType": "Action", + "name": "SetHeadIdle", + "private": true, + "sentence": "Change head state of _PARAM0_ to idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "the tail state of the object. It should only be used by this extension.", "fullName": "Tail state", "functionType": "ExpressionAndCondition", - "group": "BubbleQueue configuration", + "group": "Bubble queue (private)", "name": "TailState", "sentence": "the tail state", "events": [ @@ -8419,7 +8953,7 @@ "description": "the head state of the object. It should only be used by this extension.", "fullName": "Head state", "functionType": "ExpressionAndCondition", - "group": "BubbleQueue configuration", + "group": "Bubble queue (private)", "name": "HeadState", "sentence": "the head state", "events": [ @@ -8501,7 +9035,6 @@ "description": "the tail combo level of the object.", "fullName": "Tail combo level", "functionType": "ExpressionAndCondition", - "group": "BubbleQueue configuration", "name": "TailComboLevel", "sentence": "the tail combo level", "events": [ @@ -8582,7 +9115,6 @@ "description": "the head combo level of the object.", "fullName": "Head combo level", "functionType": "ExpressionAndCondition", - "group": "BubbleQueue configuration", "name": "HeadComboLevel", "sentence": "the head combo level", "events": [ @@ -8670,6 +9202,7 @@ "extraInformation": [ "Idle", "JustSplit", + "StopOrTaillingPush", "HitStop", "HitStopEnd", "Rewinding" @@ -8686,6 +9219,7 @@ "extraInformation": [ "Idle", "JustSplit", + "StopOrTaillingPush", "HitStop" ], "hidden": true, From 02c7f9d38948326b28ce558859d766e938f8274e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 02:44:05 +0200 Subject: [PATCH 029/114] Fix rewinding. --- examples/smoothy/smoothy.json | 398 +++++++++++++++++++--------------- 1 file changed, 220 insertions(+), 178 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f8f771b67..d4fc3c40b 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -7281,7 +7281,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "GetArgumentAsString(\"QueueIndex\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", + "GetArgumentAsString(\"QueueIndexFromTail\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", "", "" ] @@ -7697,17 +7697,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - }, { "type": { "value": "CompareObjectTimer" @@ -7727,13 +7716,13 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "0" + "\"JustSplit\"" ] } ], @@ -7765,55 +7754,92 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ "Object", "Behavior", "=", - "1" + "\"WillMagnet\"" ] } ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewind\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"WillMagnet --> Rewind\"", + "", + "" + ] + } + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } ] } ] @@ -7844,7 +7870,7 @@ "Object", "Behavior", "=", - "\"Rewind\"" + "\"Rewinding\"" ] } ] @@ -7942,17 +7968,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - }, { "type": { "value": "CompareObjectTimer" @@ -7972,13 +7987,13 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", "Behavior", "=", - "0" + "\"JustSplit\"" ] } ], @@ -8010,64 +8025,83 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", "Behavior", "=", - "1" + "\"WillMagnet\"" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } ] }, { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } ] } ] @@ -8239,7 +8273,7 @@ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"WillMagnet\"" ] }, { @@ -8278,38 +8312,43 @@ }, { "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEnd\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } ] } ], @@ -8404,7 +8443,7 @@ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"WillMagnet\"" ] }, { @@ -8417,6 +8456,15 @@ "+", "1" ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] } ] }, @@ -8434,38 +8482,32 @@ }, { "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - }, - { - "type": { - "inverted": true, - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } ] } ], @@ -8748,7 +8790,7 @@ "Object", "Behavior", "=", - "\"Idle\"" + "\"StopOrTaillingPush\"" ] }, { @@ -8826,7 +8868,7 @@ "Object", "Behavior", "=", - "\"Idle\"" + "\"StopOrTaillingPush\"" ] }, { From 5aadfbea8f75dd90008ca34b4b9ba87f9c1e9524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 03:04:28 +0200 Subject: [PATCH 030/114] Fix combo. --- examples/smoothy/smoothy.json | 89 ++++------------------------------- 1 file changed, 9 insertions(+), 80 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d4fc3c40b..e27a9b13a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3113,9 +3113,8 @@ "BubbleQueue", "ObjectStack", "BoardBubble", - "SpeedPathMovement", "Variable(queueIndex)", - "" + "Variable(queueIndex)" ] } ], @@ -4574,7 +4573,7 @@ "fullName": "Match bubbles bewteen 2 queues", "functionType": "Condition", "name": "MatchBubblesBetween", - "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ and the bubble queue ahead", + "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM6_ and the bubble queue ahead", "events": [ { "colorB": 228, @@ -4609,7 +4608,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\") - 1", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] } @@ -4646,7 +4645,6 @@ ], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4655,7 +4653,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Color: \" + VariableString(_SmoothyExtension.BubbleColor)", + "\"Color: \" + VariableString(bubbleColor)", "", "" ] @@ -4833,7 +4831,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", "" ] } @@ -4978,13 +4976,12 @@ "parameters": [ "matchingBubbleCount", "+", - "Variable(upperIndex)" + "Variable(upperIndex) + 1" ] } ] }, { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4993,7 +4990,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "VariableString(lowerIndex) + \" --> \" + VariableString(upperIndex)", + "\"matchingBubbleCount: \" + VariableString(matchingBubbleCount)", "", "" ] @@ -5051,7 +5048,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\") - 1", + "GetArgumentAsNumber(\"TaillingQueueIndex\") - 1", "" ] } @@ -5087,37 +5084,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] } ] }, @@ -5133,7 +5099,7 @@ "Gutter", "ObjectStack", "BubbleQueue", - "GetArgumentAsNumber(\"InsertedBubbleQueueIndex\")", + "GetArgumentAsNumber(\"TaillingQueueIndex\")", "" ] } @@ -5169,37 +5135,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] } ] }, @@ -5277,12 +5212,6 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, { "description": "Tailling queue index", "name": "TaillingQueueIndex", From bd969a2f8cf53107427f5f5f731ad0bfb60ecf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 03:41:52 +0200 Subject: [PATCH 031/114] Small fix. --- examples/smoothy/smoothy.json | 277 +++++++++++++++++++++------------- 1 file changed, 176 insertions(+), 101 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index e27a9b13a..d9333077d 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3111,10 +3111,11 @@ "Gutter", "ObjectStack", "BubbleQueue", + "BubbleQueueBehavior", "ObjectStack", "BoardBubble", "Variable(queueIndex)", - "Variable(queueIndex)" + "" ] } ], @@ -4573,7 +4574,7 @@ "fullName": "Match bubbles bewteen 2 queues", "functionType": "Condition", "name": "MatchBubblesBetween", - "sentence": "Match _PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM6_ and the bubble queue ahead", + "sentence": "Match _PARAM6_ from _PARAM1_ at _PARAM3_ number _PARAM7_ and the bubble queue ahead", "events": [ { "colorB": 228, @@ -5053,7 +5054,18 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailJustSplit" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5104,7 +5116,18 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustSplit" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5200,6 +5223,12 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, + { + "description": "Bubble queue behavior", + "name": "BubbleQueueBehavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + }, { "description": "Object stack behavior", "name": "ObjectStack", @@ -8238,60 +8267,80 @@ "parameters": [ "\"ShouldRewind\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEnd\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEnd\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" }, "parameters": [ "Object", "Behavior", - "=", - "\"Rewinding\"" + "" ] } ] } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } ] } ], @@ -8408,61 +8457,69 @@ "parameters": [ "\"ShouldRewind\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" }, - "parameters": [], - "subInstructions": [ + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"WillMagnet\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadIdle" }, "parameters": [ "Object", "Behavior", - "=", - "\"HitStop\"" + "" ] } ] } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } ] } ], @@ -8603,17 +8660,6 @@ "\"JustSplit\"" ] }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, { "type": { "value": "ResetObjectTimer" @@ -8623,6 +8669,26 @@ "\"TailSplit\"" ] } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } ] } ], @@ -8662,17 +8728,6 @@ "\"JustSplit\"" ] }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - }, { "type": { "value": "ResetObjectTimer" @@ -8682,6 +8737,26 @@ "\"HeadSplit\"" ] } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } ] } ], From 16e0f6f0a834020362c26935fc1af865fc8df6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 17:44:22 +0200 Subject: [PATCH 032/114] Add new states. --- examples/smoothy/smoothy.json | 485 +++++++++++++++++++++++++++++----- 1 file changed, 412 insertions(+), 73 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d9333077d..ff52af444 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3072,6 +3072,66 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustHit" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailJustHit" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -3295,7 +3355,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" }, "parameters": [ "BubbleQueue", @@ -3326,7 +3386,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetLeadingQueueShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" }, "parameters": [ "BubbleQueue", @@ -3393,7 +3453,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" }, "parameters": [ "BubbleQueue", @@ -3424,7 +3484,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetLeadingQueueShouldRewind" + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" }, "parameters": [ "BubbleQueue", @@ -5285,47 +5345,7 @@ ] } ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "firstBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", - "", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", - "", - "" - ] - } - ] - } - ] + "actions": [] }, { "disabled": true, @@ -5561,6 +5581,35 @@ "BoardBubble.SpeedPathMovement::Speed()" ] } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathPosition: \" + VariableString(firstBubblePathPosition)", + "", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"firstBubblePathColor: \" + BoardBubble.AnimationName()", + "", + "" + ] + } + ] + } ] }, { @@ -7275,6 +7324,18 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Idle state speed is decided in the scene events." + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", @@ -7311,13 +7372,32 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" + ] + } ] } ], @@ -7392,6 +7472,36 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Behavior::ImpactSpeed()", + "" + ] + } + ] } ] }, @@ -7413,13 +7523,32 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" + ] + } ] } ], @@ -7554,6 +7683,36 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Object.Behavior::ImpactSpeed()", + "" + ] + } + ] } ] } @@ -7881,6 +8040,44 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"TailSplit\"" + ] + } + ] } ], "parameters": [] @@ -8114,6 +8311,44 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ] } ], "parameters": [] @@ -8175,10 +8410,10 @@ "objectGroups": [] }, { - "fullName": "Should rewind", + "fullName": "Tail is matching", "functionType": "Action", - "name": "SetShouldRewind", - "sentence": "_PARAM0_ should rewind: _PARAM2_", + "name": "SetTailMatching", + "sentence": "_PARAM0_ tail is matching: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8365,10 +8600,10 @@ "objectGroups": [] }, { - "fullName": "Leading queue should rewind", + "fullName": "Head is matching", "functionType": "Action", - "name": "SetLeadingQueueShouldRewind", - "sentence": "The leading queue of _PARAM0_ should rewind: _PARAM2_", + "name": "SetHeadMatching", + "sentence": "_PARAM0_ head is matching: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8544,10 +8779,10 @@ "objectGroups": [] }, { - "fullName": "Should rewind", + "fullName": "Tail is matching", "functionType": "Condition", - "name": "ShouldRewind", - "sentence": "_PARAM0_ should rewind", + "name": "IsTailMatching", + "sentence": "_PARAM0_ tail is matching", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8592,10 +8827,10 @@ "objectGroups": [] }, { - "fullName": "Leading queue should rewind", + "fullName": "Head is matching", "functionType": "Condition", - "name": "LeadingQueueShouldRewind", - "sentence": "The leading queue of _PARAM0_ should rewind", + "name": "IsHeadMatching", + "sentence": "_PARAM0_ head is matching", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -8672,7 +8907,6 @@ ], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -8740,7 +8974,6 @@ ], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -8775,6 +9008,108 @@ ], "objectGroups": [] }, + { + "fullName": "Tail just hit", + "functionType": "Action", + "name": "SetTailJustHit", + "sentence": "Change tail state of _PARAM0_ to just hit", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Head just hit", + "functionType": "Action", + "name": "SetHeadJustHit", + "sentence": "Change head state of _PARAM0_ to just hit", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Tail idle", "functionType": "Action", @@ -9249,9 +9584,11 @@ "Idle", "JustSplit", "StopOrTaillingPush", + "WillMagnet", "HitStop", "HitStopEnd", - "Rewinding" + "Rewinding", + "RewindImpact" ], "hidden": true, "name": "TailState" @@ -9266,7 +9603,9 @@ "Idle", "JustSplit", "StopOrTaillingPush", - "HitStop" + "WillMagnet", + "HitStop", + "RewindImpact" ], "hidden": true, "name": "HeadState" From 73722609f53bcf1f25423e25e888d0d1b2a74175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 18:51:48 +0200 Subject: [PATCH 033/114] Fix regression on collision. --- examples/smoothy/smoothy.json | 398 +++++++++++++++++++++++++--------- 1 file changed, 300 insertions(+), 98 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index ff52af444..87157f426 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1967,7 +1967,7 @@ "parameters": [ "AimingBubble", "=", - "RandomInRange(0,4)" + "4 + 0 * RandomInRange(0,4)" ] }, { @@ -2028,6 +2028,21 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "0.125" + ] + } + ] + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", @@ -3072,66 +3087,6 @@ ], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadJustHit" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) - 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailJustHit" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -3188,6 +3143,16 @@ "areBubblesMatched", "True" ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind impact!!!\"", + "", + "" + ] } ] }, @@ -3322,19 +3287,25 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3420,19 +3391,25 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Stop rewind\"", - "", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Stop rewind\"", + "", + "" + ] + } ] - } - ], - "events": [ + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3553,6 +3530,18 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::HeadState" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=", + "\"Idle\"", + "" + ] } ], "actions": [], @@ -5117,7 +5106,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailJustSplit" + "value": "Smoothy::BubbleQueueBehavior::SetTailJustHit" }, "parameters": [ "BubbleQueue", @@ -5179,7 +5168,7 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadJustSplit" + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustHit" }, "parameters": [ "BubbleQueue", @@ -5345,7 +5334,18 @@ ] } ], - "actions": [] + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } + ] }, { "disabled": true, @@ -7473,6 +7473,36 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "89.9", + "88.9", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -7497,10 +7527,28 @@ "BoardBubble", "SpeedPathMovement", "=", - "Object.Behavior::ImpactSpeed()", + "Object.Behavior::ImpactSpeed(Object.Behavior::PropertyHeadComboLevel())", "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Set speed for the head imact: \" + ToString(Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel()))", + "", + "" + ] + } + ] + } ] } ] @@ -7648,7 +7696,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "Object.Behavior::ImpactSpeed()", + "Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel())", "" ] } @@ -7708,7 +7756,83 @@ "BoardBubble", "SpeedPathMovement", "=", - "Object.Behavior::ImpactSpeed()", + "Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel())", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Set speed for the tail imact: \" + ToString(Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel()))", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head speed:: \" + ToString(BoardBubble.SpeedPathMovement::Speed())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Tail speed:: \" + ToString(BoardBubble.SpeedPathMovement::Speed())", + "", "" ] } @@ -8210,22 +8334,22 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"Idle\"" + "\"HeadSplit\"" ] }, { "type": { - "value": "RemoveObjectTimer" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", - "\"HeadSplit\"" + "Behavior", + "=", + "\"Rewinding\"" ] } ] @@ -8298,7 +8422,7 @@ "Object", "Behavior", "=", - "\"Idle\"" + "\"WillMagnet\"" ] }, { @@ -8385,7 +8509,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "min(-400, -133.3 * Object.Behavior::PropertyTailComboLevel())" + "max(-400, -133.3 * GetArgumentAsNumber(\"ComboLevel\"))" ] } ] @@ -8405,6 +8529,11 @@ "name": "Behavior", "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" + }, + { + "description": "Combo level", + "name": "ComboLevel", + "type": "expression" } ], "objectGroups": [] @@ -8489,6 +8618,24 @@ "\"TailSplit\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Tail combo: \" + ToString(Object.Behavior::TailComboLevel())", + "", + "" + ] + } + ] + } ] }, { @@ -8679,6 +8826,24 @@ "\"HeadSplit\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head combo: \" + ToString(Object.Behavior::HeadComboLevel())", + "", + "" + ] + } + ] + } ] }, { @@ -9041,6 +9206,24 @@ "\"RewindImpact\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Tail just hit\"", + "", + "" + ] + } + ] + } ] } ], @@ -9070,7 +9253,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -9092,6 +9275,24 @@ "\"RewindImpact\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head just hit\"", + "", + "" + ] + } + ] + } ] } ], @@ -9605,6 +9806,7 @@ "StopOrTaillingPush", "WillMagnet", "HitStop", + "Rewinding", "RewindImpact" ], "hidden": true, From 485ec1105d5612df5934e98ac3c919ddcfeb77db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 19:10:58 +0200 Subject: [PATCH 034/114] Fix combo FSM. --- examples/smoothy/smoothy.json | 47 ++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 87157f426..42eda3cc5 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2029,6 +2029,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -2038,7 +2039,7 @@ }, "parameters": [ "", - "0.125" + "0.25" ] } ] @@ -8136,7 +8137,7 @@ }, "parameters": [ "Object", - "\"HeadSplit\"", + "\"TailSplit\"", ">=", "0.3 + 0.1" ] @@ -8165,6 +8166,34 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"HitStop: \" + ToString(Object.ObjectTimerElapsedTime(\"TailSplit\"))", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -8334,22 +8363,22 @@ "actions": [ { "type": { - "value": "RemoveObjectTimer" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" }, "parameters": [ "Object", - "\"HeadSplit\"" + "Behavior", + "=", + "\"Rewinding\"" ] }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"Rewinding\"" + "\"HeadSplit\"" ] } ] @@ -8422,7 +8451,7 @@ "Object", "Behavior", "=", - "\"WillMagnet\"" + "\"Rewinding\"" ] }, { From 485cc22ab21a9f3d913e30ab4d78506bf0bda3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 2 Jun 2023 20:13:26 +0200 Subject: [PATCH 035/114] Add explosion effect. --- examples/smoothy/smoothy.json | 564 ++++++++++++++++++++++------------ 1 file changed, 374 insertions(+), 190 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 42eda3cc5..deb6e2526 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -227,42 +227,33 @@ "objectsGroups": [], "variables": [ { - "name": "neighbors", + "name": "remainingColors", "type": "array", "children": [ { "type": "string", - "value": "Left" - }, - { - "type": "string", - "value": "Right" + "value": "Yellow" }, { "type": "string", - "value": "TopLeft" + "value": "Green" }, { "type": "string", - "value": "TopRight" + "value": "Blue" }, { "type": "string", - "value": "BottomLeft" + "value": "Purple" }, { "type": "string", - "value": "BottomRight" + "value": "Red" } ] }, { - "name": "neighbor", - "type": "string", - "value": "" - }, - { - "name": "remainingColors", + "name": "colors", "type": "array", "children": [ { @@ -288,28 +279,33 @@ ] }, { - "name": "colors", + "name": "ColorValues", "type": "array", "children": [ { + "folded": true, "type": "string", - "value": "Yellow" + "value": "242;209;67" }, { + "folded": true, "type": "string", - "value": "Green" + "value": "166;242;67" }, { + "folded": true, "type": "string", - "value": "Blue" + "value": "67;201;242" }, { + "folded": true, "type": "string", - "value": "Purple" + "value": "173;67;242" }, { + "folded": true, "type": "string", - "value": "Red" + "value": "242;111;67" } ] } @@ -524,7 +520,7 @@ ] }, { - "name": "Blue", + "name": "Green", "useMultipleDirections": false, "directions": [ { @@ -533,7 +529,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "BlueBubble.png", + "image": "GreenBubble.png", "points": [], "originPoint": { "name": "origine", @@ -588,7 +584,7 @@ ] }, { - "name": "Green", + "name": "Blue", "useMultipleDirections": false, "directions": [ { @@ -597,7 +593,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "GreenBubble.png", + "image": "BlueBubble.png", "points": [], "originPoint": { "name": "origine", @@ -1924,6 +1920,52 @@ ] } ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 200, + "emitterForceMin": 50, + "flow": 640, + "jumpForwardInTimeOnCreation": 0, + "maxParticleNb": 32, + "name": "BubbleExplosion", + "particleAlpha1": 204, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 51, + "particleBlue2": 0, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 51, + "particleGreen2": 255, + "particleLifeTimeMax": 0.2, + "particleLifeTimeMin": 0.1, + "particleRed1": 255, + "particleRed2": 255, + "particleSize1": 25, + "particleSize2": 100, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 8, + "rendererParam2": 1, + "rendererType": "Point", + "tags": "", + "tank": 32, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 8, + "variables": [], + "effects": [], + "behaviors": [] } ], "events": [ @@ -2080,150 +2122,158 @@ }, { "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "5", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "+", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "5", + "repeatExpression": "2", "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "-", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } ] }, { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "5", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "StartLocation.X()", + "StartLocation.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + } ] } ] @@ -3016,7 +3066,56 @@ ] } ], - "actions": [] + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "BoardBubble", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "BoardBubble.X()", + "BoardBubble.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + } + ] + } + ] } ] } @@ -3154,6 +3253,54 @@ "", "" ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "BoardBubble", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "BoardBubble.X()", + "BoardBubble.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + } + ] } ] }, @@ -3996,7 +4143,7 @@ "fullName": "Match bubbles", "functionType": "Condition", "name": "MatchBubbles", - "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM5_ number _PARAM8_", + "sentence": "Match bubbles from _PARAM1_ at _PARAM3_ number _PARAM7_ and _PARAM6_ number _PARAM8_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4386,15 +4533,6 @@ "True" ] }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, { "type": { "value": "ObjectStack::ObjectStack::MoveInto" @@ -4420,6 +4558,31 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "", + "// Pick the the matched BoardBubble to handle them in the event sheet. ", + "for (const object of objects) {", + " object.pick = true;", + "}", + "const pickedObjectsLists = eventsFunctionContext.getObjectsLists(\"BoardBubble\");", + "/** @type {Array} */", + "const objectNames = [];", + "pickedObjectsLists.keys(objectNames);", + "for (const objectName of objectNames)", + "{", + " const pickedObjectsList = pickedObjectsLists.get(objectName);", + " gdjs.evtTools.object.filterPickedObjectsList(pickedObjectsList);", + "}", + "" + ], + "parameterObjects": "BoardBubble", + "useStrict": true, + "eventsSheetExpanded": false + } ] } ] @@ -5135,15 +5298,19 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// Pick the the matched BoardBubble to handle them in the event sheet.", + "gdjs.__SmoothyExtension = gdjs.__SmoothyExtension || {};", + "gdjs.__SmoothyExtension.pickedBubbles = [...objects];", "" - ] + ], + "parameterObjects": "BoardBubble", + "useStrict": true, + "eventsSheetExpanded": false } ] } @@ -5197,15 +5364,32 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// Pick the the matched BoardBubble to handle them in the event sheet.", + "for (const object of gdjs.__SmoothyExtension.pickedBubbles) {", + " object.pick = true;", + "}", + "for (const object of objects) {", + " object.pick = true;", + "}", + "const pickedObjectsLists = eventsFunctionContext.getObjectsLists(\"BoardBubble\");", + "/** @type {Array} */", + "const objectNames = [];", + "pickedObjectsLists.keys(objectNames);", + "for (const objectName of objectNames)", + "{", + " const pickedObjectsList = pickedObjectsLists.get(objectName);", + " gdjs.evtTools.object.filterPickedObjectsList(pickedObjectsList);", + "}", "" - ] + ], + "parameterObjects": "BoardBubble", + "useStrict": true, + "eventsSheetExpanded": false } ] } From 52335e33e47d7499a7fc67004fa37571a5482aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 00:29:09 +0200 Subject: [PATCH 036/114] Fix matching at collision. --- examples/smoothy/smoothy.json | 105 +++++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 33 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index deb6e2526..32315a369 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3075,6 +3075,16 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Inserted bubble is matching\"", + "", + "" + ] } ], "events": [ @@ -4563,7 +4573,6 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "", "// Pick the the matched BoardBubble to handle them in the event sheet. ", "for (const object of objects) {", " object.pick = true;", @@ -4899,7 +4908,7 @@ "parameters": [ "lowerIndex", "=", - "BubbleQueue.ObjectStack::Height()" + "BubbleQueue.ObjectStack::Height() - 1" ] }, { @@ -4938,18 +4947,7 @@ } ], "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "-", - "1" - ] - } - ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5000,6 +4998,22 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ] } ] }, @@ -5012,7 +5026,7 @@ "value": "ModVarScene" }, "parameters": [ - "matchingBubbleCount", + "headMatchingBubbleCount", "=", "BubbleQueue.ObjectStack::Height() - Variable(lowerIndex)" ] @@ -5075,7 +5089,7 @@ "parameters": [ "upperIndex", "=", - "GetArgumentAsNumber(\"InsertedBubbleIndex\")" + "0" ] }, { @@ -5114,18 +5128,7 @@ } ], "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5176,6 +5179,22 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ] } ] }, @@ -5188,9 +5207,9 @@ "value": "ModVarScene" }, "parameters": [ - "matchingBubbleCount", - "+", - "Variable(upperIndex) + 1" + "tailMatchingBubbleCount", + "=", + "Variable(upperIndex)" ] } ] @@ -5204,7 +5223,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"matchingBubbleCount: \" + VariableString(matchingBubbleCount)", + "\"matchingBubbleCount: \" + VariableString(headMatchingBubbleCount) + \" + \" + VariableString(tailMatchingBubbleCount)", "", "" ] @@ -5233,7 +5252,27 @@ "value": "VarScene" }, "parameters": [ - "matchingBubbleCount", + "headMatchingBubbleCount", + ">", + "0" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "tailMatchingBubbleCount", + ">", + "0" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Variable(headMatchingBubbleCount) + Variable(tailMatchingBubbleCount)", ">=", "3" ] From 739988b8941729beb456fafa565ee61e02ad694d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 00:54:47 +0200 Subject: [PATCH 037/114] Fix it for real. --- examples/smoothy/smoothy.json | 64 +++++++++++++++-------------------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 32315a369..a5ecf5644 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4908,7 +4908,7 @@ "parameters": [ "lowerIndex", "=", - "BubbleQueue.ObjectStack::Height() - 1" + "BubbleQueue.ObjectStack::Height()" ] }, { @@ -4947,7 +4947,18 @@ } ], "conditions": [], - "actions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lowerIndex", + "-", + "1" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4998,22 +5009,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lowerIndex", - "-", - "1" - ] - } - ] } ] }, @@ -5089,7 +5084,7 @@ "parameters": [ "upperIndex", "=", - "0" + "-1" ] }, { @@ -5128,7 +5123,18 @@ } ], "conditions": [], - "actions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "upperIndex", + "+", + "1" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5179,22 +5185,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "upperIndex", - "+", - "1" - ] - } - ] } ] }, @@ -5209,7 +5199,7 @@ "parameters": [ "tailMatchingBubbleCount", "=", - "Variable(upperIndex)" + "Variable(upperIndex) + 1" ] } ] From fd20fdf37ad9b05df2c6845d11b80b16099cac6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 13:50:52 +0200 Subject: [PATCH 038/114] Slow down at the end. --- examples/smoothy/smoothy.json | 261 ++++++++++++++++++++++++++++++++-- 1 file changed, 246 insertions(+), 15 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a5ecf5644..0a188c92b 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2406,7 +2406,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "1067", + "64 + Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889)", "" ] } @@ -2436,7 +2436,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "88.9", + "64", "" ] } @@ -3726,7 +3726,7 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "89.9", + "64", "-889", "" ] @@ -3738,30 +3738,186 @@ "conditions": [ { "type": { - "inverted": true, - "value": "VarSceneTxt" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" ] } ], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "88.9", - "88.9", + "headPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head position: \" + VariableString(headPosition)", + "", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + ">=", + "1/2 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"NormalPush\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "VarSceneTxt" + }, + "parameters": [ + "TaillingQueueState", + "=", + "\"Starting\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + "<", + "7/8 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Normal speed\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + ">=", + "7/8 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "20", + "20", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Slow speed\"", + "", + "" + ] + } + ] + } + ] + } + ] } ] }, @@ -6279,6 +6435,81 @@ } ], "objectGroups": [] + }, + { + "description": "Return the speed necessary to cover a distance according to the deceleration.", + "fullName": "Speed to reach", + "functionType": "Expression", + "name": "SpeedToReach", + "sentence": "Braking distance from an initial speed: _PARAM2_ and a deceleration: _PARAM3_ is less than _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "GetArgumentAsNumber(\"Distance\")", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "sqrt(2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "GetArgumentAsNumber(\"Distance\")", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "-sqrt(-2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Distance", + "name": "Distance", + "type": "expression" + }, + { + "description": "Deceleration", + "name": "Deceleration", + "type": "expression" + } + ], + "objectGroups": [] } ], "eventsBasedBehaviors": [ @@ -7710,8 +7941,8 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "89.9", - "88.9", + "64", + "64", "" ] } From b890dbab599081f1c7d1dc8d0c3002934327f1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 15:35:45 +0200 Subject: [PATCH 039/114] Fix the last combo. --- examples/smoothy/smoothy.json | 442 ++++++++++++++++++++++++++-------- 1 file changed, 344 insertions(+), 98 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 0a188c92b..832f109de 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3764,6 +3764,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3853,6 +3854,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3900,6 +3902,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -6223,6 +6226,16 @@ "Variable(tailComboLevel)", "" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustMerged" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=" + ] } ] } @@ -7725,6 +7738,7 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -7987,7 +8001,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Set speed for the head imact: \" + ToString(Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel()))", + "\"Combo level for the head imact: \" + ToString(Object.Behavior::PropertyHeadComboLevel())", "", "" ] @@ -8208,6 +8222,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -8226,6 +8241,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -8255,6 +8271,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -8490,7 +8507,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"WillMagnet --> Rewind\"", + "\"WillMagnet --> Rewinding\"", "", "" ] @@ -8715,6 +8732,24 @@ "\"Idle\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"StopOrTaillingPush --> Idle\"", + "", + "" + ] + } + ] + } ] }, { @@ -8749,25 +8784,109 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"HeadSplit\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"JustSplit --> StopOrTaillingPush\"", + "", + "" + ] + } + ] + } ] }, { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"JustSplit --> HitStop\"", + "", + "" + ] + } + ] + } ] } ] @@ -8825,6 +8944,24 @@ "\"HeadSplit\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"WillMagnet --> Rewinding\"", + "", + "" + ] + } + ] + } ] }, { @@ -8854,6 +8991,24 @@ "\"HitStop\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"WillMagnet --> HitStop\"", + "", + "" + ] + } + ] + } ] } ] @@ -8907,6 +9062,24 @@ "\"HeadSplit\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"HitStop --> Rewinding\"", + "", + "" + ] + } + ] + } ] }, { @@ -8945,6 +9118,24 @@ "\"HeadSplit\"" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"RewindImpact --> JustSplit\"", + "", + "" + ] + } + ] + } ] } ], @@ -9122,6 +9313,25 @@ "parameters": [ "\"ShouldRewind\"" ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ] } ], "actions": [ @@ -9135,62 +9345,30 @@ "=", "0" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEnd\"" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"" - ] - } - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "Object", - "Behavior", + "\"Reset tail combo level\"", + "", "" ] } @@ -9330,6 +9508,25 @@ "parameters": [ "\"ShouldRewind\"" ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ] } ], "actions": [ @@ -9343,51 +9540,30 @@ "=", "0" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadIdle" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"WillMagnet\"" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - } - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadIdle" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "Object", - "Behavior", + "\"Reset head combo level\"", + "", "" ] } @@ -9784,6 +9960,76 @@ ], "objectGroups": [] }, + { + "fullName": "Head just merged", + "functionType": "Action", + "name": "SetHeadJustMerged", + "sentence": "Change head state of _PARAM0_ to just merged", + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head just merged\"", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "fullName": "Tail idle", "functionType": "Action", From 756455ed25423002911cfb17a295e7692cd5a361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 17:03:48 +0200 Subject: [PATCH 040/114] Fix combo at the 1st tail. --- examples/smoothy/smoothy.json | 449 +++++++++++++++------------------- 1 file changed, 203 insertions(+), 246 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 832f109de..6f01137ba 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2071,7 +2071,6 @@ ], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4702,6 +4701,17 @@ "True" ] }, + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, { "type": { "value": "ObjectStack::ObjectStack::MoveInto" @@ -4750,6 +4760,73 @@ "parameterObjects": "BoardBubble", "useStrict": true, "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BubbleQueue", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Remove the tail part\"", + "", + "" + ] + } + ] + } + ] } ] } @@ -4849,44 +4926,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BubbleQueue", - "" - ] - } - ] } ], "parameters": [ @@ -5486,7 +5525,19 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -5552,7 +5603,19 @@ ] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -5610,6 +5673,17 @@ } ], "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, { "type": { "value": "Delete" @@ -6152,6 +6226,17 @@ "ObjectStack" ] }, + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, { "type": { "value": "Delete" @@ -7738,7 +7823,6 @@ "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -8074,16 +8158,6 @@ "=", "\"StopOrTaillingPush\"" ] - }, - { - "type": { - "value": "CompareArgumentAsNumber" - }, - "parameters": [ - "\"QueueIndexFromTail\"", - ">", - "0" - ] } ], "actions": [ @@ -8367,32 +8441,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"Idle\"" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"StopOrTaillingPush --> Idle\"", - "", - "" - ] - } + "\"Idle\"", + "" ] } ] @@ -8432,13 +8488,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"StopOrTaillingPush\"" + "\"StopOrTaillingPush\"", + "" ] }, { @@ -8479,7 +8536,7 @@ "parameters": [ "Object", "Behavior", - "=", + "<=", "1" ] } @@ -8487,31 +8544,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"Rewinding\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"WillMagnet --> Rewinding\"", - "", - "" - ] - } + "\"Rewinding\"", + "" ] } ] @@ -8534,13 +8574,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStop\"" + "\"HitStop\"", + "" ] } ] @@ -8567,13 +8608,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"Rewinding\"" + "\"Rewinding\"", + "" ] } ] @@ -8607,13 +8649,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStopEnd\"" + "\"HitStopEnd\"", + "" ] }, { @@ -8673,13 +8716,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"JustSplit\"", + "" ] }, { @@ -8723,31 +8767,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"Idle\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"StopOrTaillingPush --> Idle\"", - "", - "" - ] - } + "\"Idle\"", + "" ] } ] @@ -8796,7 +8823,7 @@ "parameters": [ "Object", "Behavior", - "=", + "<=", "1" ] } @@ -8804,13 +8831,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"StopOrTaillingPush\"" + "\"StopOrTaillingPush\"", + "" ] }, { @@ -8822,24 +8850,6 @@ "\"HeadSplit\"" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"JustSplit --> StopOrTaillingPush\"", - "", - "" - ] - } - ] - } ] }, { @@ -8860,31 +8870,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStop\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"JustSplit --> HitStop\"", - "", - "" - ] - } + "\"HitStop\"", + "" ] } ] @@ -8918,7 +8911,7 @@ "parameters": [ "Object", "Behavior", - "=", + "<=", "1" ] } @@ -8926,13 +8919,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"Rewinding\"" + "\"Rewinding\"", + "" ] }, { @@ -8944,24 +8938,6 @@ "\"HeadSplit\"" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"WillMagnet --> Rewinding\"", - "", - "" - ] - } - ] - } ] }, { @@ -8982,31 +8958,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStop\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"WillMagnet --> HitStop\"", - "", - "" - ] - } + "\"HitStop\"", + "" ] } ] @@ -9044,13 +9003,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"Rewinding\"" + "\"Rewinding\"", + "" ] }, { @@ -9062,24 +9022,6 @@ "\"HeadSplit\"" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"HitStop --> Rewinding\"", - "", - "" - ] - } - ] - } ] }, { @@ -9100,13 +9042,14 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"JustSplit\"", + "" ] }, { @@ -9118,24 +9061,6 @@ "\"HeadSplit\"" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"RewindImpact --> JustSplit\"", - "", - "" - ] - } - ] - } ] } ], @@ -10217,6 +10142,22 @@ "name": "SetTailState", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Tail: \" + Object. Behavior::PropertyTailState() + \" --> \" + GetArgumentAsString(\"Value\")", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10299,6 +10240,22 @@ "name": "SetHeadState", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head: \" + Object. Behavior::PropertyHeadState() + \" --> \" + GetArgumentAsString(\"Value\")", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], From 5a7ddb49664e9b596db95aae4d7428d1e6ef2878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 17:37:50 +0200 Subject: [PATCH 041/114] Gameover animation. --- examples/smoothy/smoothy.json | 3060 +++++++++++++++++---------------- 1 file changed, 1606 insertions(+), 1454 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 6f01137ba..b615e0512 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2063,14 +2063,24 @@ "value": "ModVarSceneTxt" }, "parameters": [ - "TaillingQueueState", + "GameState", "=", - "\"Starting\"" + "\"Playing\"" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "True" ] } ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -2287,7 +2297,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Spawn bubbles", + "name": "Playing", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2296,117 +2306,173 @@ "conditions": [ { "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" + "value": "VarSceneTxt" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "ObjectStack" + "GameState", + "=", + "\"Playing\"" ] } ], "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"First bubble\"", - "", - "" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Spawn bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarSceneTxt" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ObjectStack::ObjectStack::IsEmpty" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "64 + Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889)", - "" + "BubbleQueue", + "ObjectStack", + "ObjectStack" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"First bubble\"", + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "64 + Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "64", + "" + ] + } + ] + } ] } ] @@ -2416,349 +2482,204 @@ "conditions": [ { "type": { - "inverted": true, - "value": "VarSceneTxt" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">=", + "32", + "" ] } ], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", + "lastBubblePathPosition", "=", - "64", - "" + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubblePathPosition) - 32", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" + ] + } ] } - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">=", - "32", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lastBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lastBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubblePathPosition) - 32", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubbleSpeed)", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "levelCompled", - "" - ] - } - ], - "actions": [], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Controls", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Left" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveCounterClockwise" - }, - "parameters": [ - "Launcher", - "Turret", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Right" ] } ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveClockwise" - }, - "parameters": [ - "Launcher", - "Turret", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia." + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "inverted": true, - "value": "CursorMovement::CursorStayStill" - }, - "parameters": [ - "", - "1", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveCounterClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "KeyPressed" - }, - "parameters": [ - "", - "Left" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::MoveClockwise" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } ] }, - { - "type": { - "inverted": true, - "value": "KeyPressed" - }, - "parameters": [ - "", - "Right" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveToward" - }, - "parameters": [ - "Launcher", - "Turret", - "MouseX(\"\", 0)", - "MouseY(\"\", 0)", - "3", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::IsMoving" - }, - "parameters": [ - "Launcher", - "Turret", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -2769,34 +2690,74 @@ "textG": 0, "textR": 0 }, - "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance." + "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "MouseButtonReleased" + "inverted": true, + "value": "CursorMovement::CursorStayStill" + }, + "parameters": [ + "", + "1", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" }, "parameters": [ "", "Left" ] + }, + { + "type": { + "inverted": true, + "value": "KeyPressed" + }, + "parameters": [ + "", + "Right" + ] } ], "actions": [ { "type": { - "value": "Turret::Turret::SetAimingAngleToward" + "value": "Turret::Turret::MoveToward" }, "parameters": [ "Launcher", "Turret", "MouseX(\"\", 0)", "MouseY(\"\", 0)", - "3" + "3", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Turret::Turret::IsMoving" + }, + "parameters": [ + "Launcher", + "Turret", + "" + ] + } + ], + "actions": [ { "type": { "value": "MettreAutour" @@ -2812,285 +2773,175 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [], - "subInstructions": [ + "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "Turret::Turret::SetAimingAngleToward" + }, + "parameters": [ + "Launcher", + "Turret", + "MouseX(\"\", 0)", + "MouseY(\"\", 0)", + "3" + ] + }, + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "LShift" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ] + }, { "type": { - "value": "KeyReleased" + "value": "FireBullet::FireBullet::IsReadyToShoot" }, "parameters": [ - "", - "LShift" + "AimingBubble", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "AimingBubble", + "FireBullet", + "AimingBubble.X()", + "AimingBubble.Y()", + "MovingBubble", + "Launcher.Turret::AimingAngle()", + "690", + "" ] }, { "type": { - "value": "MouseButtonReleased" + "value": "SetAnimationName" }, "parameters": [ - "", - "Left" + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" ] } ] - }, - { - "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "AimingBubble.X()", - "AimingBubble.Y()", - "MovingBubble", - "Launcher.Turret::AimingAngle()", - "690", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" - ] } ] } - ] - } - ], - "parameters": [] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Insert bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "MovingBubble", - "BoardBubble", - "", - "", - "yes" - ] - }, - { - "type": { - "value": "AjoutHasard" - }, - "parameters": [ - "", - "BoardBubble" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::Initialize" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "BoardBubble", - "MovingBubble", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::PlayInsertion" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::CreateBubble" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect." + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::MatchBubbles" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", - "InsertedBubble.InsertedBubble::QueueIndex()", - "InsertedBubble.InsertedBubble::BubbleIndex()", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Inserted bubble is matching\"", - "", - "" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Insert bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::ForEach", - "object": "BoardBubble", - "conditions": [], + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "", + "", + "yes" + ] + }, + { + "type": { + "value": "AjoutHasard" + }, + "parameters": [ + "", + "BoardBubble" + ] + } + ], "actions": [ { "type": { @@ -3098,126 +2949,64 @@ }, "parameters": [ "", - "BubbleExplosion", - "BoardBubble.X()", - "BoardBubble.Y()", + "InsertedBubble", + "StartLocation.X()", + "StartLocation.Y()", "" ] }, { "type": { - "value": "ParticleSystem::ParticleColor1" + "value": "Smoothy::InsertedBubbleBehavior::Initialize" }, "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" + "InsertedBubble", + "InsertedBubble", + "BoardBubble", + "MovingBubble", + "" ] }, { "type": { - "value": "ParticleSystem::ParticleColor2" + "value": "Delete" }, "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" + "MovingBubble", + "" ] } ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Queues collision", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueColliding" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "" + ] + } + ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "Smoothy::InsertedBubbleBehavior::PlayInsertion" }, "parameters": [ - "areBubblesMatched", + "InsertedBubble", + "InsertedBubble", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", "" ] } @@ -3228,630 +3017,765 @@ "conditions": [ { "type": { - "value": "Smoothy::MatchBubblesBetween" + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" }, "parameters": [ - "", + "InsertedBubble", + "InsertedBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::CreateBubble" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", "Gutter", "ObjectStack", "BubbleQueue", - "BubbleQueueBehavior", "ObjectStack", "BoardBubble", - "Variable(queueIndex)", + "SpeedPathMovement", "" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "SetSceneVariableAsBoolean" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "areBubblesMatched", - "True" - ] + "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect." }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::MatchBubbles" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "InsertedBubble.InsertedBubble::QueueIndex()", + "InsertedBubble.InsertedBubble::BubbleIndex()", + "BubbleClipboard", + "ObjectStack", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Inserted bubble is matching\"", + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "BoardBubble", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "BoardBubble.X()", + "BoardBubble.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Queues collision", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ModVarScene" }, "parameters": [ - "\"Rewind impact!!!\"", - "", - "" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] - }, + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "Delete" + "value": "VarScene" }, "parameters": [ - "BoardBubble", - "" + "queueIndex", + ">", + "0" ] } ], + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::ForEach", - "object": "BoardBubble", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueColliding" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ { - "type": { - "value": "Create" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "BubbleExplosion", - "BoardBubble.X()", - "BoardBubble.Y()", - "" + "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } ] }, { - "type": { - "value": "ParticleSystem::ParticleColor1" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::MatchBubblesBetween" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "True" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind impact!!!\"", + "", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "BoardBubble", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "BoardBubble.X()", + "BoardBubble.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + } + ] + } ] }, { - "type": { - "value": "ParticleSystem::ParticleColor2" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MergeQueue" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::MergeQueue" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } ] } ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Combo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 2" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ModVarScene" }, "parameters": [ - "\"Rewind\"", - "", - "" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 2" ] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "VarScene" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" + "queueIndex", + ">=", + "0" ] } ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueMatching" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::IsQueueMatching" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Stop rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } + ] + } ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Stop rewind\"", - "", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "ObjectStack::ContainsAt" + "value": "ObjectStack::Contains" }, "parameters": [ "", - "Gutter", - "ObjectStack", "BubbleQueue", - "Variable(queueIndex) + 1", + "ObjectStack", + "BoardBubble", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + "value": "Smoothy::BubbleQueueBehavior::HeadState" }, "parameters": [ "BubbleQueue", "BubbleQueueBehavior", - "no", + "=", + "\"Idle\"", "" ] } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::HeadState" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=", - "\"Idle\"", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarSceneTxt" - }, - "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "-889", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "headPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Head position: \" + VariableString(headPosition)", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "headPosition", - ">=", - "1/2 * CurvedMovement::PathLength(\"Gutter\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "TaillingQueueState", - "=", - "\"NormalPush\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "VarSceneTxt" - }, - "parameters": [ - "TaillingQueueState", - "=", - "\"Starting\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [], + "events": [ { - "type": { - "value": "VarScene" - }, - "parameters": [ - "headPosition", - "<", - "7/8 * CurvedMovement::PathLength(\"Gutter\")" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-889", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "headPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } ] - } - ], - "events": [ + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", @@ -3862,270 +3786,498 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Normal speed\"", + "\"Head position: \" + VariableString(headPosition)", "", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + ">=", + "1/2 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "BeginningBoostIsActive", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + "<", + "7/8 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Normal speed\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "headPosition", + ">=", + "7/8 * CurvedMovement::PathLength(\"Gutter\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "20", + "20", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Slow speed\"", + "", + "" + ] + } + ] + } + ] + } + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "VarScene" + "value": "ModVarScene" }, "parameters": [ - "headPosition", - ">=", - "7/8 * CurvedMovement::PathLength(\"Gutter\")" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] } - ], - "actions": [ + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "VarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "20", - "20", - "" + "queueIndex", + ">=", + "0" ] } ], + "conditions": [], + "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "\"Slow speed\"", "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "BoardBubble", + "SpeedPathMovement", + "Gutter.ObjectStack::Height() - 1 - Variable(queueIndex)", "" ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] } ] } + ], + "parameters": [] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "Space" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "-100", + "-800", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO What if the queue is rewinded completly?" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "StartLocation", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], "actions": [ { "type": { - "value": "ModVarScene" + "value": "ModVarSceneTxt" }, "parameters": [ - "queueIndex", + "GameState", "=", - "Gutter.ObjectStack::Height() - 1" + "\"GameOver\"" ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Gameover", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "VarScene" + "value": "VarSceneTxt" }, "parameters": [ - "queueIndex", - ">=", - "0" + "GameState", + "=", + "\"GameOver\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "2000", + "2000", + "" ] } ], - "conditions": [], - "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex)", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" + "value": "ObjectStack::HasOnTop" }, "parameters": [ + "", "BubbleQueue", - "BubbleQueueBehavior", + "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "Gutter.ObjectStack::Height() - 1 - Variable(queueIndex)", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" }, "parameters": [ - "queueIndex", - "-", - "1" + "BoardBubble", + "SpeedPathMovement", + "" ] } - ] + ], + "actions": [] } ] } ], "parameters": [] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Space" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "-100", - "-800", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO What if the queue is rewinded completly?" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - } - ] } ], "layers": [ From 95ec2378260d37d7d4a7cdc23f07a77d1f02f514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 19:57:21 +0200 Subject: [PATCH 042/114] Add score and countdown. --- examples/smoothy/smoothy.json | 187 ++++++++++++++++++++++++++++++++-- 1 file changed, 180 insertions(+), 7 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index b615e0512..4ac80431e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -415,6 +415,36 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Score", + "persistentUuid": "676db6fe-999e-454a-a69c-e1f290b05ee0", + "width": 0, + "x": 24, + "y": 16, + "zOrder": 97, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Countdown", + "persistentUuid": "60b40b4e-219c-41e6-9cd8-85997e02916d", + "width": 0, + "x": 784, + "y": 16, + "zOrder": 98, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1929,9 +1959,9 @@ "emitterAngleB": 360, "emitterForceMax": 200, "emitterForceMin": 50, - "flow": 640, + "flow": 1280, "jumpForwardInTimeOnCreation": 0, - "maxParticleNb": 32, + "maxParticleNb": 64, "name": "BubbleExplosion", "particleAlpha1": 204, "particleAlpha2": 0, @@ -1959,13 +1989,57 @@ "rendererParam2": 1, "rendererType": "Point", "tags": "", - "tank": 32, + "tank": 64, "textureParticleName": "", "type": "ParticleSystem::ParticleEmitter", "zoneRadius": 8, "variables": [], "effects": [], "behaviors": [] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Score", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "0000", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Countdown", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "3:00", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + } } ], "events": [ @@ -2076,6 +2150,16 @@ "BeginningBoostIsActive", "True" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Countdown", + "=", + "3 * 60" + ] } ], "events": [ @@ -3092,12 +3176,12 @@ }, { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ModVarScene" }, "parameters": [ - "\"Inserted bubble is matching\"", - "", - "" + "Score", + "+", + "10 * PickedInstancesCount(BoardBubble)" ] } ], @@ -3286,6 +3370,26 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "10 * PickedInstancesCount(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" + ] } ], "events": [ @@ -4140,6 +4244,75 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Score", + "=", + "VariableString(Score)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Countdown", + "-", + "TimeDelta()" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Countdown", + "=", + "ToString(floor(Variable(Countdown) / 60)) + \":\" + ToString(floor(mod(Variable(Countdown), 60)))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Countdown", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"GameOver\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ From aacbe53593f6ab4dc7ab18e577871bca17d228aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 22:11:30 +0200 Subject: [PATCH 043/114] Fix the initial speed formula. --- examples/smoothy/smoothy.json | 178 ++++++++++++++++++++++++++++------ 1 file changed, 146 insertions(+), 32 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 4ac80431e..2d67fb814 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2523,7 +2523,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "64 + Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889)", + "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889, 64)", "" ] } @@ -3952,21 +3952,70 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } ] - } - ], - "events": [ + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-64", + "" + ] + } + ] + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", @@ -4000,20 +4049,7 @@ ] } ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "20", - "20", - "" - ] - } - ], + "actions": [], "events": [ { "disabled": true, @@ -4031,6 +4067,68 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "17.8", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "-17.8", + "" + ] + } + ] } ] } @@ -4445,7 +4543,18 @@ ] } ], - "actions": [] + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Score", + "=", + "Variable(Score)" + ] + } + ] } ] } @@ -6886,7 +6995,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "sqrt(2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\"))" + "sqrt(2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"FinalSpeed\") * GetArgumentAsNumber(\"FinalSpeed\"))" ] } ] @@ -6911,7 +7020,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "-sqrt(-2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\"))" + "-sqrt(-2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"FinalSpeed\") * GetArgumentAsNumber(\"FinalSpeed\"))" ] } ] @@ -6922,7 +7031,7 @@ }, "parameters": [ { - "description": "Distance", + "description": "Final distance", "name": "Distance", "type": "expression" }, @@ -6930,6 +7039,11 @@ "description": "Deceleration", "name": "Deceleration", "type": "expression" + }, + { + "description": "Final speed", + "name": "FinalSpeed", + "type": "expression" } ], "objectGroups": [] From bb65a0d44cbf6c0f9ee0a49ac9e2c71eb66e523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 3 Jun 2023 23:15:55 +0200 Subject: [PATCH 044/114] Add a grey bubble. --- examples/smoothy/assets/GreyBubble.png | Bin 0 -> 647 bytes examples/smoothy/smoothy.json | 571 +++++++++++++++---------- 2 files changed, 341 insertions(+), 230 deletions(-) create mode 100644 examples/smoothy/assets/GreyBubble.png diff --git a/examples/smoothy/assets/GreyBubble.png b/examples/smoothy/assets/GreyBubble.png new file mode 100644 index 0000000000000000000000000000000000000000..0d27d08900f53c3ad2791f24b6e3459dfd0131c1 GIT binary patch literal 647 zcmV;20(kw2P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10u)I^ zK~zY`#h1-$6Hyq3pYKE|g-q1N1WGKH7U~5Ej*W=kK^D>$^%g`+Mb|2dic~?tOVGBq zNbbN*nx8umtYC~tG7B{ml2XWgE)s1Glg89!@@x;xbKdW8hWCi7(wn!Dnmct~Ra2lz zU>Z2lUi=Px0y2oCE&KBp%r|>|Q4SQBvg6*Exrxd$sLj7o0a>wjn=d&z*XUbZb8`!- z@(f6D2vqrE49ij5*$7%UL7S;oa(7i_^{`R^5hhhx_bP?QL7vXUrdlq%5zz$(hze^l z+qnw(fr-6x{^6jdt#m9_-NOCA#O*U(V|b{*d^GNC?ukp;@#<0YL4-+$%hy`-$n3<# znYsb+#>`R(Qh-D>(!AbIydLo?r@r-ZPyd&)6)z^lbGI(4Z{8Co!UdzgqzD@&Wk8al zi;<)OnGRp9GY0h72ofJRj0gkra|EOQVL-P>5cs13G9yTwF^Hr`AWoZBN1_sR=xg0&|(PElC|r<+G`+Fmv#`j1?Vsj7Uah7=K1Fb61ANTL>~>& z`oM~xeb>G0x%t Date: Sun, 4 Jun 2023 00:03:14 +0200 Subject: [PATCH 045/114] Bubble swap. --- examples/smoothy/smoothy.json | 298 +++++++++++++++++++++++++++++++++- 1 file changed, 297 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 1ece49575..a892fc2b0 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -230,7 +230,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.6627256836254674, + "zoomFactor": 0.8086342783490704, "windowMask": false }, "objectsGroups": [], @@ -469,6 +469,21 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "PreviewBubble", + "persistentUuid": "5e352e26-7192-4814-b184-eab72d841c41", + "width": 0, + "x": 427, + "y": 240, + "zOrder": 99, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1826,6 +1841,224 @@ } ] }, + { + "assetStoreId": "", + "name": "PreviewBubble", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "InsertedBubble", + "type": "Smoothy::InsertedBubbleBehavior", + "SpeedPathMovement": "SpeedPathMovement" + }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": true, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], + "animations": [ + { + "name": "Grey", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\GreyBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, { "assetStoreId": "", "name": "Mark", @@ -2226,6 +2459,16 @@ "4 + 0 * RandomInRange(0,5)" ] }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "PreviewBubble", + "=", + "4 + 0 * RandomInRange(0,5)" + ] + }, { "type": { "value": "CurvedMovement::CreatePathFromSvg" @@ -3051,6 +3294,50 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Right" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "animationName", + "=", + "PreviewBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(animationName)" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3122,6 +3409,15 @@ }, "parameters": [ "AimingBubble", + "PreviewBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" ] } From fc34f62fe419f6e973fda7e8b52342f88e5f94cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 01:50:28 +0200 Subject: [PATCH 046/114] Insert bubbles both way. --- examples/smoothy/smoothy.json | 249 ++++++++++++++++++++++++++++++++-- 1 file changed, 237 insertions(+), 12 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a892fc2b0..ce5f3e0d6 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3475,6 +3475,25 @@ "" ] }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, { "type": { "value": "Smoothy::InsertedBubbleBehavior::Initialize" @@ -3482,7 +3501,10 @@ "parameters": [ "InsertedBubble", "InsertedBubble", + "BubbleQueue", + "ObjectStack", "BoardBubble", + "SpeedPathMovement", "MovingBubble", "" ] @@ -4909,6 +4931,14 @@ "2000", "" ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "InsertedBubble" + ] } ], "events": [ @@ -4960,6 +4990,23 @@ "=", "Variable(Score)" ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "BoardBubble" + ] } ] } @@ -7495,11 +7542,182 @@ "fullName": "Initialize", "functionType": "Action", "name": "Initialize", - "sentence": "Initialize the animation of _PARAM0_ for the insertion of _PARAM3_ next to _PARAM2_", + "sentence": "Initialize the animation of _PARAM0_ for the insertion of _PARAM4_ next to _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "abs(AngleDifference(AngleBetweenPositions(BoardBubble.X(), BoardBubble.Y(), MovingBubble.X(), MovingBubble.Y()), BoardBubble.SpeedPathMovement::MovementAngle()))", + "<", + "90" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Insert before the hit bubble instead of after." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "BubbleIndex", + "=", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble) + 1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Handle insersion at the tail." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "BubbleIndex", + "<", + "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + ] + } + ], + "actions": [ + { + "type": { + "value": "LinkedObjects::RemoveLinkBetween" + }, + "parameters": [ + "", + "Object", + "BoardBubble" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "Variable(BubbleIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "Object", + "BoardBubble" + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "BoardBubble", + "Object", + "" + ] + } + ], "actions": [ { "type": { @@ -7524,16 +7742,6 @@ "" ] }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "Object", - "BoardBubble" - ] - }, { "type": { "value": "SetAnimationName" @@ -7592,11 +7800,28 @@ "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { "description": "Board bubble", "name": "BoardBubble", "type": "objectList" }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, { "description": "Moving bubble", "name": "MovingBubble", From e316b8f7283a688117d1c7b4d4a98533b464ac1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 17:46:36 +0200 Subject: [PATCH 047/114] Level selection. --- examples/smoothy/assets/LevelBackground.png | Bin 0 -> 1207 bytes examples/smoothy/smoothy.json | 2162 +++++++++++++++++-- 2 files changed, 2012 insertions(+), 150 deletions(-) create mode 100644 examples/smoothy/assets/LevelBackground.png diff --git a/examples/smoothy/assets/LevelBackground.png b/examples/smoothy/assets/LevelBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..a16b9f61add9296df2a4cdba7cbbeb47fafa809a GIT binary patch literal 1207 zcmeAS@N?(olHy`uVBq!ia0y~yV3Y;27jUovNkh*aDL{&`ILO_JVcj{ImkbOng`O^s zAr*0NuLN>3C`3PQv8;^?m+Xy8qQe93jy`uF zUsPc3l-m-FOp6|~a|n2_x~M-jb8BdL@q>|xC5Z8&=gwY11qG|R28PBEhmxSYWEPH& nKKW5?qd_v7N=A0Z`M@yaprJssiTf&GNyOmk>gTe~DWM4fTP}da literal 0 HcmV?d00001 diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index ce5f3e0d6..735ceb700 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1,5 +1,5 @@ { - "firstLayout": "", + "firstLayout": "Level selection", "gdVersion": { "build": 99, "major": 4, @@ -196,6 +196,24 @@ "name": "assets\\GreyBubble.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/LevelBackground.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "LevelBackground", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/LevelBackground.png", + "kind": "image", + "metadata": "", + "name": "assets\\LevelBackground.png", + "smoothed": true, + "userAdded": true } ], "resourceFolders": [] @@ -204,9 +222,48 @@ "objectsGroups": [], "variables": [ { - "name": "level", - "type": "string", - "value": "0" + "name": "Level", + "type": "number", + "value": 0 + }, + { + "name": "Levels", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "folded": true, + "name": "GutterPath", + "type": "string", + "value": "\"m-16 233s72.5-23.5 123 81c50.3 104 193 128 329 129 135 0.349 334-44.8 336-205 1.3-160-230-211-358-209s-248 64.6-249 176c-0.465 112 158 163 260 164s205-56.8 205-131c0.682-74.4-89.5-128-206-128\"" + }, + { + "folded": true, + "name": "LauncherX", + "type": "number", + "value": 427 + }, + { + "name": "LauncherY", + "type": "number", + "value": 240 + }, + { + "name": "StartX", + "type": "number", + "value": -16 + }, + { + "folded": true, + "name": "StartY", + "type": "number", + "value": 233 + } + ] + } + ] } ], "layouts": [ @@ -335,36 +392,6 @@ } ], "instances": [ - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Launcher", - "persistentUuid": "b21107d6-61ef-43ae-9d45-209d3d84434d", - "width": 0, - "x": 427, - "y": 240, - "zOrder": 68, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "AimingBubble", - "persistentUuid": "3007bc8e-0dbe-415c-b428-f048fafc109d", - "width": 0, - "x": 380, - "y": 234, - "zOrder": 69, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -380,21 +407,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "StartLocation", - "persistentUuid": "976a4fbe-d37a-49fc-8791-4d0d6ad9e23b", - "width": 0, - "x": -16, - "y": 233, - "zOrder": 93, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -469,21 +481,6 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "PreviewBubble", - "persistentUuid": "5e352e26-7192-4814-b184-eab72d841c41", - "width": 0, - "x": 427, - "y": 240, - "zOrder": 99, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] } ], "objects": [ @@ -2421,7 +2418,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "", + "name": "Build the level", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -2438,17 +2435,6 @@ } ], "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" - ] - }, { "type": { "value": "ChangeAnimation" @@ -2476,7 +2462,19 @@ "parameters": [ "", "\"Gutter\"", - "\"m-16 233s72.5-23.5 123 81c50.3 104 193 128 329 129 135 0.349 334-44.8 336-205 1.3-160-230-211-358-209s-248 64.6-249 176c-0.465 112 158 163 260 164s205-56.8 205-131c0.682-74.4-89.5-128-206-128\"", + "GlobalVariableString(Levels[GlobalVariable(Level)].GutterPath)", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "StartLocation", + "GlobalVariable(Levels[GlobalVariable(Level)].StartX)", + "GlobalVariable(Levels[GlobalVariable(Level)].StartY)", "" ] }, @@ -2504,6 +2502,53 @@ "" ] }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Launcher", + "GlobalVariable(Levels[GlobalVariable(Level)].LauncherX)", + "GlobalVariable(Levels[GlobalVariable(Level)].LauncherY)", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "PreviewBubble", + "Launcher.X()", + "Launcher.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "AimingBubble", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "Launcher.Turret::AimingAngle()" + ] + }, { "type": { "value": "ObjectStack::ObjectStack::AddOnTop" @@ -4796,7 +4841,7 @@ "parameters": [ "Countdown", "=", - "max(0, Variable(Countdown) + TimeDelta())" + "max(0, Variable(Countdown) - TimeDelta())" ] }, { @@ -5087,98 +5132,1915 @@ "type": "Turret::Turret" } ] - } - ], - "externalEvents": [ + }, { - "associatedLayout": "Game", - "lastChangeTimeStamp": 0, - "name": "UpdateRemainingColors", - "events": [ + "b": 27, + "disableInputWhenNotFocused": true, + "mangledName": "Level_32selection", + "name": "Level selection", + "r": 54, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 46, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 95, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": true, + "zoomFactor": 0.819672131147541, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Level", + "persistentUuid": "95fdeef0-b7dc-44c6-8328-6de1d9eff71b", + "width": 0, + "x": 95, + "y": 53, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "VariableClearChildren" - }, - "parameters": [ - "remainingColors" - ] - } - ] + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Level", + "persistentUuid": "3f55e0f1-f0b3-4abb-8e43-3dc482f80577", + "width": 0, + "x": 95, + "y": 265, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] }, { - "type": "BuiltinCommonInstructions::ForEachChildVariable", - "iterableVariableName": "colors", - "valueIteratorVariableName": "color", - "keyIteratorVariableName": "index", - "conditions": [ + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Level", + "persistentUuid": "ede591d3-1668-4b49-b21d-10a6584f70e6", + "width": 0, + "x": 475, + "y": 265, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Level", + "persistentUuid": "91084239-d120-4429-b752-32855ab88205", + "width": 0, + "x": 475, + "y": 52, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Level", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "BoardBubble", - "VariableString(color)" - ] + "folded": true, + "name": "Level", + "type": "number", + "value": 0 } ], - "actions": [ + "effects": [], + "behaviors": [ { - "type": { - "value": "SceneVariablePushString" - }, - "parameters": [ - "remainingColors", - "VariableString(color)" - ] + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 } - ] + ], + "animations": [ + { + "name": "LevelBackground", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\LevelBackground.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "assetStoreId": "", + "name": "Launcher", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "type": { - "value": "Egal" - }, - "parameters": [ - "VariableChildCount(remainingColors)", - "=", - "0" - ] + "name": "Turret", + "type": "Turret::Turret", + "SpeedMax": 360, + "Acceleration": 1440, + "Deceleration": 36000, + "Property": false, + "AngleMin": 0, + "AngleMax": 0 } ], - "actions": [ + "animations": [ { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "levelCompleted", - "True" + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Launcher.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 75, + "y": 75 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } ] } ] - } - ] - } - ], - "eventsFunctionsExtensions": [ + }, + { + "assetStoreId": "", + "name": "GutterPainter", + "tags": "", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 11, + "outlineOpacity": 255, + "fillColor": { + "b": 27, + "g": 46, + "r": 54 + }, + "outlineColor": { + "b": 27, + "g": 46, + "r": 54 + }, + "absoluteCoordinates": true, + "clearBetweenFrames": false, + "antialiasing": "none" + }, + { + "assetStoreId": "", + "name": "StartLocation", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement", + "Rotation": true, + "RotationOffset": 0, + "Speed": 0, + "PathOriginX": 0, + "PathOriginY": 0, + "PathName": "", + "TargetedSpeed": 0, + "Acceleration": 0, + "DrawingElementIndex": 0, + "X": 0, + "Y": 0, + "PathAngle": 0, + "PathScale": 0, + "RepetitionCount": 0, + "ShouldLoop": false, + "DrawingPathOriginX": 0, + "DrawingPathOriginY": 0, + "DebugLineStrokeWidth": 0, + "PreviousSpeed": 0, + "CurrentLength": 0, + "IsLookingBack": false, + "Viewpoint": "Top-Down" + } + ], + "animations": [ + { + "name": "Green", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "GreenBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Yellow", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "YellowBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Blue", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "BlueBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Purple", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "PurpuleBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Red", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "RedBubble.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 15, + "y": 15 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Level", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "GutterPainter", + "Level.X()", + "Level.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "StartLocation", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].StartX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].StartY) / 3", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "StartLocation" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "Level.VariableString(Level)", + "GlobalVariableString(Levels[Level.Variable(Level)].GutterPath)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPathTo" + }, + "parameters": [ + "StartLocation", + "SpeedPathMovement", + "Level.VariableString(Level)", + "1", + "", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].StartX) / 3 + CurvedMovement::PathEndX(Level.VariableString(Level)) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].StartY) / 3 + CurvedMovement::PathEndY(Level.VariableString(Level)) / 3", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "StartLocation", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Launcher", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].LauncherX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].LauncherY) / 3", + "" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Launcher", + "=", + "1/3" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Level", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Level", + "=", + "Level.Variable(Level)" + ] + }, + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Game\"", + "" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "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": [] + } + ], + "behaviorsSharedData": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, + { + "name": "SpeedPathMovement", + "type": "CurvedMovement::SpeedPathMovement" + }, + { + "name": "Turret", + "type": "Turret::Turret" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Game", + "lastChangeTimeStamp": 0, + "name": "UpdateRemainingColors", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "remainingColors" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "colors", + "valueIteratorVariableName": "color", + "keyIteratorVariableName": "index", + "conditions": [ + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(color)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SceneVariablePushString" + }, + "parameters": [ + "remainingColors", + "VariableString(color)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "VariableChildCount(remainingColors)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "levelCompleted", + "True" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button States", + "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.", + "version": "1.0.0", + "description": [ + "Tracks player interaction with an object, including:", + "- hovered", + "- pressed", + "- clicked" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button", + "fsm" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "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(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", + "TouchY(Object.Behavior::PropertyTouchId(), 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(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "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": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "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": [ + "Object.Behavior::PropertyTouchId()" + ] + } + ] + } + ], + "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", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, { "author": "", "category": "", From e7cb04f7fecfd49881a0b3bb7af5793828661eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 18:21:50 +0200 Subject: [PATCH 048/114] Use the time formatter extension. --- examples/smoothy/smoothy.json | 120 +++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 735ceb700..b7eb161ea 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4851,7 +4851,7 @@ "parameters": [ "Countdown", "=", - "ToString(floor(Variable(Countdown) / 60)) + \":\" + ToString(floor(mod(Variable(Countdown), 60)))" + "TimeFormatter::SecondsToHHMMSS(Variable(Countdown))" ] } ] @@ -5831,6 +5831,124 @@ } ], "eventsFunctionsExtensions": [ + { + "author": "@Bouh", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Time formatting", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLWRpZ2l0YWwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiw2QTIsMiAwIDAsMCAwLDhWMTZBMiwyIDAgMCwwIDIsMThIMjJBMiwyIDAgMCwwIDI0LDE2VjhBMiwyIDAgMCwwIDIyLDZNMiw4SDIyVjE2SDJNMyw5VjEwLjVINi4yNUwzLDE1SDQuNzVMOCwxMC41VjlNOS4yNSw5VjEwLjVIMTAuNzVWOU0xMiw5VjEwLjVIMTMuNVYxNUgxNVY5TTE3LDlBMSwxIDAgMCwwIDE2LDEwVjE0QTEsMSAwIDAsMCAxNywxNUgyMEExLDEgMCAwLDAgMjEsMTRWMTBBMSwxIDAgMCwwIDIwLDlNMTcuNSwxMC41SDE5LjVWMTMuNUgxNy41TTkuMjUsMTMuNVYxNUgxMC43NVYxMy41IiAvPjwvc3ZnPg==", + "name": "TimeFormatter", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/clock-digital.svg", + "shortDescription": "Converts seconds into standard time formats, such as HH:MM:SS. ", + "version": "0.0.2", + "description": [ + "Ideal for displaying timers on screen.", + "", + "Formats included:", + "* HH:MM:SS", + "* HH:MM:SS.000 (displays milliseconds)" + ], + "origin": { + "identifier": "TimeFormatter", + "name": "gdevelop-extension-store" + }, + "tags": [ + "time", + "timer", + "format", + "hours", + "minutes", + "seconds", + "milliseconds" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Format time in seconds to HH:MM:SS.", + "fullName": "Format time in seconds to HH:MM:SS", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setSeconds(time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 8); // MM:SS\r", + " } else {\r", + " return date.toISOString().substr(14, 5); // HH:MM:SS\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + ], + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Format time in seconds to HH:MM:SS.000, including milliseconds.", + "fullName": "Format time in seconds to HH:MM:SS.000", + "functionType": "StringExpression", + "name": "SecondsToHHMMSS000", + "sentence": "Format time _PARAM1_ to HH:MM:SS in _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var format_time = function (time_second) {\r", + " date = new Date(null);\r", + " date.setMilliseconds(1000*time_second);\r", + " if (time_second >= 3600) {\r", + " return date.toISOString().substr(11, 12); // MM:SS.000\r", + " } else {\r", + " return date.toISOString().substr(14, 9); // HH:MM:SS.000\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = format_time(eventsFunctionContext.getArgument(\"TimeInSeconds\"));" + ], + "parameterObjects": "", + "useStrict": false, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Time, in seconds", + "name": "TimeInSeconds", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, { "author": "", "category": "User interface", From 0154e0786d118856d8df7961e57efe66ae68053c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 19:01:46 +0200 Subject: [PATCH 049/114] Bubble generator. --- examples/smoothy/smoothy.json | 564 +++++++++++++++++++++++----------- 1 file changed, 381 insertions(+), 183 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index b7eb161ea..cf8ca3319 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -874,7 +874,7 @@ }, { "assetStoreId": "", - "name": "StartLocation", + "name": "Spawner", "tags": "", "type": "Sprite", "updateIfNotVisible": false, @@ -910,6 +910,12 @@ "CurrentLength": 0, "IsLookingBack": false, "Viewpoint": "Top-Down" + }, + { + "name": "SpwanerBehavior", + "type": "Smoothy::SpwanerBehavior", + "ObjectStack": "ObjectStack", + "ColorCount": 4 } ], "animations": [ @@ -2472,7 +2478,7 @@ }, "parameters": [ "StartLocation", - "StartLocation", + "Spawner", "GlobalVariable(Levels[GlobalVariable(Level)].StartX)", "GlobalVariable(Levels[GlobalVariable(Level)].StartY)", "" @@ -2483,7 +2489,7 @@ "value": "CurvedMovement::SpeedPathMovement::SetPath" }, "parameters": [ - "StartLocation", + "Spawner", "SpeedPathMovement", "\"Gutter\"", "1", @@ -2496,7 +2502,7 @@ "value": "CurvedMovement::SpeedPathMovement::DrawDebug" }, "parameters": [ - "StartLocation", + "Spawner", "SpeedPathMovement", "GutterPainter", "" @@ -2592,139 +2598,50 @@ ], "events": [ { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ChangeTimeScale" - }, - "parameters": [ - "", - "0.25" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "0.9", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "2", - "conditions": [], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "6", + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" + "value": "ChangeTimeScale" }, "parameters": [ "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" + "0.25" ] - }, + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "Create" + "value": "ZoomCamera" }, "parameters": [ "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", + "0.9", "", "" ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "+", - "1" - ] } ] }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "6", + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { @@ -2733,71 +2650,173 @@ }, "parameters": [ "index", - "-", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" + "=", + "0" ] - }, + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "2", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "6", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Spawner", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } ] }, { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "StartLocation", - "ObjectStack", - "BoardBubble", - "" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "6", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Spawner", + "ObjectStack", + "BoardBubble", + "" + ] + } ] } ] } - ] + ], + "parameters": [] } ] } @@ -2838,6 +2857,24 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::Refill" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2887,7 +2924,7 @@ }, "parameters": [ "", - "StartLocation", + "Spawner", "ObjectStack", "BoardBubble", "" @@ -2900,7 +2937,7 @@ "value": "ObjectStack::ObjectStack::Remove" }, "parameters": [ - "StartLocation", + "Spawner", "ObjectStack", "BoardBubble", "" @@ -3070,7 +3107,7 @@ }, "parameters": [ "", - "StartLocation", + "Spawner", "ObjectStack", "BoardBubble", "" @@ -3083,7 +3120,7 @@ "value": "ObjectStack::ObjectStack::Remove" }, "parameters": [ - "StartLocation", + "Spawner", "ObjectStack", "BoardBubble", "" @@ -3515,8 +3552,8 @@ "parameters": [ "", "InsertedBubble", - "StartLocation.X()", - "StartLocation.Y()", + "Spawner.X()", + "Spawner.Y()", "" ] }, @@ -4794,7 +4831,7 @@ "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ - "StartLocation", + "Spawner", "ObjectStack", "BoardBubble", "" @@ -5127,6 +5164,10 @@ "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" }, + { + "name": "SpwanerBehavior", + "type": "Smoothy::SpwanerBehavior" + }, { "name": "Turret", "type": "Turret::Turret" @@ -13563,6 +13604,161 @@ } ], "sharedPropertyDescriptors": [] + }, + { + "description": "", + "fullName": "", + "name": "SpwanerBehavior", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "Refill", + "functionType": "Action", + "name": "Refill", + "sentence": "Refill _PARAM0_ with _PARAM2_", + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Height" + }, + "parameters": [ + "Object", + "ObjectStack", + "<", + "4", + "" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "randomColorIndex", + "=", + "Random(Object.Behavior::PropertyColorCount() - 1)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "RandomInRange(1, 2)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(randomColorIndex)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Object stack", + "description": "", + "group": "", + "extraInformation": [ + "ObjectStack::ObjectStack" + ], + "hidden": false, + "name": "ObjectStack" + }, + { + "value": "4", + "type": "Number", + "unit": "Dimensionless", + "label": "Color count", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ColorCount" + } + ], + "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] @@ -14481,11 +14677,11 @@ "objectGroups": [] }, { - "description": "The number of objects in the stack.", + "description": "the number of objects in the stack.", "fullName": "Stack height", - "functionType": "Expression", + "functionType": "ExpressionAndCondition", "name": "Height", - "sentence": "", + "sentence": "the number of objects in the stack", "events": [ { "type": "BuiltinCommonInstructions::JsCode", @@ -14495,7 +14691,8 @@ "", "/** @type {gdjs.RuntimeObject[]} */", "const stack = behavior.objectStack;", - "eventsFunctionContext.returnValue = stack.length;" + "eventsFunctionContext.returnValue = stack.length;", + "" ], "parameterObjects": "Object", "useStrict": true, @@ -14522,9 +14719,10 @@ }, { "description": "Compare the number of objects in the stack.", - "fullName": "Stack height", + "fullName": "Stack height (deprecated)", "functionType": "Condition", "name": "CheckHeight", + "private": true, "sentence": "_PARAM0_ has _PARAM2_ objects in its stack", "events": [ { From c6a7dde940f5488b3eca5d1fa55c35ac815b2b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 19:49:09 +0200 Subject: [PATCH 050/114] Leaderboard scene. --- .../smoothy/assets/Grey Button_Hovered.png | Bin 0 -> 2208 bytes examples/smoothy/assets/Grey Button_Idle.png | Bin 0 -> 2353 bytes .../smoothy/assets/Grey Button_Pressed.png | Bin 0 -> 2118 bytes examples/smoothy/smoothy.json | 3674 ++++++++++++++++- 4 files changed, 3607 insertions(+), 67 deletions(-) create mode 100644 examples/smoothy/assets/Grey Button_Hovered.png create mode 100644 examples/smoothy/assets/Grey Button_Idle.png create mode 100644 examples/smoothy/assets/Grey Button_Pressed.png diff --git a/examples/smoothy/assets/Grey Button_Hovered.png b/examples/smoothy/assets/Grey Button_Hovered.png new file mode 100644 index 0000000000000000000000000000000000000000..628c879d7b074683459175ff43829bbb077f72e7 GIT binary patch literal 2208 zcmds3`#;nBAAfIi%XOn|8Jk*BDwnTlLb-ib7DD7f$D|{DZzuMsdP%)uEjy?&+i&L&)0U}-H?;FfB_jM@+A^yL;9;28zzqZUJ z>sR(K_W4&>8ew22KNN1bW6KSZ$4j$L4wRL){+>Z9*Jv(QQjf)*)(&%}lpwtY51PFN zUPR+mmAAhwH$D_~d=)(ln`~nqZQhN~u{^S25EeUhh;H4ox=uF;J(@whW3w!Y>PbAh zLm4C^=Dwv5m;w}teqCnfu!KIGW z)l@8`nOua{@zSjd^voCG2XV7=iR+Ti%ME$}fe6L*7u@4~NJ2u#`NxUle$DV<9TaKp zcxdS7m$&Y}nX_IK*yGV>(v(YB&To!EGv=j4vz2&*q)N}wUa(C+d0rVQS7o27>aM83 zJz*?DDJl3lzGw%gHe1 z>~t$#Wkp8|hWhXk~6Pj;z`7+YAZJRQ2hZh2)~o@_Ld|*eS+n?%y_cvIUf1X;F%S9~bfB+>7^ms1!;) z0wS_$$`hy1X)>Ap)0>DvirL!0l2B-@2K0yKhfGpYz5K3}Jq@cmTc(BZ?0aFglnQnh zdHY=zUbc#+!4VZ(zdgue_$D{{zbcWyXo8b>edU?mXyUgqsdi0_@exhB;x!XU7 zJM8*U+QtffcS(`3PkR{iNLz~_5{b@E@NP{SQOe~z3u^50C&ov&PJa3*E1Fj$*63IJ zR50jPq($|d|1w;+=1C4(Wii&u{p1kZSl&A|s{fFNX1#=4#xP6TjWFAOSEafly+Typ zD|4Qer3ZW2ovT|f6i|n2YI;h(?}B`E`yS~nbp&O)WGj}~@J(gN;g46*q^FM&2 z{v2$#*oI*LJBb1;_!5_R;Ef|>XjJ;q>Cqi5;6fJGlmra1MnycHBe=l|{;CTwoBJYW zA-3nce9C#D#!d*k9&(f61^E!f;~Hs?5sL62#tLJ4>?}Z@dJwZHd?}pyM^;^3G`;IY zIF<~}pz5b$Xb43_kd1W@Jm50$BFElwTa>gn0Kb5M=WeqW+qI1sKXAf=vmzOZi5OSc zLDomrC=hrre_-j%H4i6`SMbyBC)OfXfkL>XrtUZZg z|KW6)v^!cn*`~%?OgZhq6LuXE$N|3(9DkJMEbi|qd_$H3Zti$KS9j8T)-l& z(D&N{4Di9u;ny#y7tq8nGG#kTRrwFy#uKsvU7*{?Pc4bpvR8kM3@=|cu?A5fEHJWv zW^iX=QPERzIY65b0SRI+SC-F=H_HgsC;& z#lzY%E|^V4aI1DzRDL$Mv%5On6d6hVpR)0DJh%yxrGddI?*#(`=xf&k9QR|$-oXf* z9mpB|3(q4kJxe4$CE%d@$w|YlM-FiRE=TW@^&3=On z3{yEeJY4roKwGX^eSq0qJk%P$T87s~sZ>C9iHR1r3I`sb1EcX>v2lYqR zT=bLn+;{McUFut7Z#00yu~st5OLz8h2&;R5Fr~p33Wd687K+_%JWnjkk*Ix2U`pvN zZ!hHJyiXo#Wv>@eXFyS!vk~-=r&Do}>5W8*n|F!)j47?2pZK O0Vw1XP`y)7#{U8P9oX0a literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/Grey Button_Idle.png b/examples/smoothy/assets/Grey Button_Idle.png new file mode 100644 index 0000000000000000000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z3#qxWbhYn_u>@g*!>E>$Ln^`R% z^&Y5@1F%`b?;Jh3lh7b_Xmr#u6cQYx>q@D|0Uu{iKF@a>@fS>oPtbD_@(xfCn+}J* zqukKcO04}gISIYqx@$5%fCeZ{i`qhu7}7**)5^=BA$}R7bN?p6FQuGu;^VNz3h3$S zSgBN^t{Zdq@oeUvW5+QB3^6zT6n*}p#yUhu`hjaDr-`PBIz+Y-;?*~I?@K9WNMU+} zJKfyG4{kNj_doH-nm2M$Cj^fvHZbdb!Z#W6Vp}OyQIKLQBtY1sL3O2)#awrsdX4ot z7gAcPoiwvvrX%(VWX`%9*~I}kULwWY`;0}*6e$o%p>vzz_Qo^+U>AE}CV1H^vh z0D6?978E|$W`S6G)-K5%9x#&qyg3CEx2truZC`n7m632E&#!zApIpXyvBPJiQ)Xv# z^Q$7iy**(n-)vg0owzgIl_UANBX#HIB#8lPOBixw*O6{s3+8%oLu;x4C`7M$dVN6_ z+&oee73lE^>+yQu4J0zqvljdN=reuf|$r~ z+nJi^_Jw?B#Nq7qC17i77x+kiI-$juD2rEDFV)+BcjaX*T{%=0HK#pr25keNi+W+D zdv2fVG8iyUfe-_rg=xy+dI8snT2z$z%dl0)ZQ8YOd2zE%ogKNrM8#E2*^1Ic(dDwe zo;IJUqkoE4HPQRY;Y603NgzR1(1VuPViOxAY3*YM=^Q>T3&SvvY2VaJ{aB z%e=cy?jSY|s$NRKM7XxJL{tXJ<>vMH4jh&XO5I0mR~&;zL#RSMTKe3;TDDPgMUW8u uR=bG+^Rcz8Di`_c5ikN+3BxkB{- literal 0 HcmV?d00001 diff --git a/examples/smoothy/assets/Grey Button_Pressed.png b/examples/smoothy/assets/Grey Button_Pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..e22c00b1c7fbbf916016a5c5506a614d0af427b3 GIT binary patch literal 2118 zcmds(`#%%ju_2y2AZ$wX4*x+zK_LvxusqnKu~3>%Kqb`XcKj^t9ghE8tD zwU%z~_044t79y7oVWYy=_xtPjKlr{LkN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is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "GlobalVariable(Score)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "GlobalVariable(Score)", + "PlayerNameInput.Text()" + ] + }, + { + "type": { + "value": "ModVarGlobalTxt" + }, + "parameters": [ + "PlayerName", + "=", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"LevelSelection\"", + "" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 167797870, + "ambientLightColorG": 6032144, + "ambientLightColorR": 8563600, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "Background", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 3, + "ambientLightColorG": 134217728, + "ambientLightColorR": 1597197633, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "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": [] + } + ], + "behaviorsSharedData": [] + } + ], + "externalEvents": [ + { + "associatedLayout": "Game", + "lastChangeTimeStamp": 0, + "name": "UpdateRemainingColors", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Find which colors are still on the board because only these colors will be given to the player when he shoots." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "remainingColors" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "colors", + "valueIteratorVariableName": "color", + "keyIteratorVariableName": "index", + "conditions": [ + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "BoardBubble", + "VariableString(color)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SceneVariablePushString" + }, + "parameters": [ + "remainingColors", + "VariableString(color)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "VariableChildCount(remainingColors)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "levelCompleted", + "True" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Panel sprite button", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K", + "name": "PanelSpriteButton", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg", + "shortDescription": "A button that can be customized.", + "version": "1.4.4", + "description": [ + "The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.", + "", + "There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)." + ], + "origin": { + "identifier": "PanelSpriteButton", + "name": "gdevelop-extension-store" + }, + "tags": [ + "button", + "ui" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the button object.", + "fullName": "Button finite state machine", + "name": "ButtonFSM", + "objectType": "", + "private": true, + "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": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::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": "PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::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": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", + "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::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": "PanelSpriteButton::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(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::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": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::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": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTouchId()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteButton::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "defaultName": "Button", + "description": "A button that can be customized.", + "fullName": "Button (panel sprite)", + "name": "PanelSpriteButton", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Idle", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Hovered", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Pressed", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Hovered", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Place the label over the backgrounds." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Label", + "=", + "2" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "yes" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the right background accordingly to the new state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Idle", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + }, + "parameters": [ + "Object", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"", + "0", + "\"linear\"", + "Object.PropertyHoveredFadeOutDuration() * 1000", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteObject::Opacity" + }, + "parameters": [ + "Hovered", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "PanelSpriteObject::SetOpacity" + }, + "parameters": [ + "Hovered", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsHovered" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Hovered", + "Tween", + "\"Fadeout\"" + ] + }, + { + "type": { + "value": "PanelSpriteObject::SetOpacity" + }, + "parameters": [ + "Hovered", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Hovered" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Pressed", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Idle" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Hovered", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Pressed" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Resize", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Width()", + "!=", + "max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Height()", + "!=", + "max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Idle", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteButton::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Idle.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsIdle" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsClicked" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsHovered" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsFocused" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::ButtonFSM::IsPressed" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change the text of the button label.", + "fullName": "Label text", + "functionType": "Action", + "name": "SetLabelText", + "sentence": "Change the text of _PARAM0_ to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "GetArgumentAsString(\"LabelText\")" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::CenterLabel" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Text", + "name": "LabelText", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the label text.", + "fullName": "Label text", + "functionType": "StringExpression", + "name": "LabelText", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Label.String()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.", + "fullName": "", + "functionType": "Expression", + "name": "CenterWithPaddingY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.", + "fullName": "", + "functionType": "Action", + "name": "CenterLabel", + "private": true, + "sentence": "Center the label of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Label", + "=", + "Object.PropertyLeftPadding()", + "=", + "Object.PropertyTopPadding()" + ] + }, + { + "type": { + "value": "TextObject::WrappingWidth" + }, + "parameters": [ + "Label", + "=", + "Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Label", + "=", + "Object.CenterWithPaddingY()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsPressed" + }, + "parameters": [ + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "+", + "Object.PropertyPressedLabelOffsetY()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Idle", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if interactions are activated on the button.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Idle", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteButton::PanelSpriteButton", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Label offset on Y axis when pressed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PressedLabelOffsetY" + }, + { + "value": "0", + "type": "Number", + "label": "Left padding", + "description": "", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "hidden": false, + "name": "LeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Right padding", + "description": "", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "hidden": false, + "name": "RightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Top padding", + "description": "", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "hidden": false, + "name": "TopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bottom padding", + "description": "", + "group": "Padding", + "extraInformation": [ + "Label" + ], + "hidden": false, + "name": "BottomPadding" + }, + { + "value": "0.25", + "type": "Number", + "label": "Hovered fade out duration (in seconds)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HoveredFadeOutDuration" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Text", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Idle", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [ + { + "folded": true, + "name": "State", + "type": "string", + "value": "Idle" + } + ], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteButton::ButtonFSM", + "ShouldCheckHovering": true + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Hovered", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Pressed", + "rightMargin": 0, + "tags": "", + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + } + ] + } + ] + }, { "author": "@Bouh", "category": "User interface", From 692233225a2240857c6f5f47aa6bfdca0f408a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 20:07:33 +0200 Subject: [PATCH 051/114] Add an object for the end of the path. --- examples/smoothy/assets/Hole.png | Bin 0 -> 737 bytes examples/smoothy/smoothy.json | 154 ++++++++++++++++++++++++++++++- 2 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 examples/smoothy/assets/Hole.png diff --git a/examples/smoothy/assets/Hole.png b/examples/smoothy/assets/Hole.png new file mode 100644 index 0000000000000000000000000000000000000000..cbb224e4f9d46a59e5c7a34eab97a3aeded53143 GIT binary patch literal 737 zcmV<70v`Q|P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10&Yn} zK~z}7#g|QM6Hyd~pL1uLrZyznl2B;_MyxBbeqi_QLd3Xo<;uU{QddD#&~BuE!VeH! zso=s2f>_*GE3Sm5l4{Zkl%`E<(#*_pkwz=6G-=b!vl?dLzVFPObMJdZRcVId{{CpS z%T241aa2cuW5D6f$IHMxsxyL2{qjODi^bwBC&e>2L9YRaXpVJ6p5W?4 z&MAG{lYwMXden{G74!yRvo~rWlXke2$!4|Ew1H$IHjE|DK~K>hrY+aKI$vDN?`mLh z@W@%?`>%mGZABOG?R0K&Y4*Pc>Tk~b_KW{DVSE0CtWz#D?wH0!DkWiTeRgo-05arS z){A6PdbSy;Rbuy08R6hLj~l)9&o8LAnta_ywYN&y_PpV&Q!W^QdY^Yp93WD&tPFsh z=9y5IJpt6v1)a0MP&q z#0&vrfRzCCO9sdWXkgBuIulqEsD3trOa*1Y7xPBq@pz=$suqCWPH)9kuY15aj#EbD zY3H{=ee5_+x!#7ZPSgWr$Jj8K2Y&)dJvz%|2dnSl_rmhrKZ(c=momU~2joA5dslDo z7)n!#$bf5EAA#fniT}i|jplOeKelB;fUHw4;9FNf7Y;x?hkBQ`if=OjkXu}ub)vX;WU+q4Ad+uBXGTi z&1wzRM+P&|sP;Wi#|;vRL?moB(%_G&$eGO`vvoYr3ViaBw;NvQmE$<&X4d@;h;jf9 Trq@9S00000NkvXXu0mjf@`qWU literal 0 HcmV?d00001 diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index de4cd93e8..d60d29b4c 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -253,6 +253,15 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", "name": "Grey Button_Pressed.png" } + }, + { + "alwaysLoaded": false, + "file": "assets/Hole.png", + "kind": "image", + "metadata": "", + "name": "assets\\Hole.png", + "smoothed": true, + "userAdded": true } ], "resourceFolders": [] @@ -2455,6 +2464,47 @@ "g": 255, "r": 255 } + }, + { + "assetStoreId": "", + "name": "Hole", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Hole.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 16, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] } ], "events": [ @@ -2547,6 +2597,18 @@ "" ] }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "GlobalVariable(Levels[GlobalVariable(Level)].StartX) + CurvedMovement::PathEndX(\"Gutter\")", + "GlobalVariable(Levels[GlobalVariable(Level)].StartY) + CurvedMovement::PathEndY(\"Gutter\")", + "" + ] + }, { "type": { "value": "Create" @@ -5063,6 +5125,31 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "BoardBubble" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -5639,6 +5726,47 @@ ] } ] + }, + { + "assetStoreId": "", + "name": "Hole", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Hole.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 16, + "y": 16 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] } ], "events": [ @@ -5714,8 +5842,8 @@ "Level.VariableString(Level)", "1", "", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].StartX) / 3 + CurvedMovement::PathEndX(Level.VariableString(Level)) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].StartY) / 3 + CurvedMovement::PathEndY(Level.VariableString(Level)) / 3", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", "" ] }, @@ -5730,6 +5858,28 @@ "" ] }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "Level.X() + (GlobalVariable(Levels[GlobalVariable(Level)].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", + "Level.Y() + (GlobalVariable(Levels[GlobalVariable(Level)].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", + "" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Hole", + "=", + "1/3" + ] + }, { "type": { "value": "Create" From b0c47595cd86d4ffa27f72792bfef2fb80584619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 20:17:46 +0200 Subject: [PATCH 052/114] Fix color given to players. --- examples/smoothy/smoothy.json | 171 +++++++++++++++++++++++----------- 1 file changed, 118 insertions(+), 53 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d60d29b4c..fc3e196f6 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -341,38 +341,7 @@ "objectsGroups": [], "variables": [ { - "name": "remainingColors", - "type": "array", - "children": [ - { - "type": "string", - "value": "Yellow" - }, - { - "type": "string", - "value": "Green" - }, - { - "type": "string", - "value": "Blue" - }, - { - "type": "string", - "value": "Purple" - }, - { - "type": "string", - "value": "Red" - }, - { - "folded": true, - "type": "string", - "value": "Grey" - } - ] - }, - { - "name": "colors", + "name": "ColorNames", "type": "array", "children": [ { @@ -2530,26 +2499,6 @@ } ], "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "AimingBubble", - "=", - "4 + 0 * RandomInRange(0,5)" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "PreviewBubble", - "=", - "4 + 0 * RandomInRange(0,5)" - ] - }, { "type": { "value": "CurvedMovement::CreatePathFromSvg" @@ -2645,6 +2594,24 @@ "" ] }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + ] + }, { "type": { "value": "MettreAutour" @@ -2741,6 +2708,23 @@ } ] }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "AimingBubble", + "=", + "4" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -3601,7 +3585,7 @@ }, "parameters": [ "PreviewBubble", - "VariableString(remainingColors[RandomInRange(0, VariableChildCount(remainingColors) - 1)])" + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] } ] @@ -17421,6 +17405,87 @@ } ], "objectGroups": [] + }, + { + "description": "the color count of the object.", + "fullName": "Color count", + "functionType": "ExpressionAndCondition", + "group": "SpwanerBehavior configuration", + "name": "ColorCount", + "sentence": "the color count", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyColorCount()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ColorCount", + "name": "SetColorCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetPropertyColorCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ From 186f0cc6b586041d40fe0d8d8602162c54152d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 21:03:19 +0200 Subject: [PATCH 053/114] Fix rewinding not stopping. --- examples/smoothy/smoothy.json | 77 ++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index fc3e196f6..12c18f615 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14725,29 +14725,66 @@ "=", "\"StopOrTaillingPush\"" ] - }, - { - "type": { - "value": "CompareArgumentAsNumber" - }, - "parameters": [ - "\"QueueIndexFromTail\"", - ">", - "0" - ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"QueueIndexFromTail\"", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"QueueIndexFromTail\"", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "64", + "" + ] + } ] } ] From 734ff8413153dc8b105b5aed8c782f872a3aede3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 21:11:22 +0200 Subject: [PATCH 054/114] Disable logs. --- examples/smoothy/smoothy.json | 345 ++-------------------------------- 1 file changed, 16 insertions(+), 329 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 12c18f615..17efd2848 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3038,16 +3038,6 @@ "BoardBubble", "" ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"First bubble\"", - "", - "" - ] } ], "events": [ @@ -3977,16 +3967,6 @@ "True" ] }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind impact!!!\"", - "", - "" - ] - }, { "type": { "value": "Delete" @@ -11394,6 +11374,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -11493,6 +11474,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -11649,6 +11631,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -11986,6 +11969,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -12524,6 +12508,7 @@ "sentence": "Merge _PARAM6_ from _PARAM1_ at _PARAM3_ number _PARAM8_ with the bubble queue ahead", "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -13205,34 +13190,6 @@ "name": "InsertedBubbleBehavior", "objectType": "Sprite", "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "fullName": "Initialize", "functionType": "Action", @@ -13784,287 +13741,6 @@ ] } ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Object", - "FreedDistance", - "=", - "32" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "BoardBubble", - "Object", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "PositionOnPath", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "Speed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "BubbleIndex", - "=", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "QueueIndex", - "=", - "Gutter.ObjectStack::HeightOf(BubbleQueue)" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"BubbleIndex: \" + Object.VariableString(BubbleIndex)", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Actually insert the bubble in the queue." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsBetween" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Object.Variable(QueueIndex)", - "Object.Variable(QueueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "StartLocation.X()", - "StartLocation.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "BoardBubble", - "Object.AnimationName()" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Object.Variable(PositionOnPath)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Object.Variable(Speed)", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "Object.Variable(BubbleIndex)", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Object", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::MatchBubblesOld" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Object.Variable(QueueIndex)", - "Object.Variable(BubbleIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ] - } - ] } ], "parameters": [ @@ -14589,6 +14265,7 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -14880,6 +14557,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -15474,6 +15152,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -16013,6 +15692,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16087,6 +15767,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16208,6 +15889,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16282,6 +15964,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16586,6 +16269,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16655,6 +16339,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16946,6 +16631,7 @@ "sentence": "", "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -17044,6 +16730,7 @@ "sentence": "", "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From f2baf8a1fa7bebf1471dc6a096d1b2263e46ba52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 4 Jun 2023 21:43:25 +0200 Subject: [PATCH 055/114] Add colors progressively. --- examples/smoothy/smoothy.json | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 17efd2848..c797fc9eb 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3038,6 +3038,16 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "+", + "1" + ] } ], "events": [ @@ -3235,6 +3245,90 @@ "Variable(lastBubbleSpeed)", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "128" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "max(5, Spawner.SpwanerBehavior::ColorCount())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "256" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "max(6, Spawner.SpwanerBehavior::ColorCount())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", + "", + "" + ] } ] } @@ -4913,6 +5007,16 @@ "0", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "-", + "1" + ] } ] }, From e03563c32313e69f50fbaeec61545c6be72748cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 7 Jun 2023 21:10:30 +0200 Subject: [PATCH 056/114] Remove keyboard controls. --- examples/smoothy/smoothy.json | 330 +++++++++------------------------- 1 file changed, 81 insertions(+), 249 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index c797fc9eb..3f340f656 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3348,26 +3348,17 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyPressed" - }, - "parameters": [ - "", - "Left" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Turret::Turret::MoveCounterClockwise" + "value": "MettreAutour" }, "parameters": [ + "AimingBubble", "Launcher", - "Turret", - "" + "48", + "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())" ] } ] @@ -3377,86 +3368,82 @@ "conditions": [ { "type": { - "value": "KeyPressed" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "", - "Right" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "Space" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } ] - } - ], - "actions": [ + }, { "type": { - "value": "Turret::Turret::MoveClockwise" + "value": "FireBullet::FireBullet::IsReadyToShoot" }, "parameters": [ - "Launcher", - "Turret", + "AimingBubble", + "FireBullet", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Let time for the launcher to point toward the mouse.\nThe 3° margin is because the mouse is followed by simulating key press.\nSo, it won't stop right toward the mouse beause of inertia." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [ { "type": { - "inverted": true, - "value": "CursorMovement::CursorStayStill" + "value": "FireBullet::FireBullet::Fire" }, "parameters": [ - "", - "1", + "AimingBubble", + "FireBullet", + "AimingBubble.X()", + "AimingBubble.Y()", + "MovingBubble", + "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())", + "690", "" ] }, { "type": { - "inverted": true, - "value": "KeyPressed" + "value": "SetAnimationName" }, "parameters": [ - "", - "Left" + "MovingBubble", + "AimingBubble.AnimationName()" ] }, { "type": { - "inverted": true, - "value": "KeyPressed" + "value": "SetAnimationName" }, "parameters": [ - "", - "Right" + "AimingBubble", + "PreviewBubble.AnimationName()" ] - } - ], - "actions": [ + }, { "type": { - "value": "Turret::Turret::MoveToward" + "value": "SetAnimationName" }, "parameters": [ - "Launcher", - "Turret", - "MouseX(\"\", 0)", - "MouseY(\"\", 0)", - "3", - "" + "PreviewBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] } ] @@ -3466,212 +3453,58 @@ "conditions": [ { "type": { - "value": "Turret::Turret::IsMoving" - }, - "parameters": [ - "Launcher", - "Turret", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "value": "BuiltinCommonInstructions::Or" }, - "comment": "Aim exactly at the mouse.\nIt also allows to aim without hovering, on a touch device for instance." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { "value": "MouseButtonReleased" }, "parameters": [ "", - "Left" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetAimingAngleToward" - }, - "parameters": [ - "Launcher", - "Turret", - "MouseX(\"\", 0)", - "MouseY(\"\", 0)", - "3" + "Right" ] }, { "type": { - "value": "MettreAutour" + "value": "KeyReleased" }, "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" + "", + "LShift" ] } ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "animationName", + "=", + "PreviewBubble.AnimationName()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Right" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "animationName", - "=", - "PreviewBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(animationName)" - ] - } + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "AimingBubble.AnimationName()" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "KeyReleased" - }, - "parameters": [ - "", - "LShift" - ] - }, - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - } - ] - }, - { - "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "AimingBubble.X()", - "AimingBubble.Y()", - "MovingBubble", - "Launcher.Turret::AimingAngle()", - "690", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "PreviewBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" - ] - } + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(animationName)" ] } ] @@ -14369,7 +14202,6 @@ "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From 9c84ed6c5ae572aec06df9ac72e7e48735b2e5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 7 Jun 2023 23:56:52 +0200 Subject: [PATCH 057/114] Better save states when merging and splitting. --- examples/smoothy/smoothy.json | 1818 ++++++++------------------------- 1 file changed, 402 insertions(+), 1416 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 3f340f656..306080341 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -11261,6 +11261,92 @@ "useStrict": true, "eventsSheetExpanded": false }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the head state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "headState", + "=", + "BubbleQueue.BubbleQueueBehavior::HeadState()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "headComboLevel", + "=", + "BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "headSplitTimerExists", + "False" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "BubbleQueue", + "\"HeadSplit\"", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "headSplitTimerExists", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "headSplitTimerValue", + "=", + "BubbleQueue.ObjectTimerElapsedTime(\"HeadSplit\")" + ] + } + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -11410,6 +11496,79 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set back the head state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=", + "VariableString(headState)", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadComboLevel" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=", + "Variable(headComboLevel)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "headSplitTimerExists", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedTimer::SetObjectTimerElapsedTime" + }, + "parameters": [ + "", + "=", + "Variable(headSplitTimerValue)", + "BubbleQueue", + "\"HeadSplit\"", + "" + ] + } + ] + } + ] + }, { "disabled": true, "type": "BuiltinCommonInstructions::Standard", @@ -12699,26 +12858,6 @@ } ], "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "tailState", - "=", - "BubbleQueue.BubbleQueueBehavior::TailState()" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "tailComboLevel", - "=", - "BubbleQueue.BubbleQueueBehavior::TailComboLevel()" - ] - }, { "type": { "value": "ObjectStack::ObjectStack::MoveAllOnTop" @@ -12751,6 +12890,94 @@ "" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the tail state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "tailState", + "=", + "BubbleQueue.BubbleQueueBehavior::TailState()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "tailComboLevel", + "=", + "BubbleQueue.BubbleQueueBehavior::TailComboLevel()" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "tailSplitTimerExists", + "=" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "BubbleQueue", + "\"TailSplit\"", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "tailSplitTimerExists", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "tailSplitTimerValue", + "=", + "BubbleQueue.ObjectTimerElapsedTime(\"TailSplit\")" + ] + } + ] + } + ] + } ] }, { @@ -12795,36 +13022,87 @@ }, { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadJustMerged" }, "parameters": [ "BubbleQueue", "BubbleQueueBehavior", - "=", - "VariableString(tailState)", - "" + "=" ] - }, + } + ], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailComboLevel" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=", - "Variable(tailComboLevel)", - "" - ] + "comment": "Set back the tail state." }, { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadJustMerged" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=", + "VariableString(tailState)", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailComboLevel" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "=", + "Variable(tailComboLevel)", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "tailSplitTimerExists", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedTimer::SetObjectTimerElapsedTime" + }, + "parameters": [ + "", + "=", + "Variable(tailSplitTimerValue)", + "BubbleQueue", + "\"TailSplit\"", + "" + ] + } + ] + } ] } ] @@ -31421,1399 +31699,107 @@ "eventsBasedObjects": [] }, { - "author": "D8H", - "category": "Movement", + "author": "", + "category": "", "extensionNamespace": "", - "fullName": "Turret movement", + "fullName": "", "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI4LDMxSDR2LTJjMC0xLjEsMC45LTIsMi0yaDIwYzEuMSwwLDIsMC45LDIsMlYzMXoiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02LDI3YzAtNS41LDQuNS0xMCwxMC0xMHMxMCw0LjUsMTAsMTAiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xNCwxN1YzYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYxNCIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjE0IiB5MT0iMTQiIHgyPSIxOCIgeTI9IjE0Ii8+DQo8L3N2Zz4NCg==", - "name": "Turret", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Cleaning/Cleaning_cleaning_clean_plunger.svg", - "shortDescription": "A turret movement with customizable speed, acceleration and stop angles.", - "version": "1.1.0", - "description": [ - "With this behavior, you can make an object rotate like a turret toward a position.", - "It may be used with the **Bullet** extension to fire objects." - ], - "origin": { - "identifier": "Turret", - "name": "gdevelop-extension-store" - }, - "tags": [ - "turret", - "movement", - "rotation", - "rotate", - "pivot", - "axis", - "aim", - "shoot", - "bullet", - "tank", - "tower" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRpbWVyLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMjBBNyw3IDAgMCwxIDUsMTNBNyw3IDAgMCwxIDEyLDZBNyw3IDAgMCwxIDE5LDEzQTcsNyAwIDAsMSAxMiwyME0xOS4wMyw3LjM5TDIwLjQ1LDUuOTdDMjAsNS40NiAxOS41NSw1IDE5LjA0LDQuNTZMMTcuNjIsNkMxNi4wNyw0Ljc0IDE0LjEyLDQgMTIsNEE5LDkgMCAwLDAgMywxM0E5LDkgMCAwLDAgMTIsMjJDMTcsMjIgMjEsMTcuOTcgMjEsMTNDMjEsMTAuODggMjAuMjYsOC45MyAxOS4wMyw3LjM5TTExLDE0SDEzVjhIMTFNMTUsMUg5VjNIMTVWMVoiIC8+PC9zdmc+", + "name": "AdvancedTimer", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/632ad4b4fbdffa09f26d1e73058989bd488b2441c4e85b125c6db16c39c1a1c3_timer-outline.svg", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + "eventsFunctions": [ { - "description": "A turret movement with customizable speed, acceleration and stop angles.", - "fullName": "Turret movement", - "name": "Turret", - "objectType": "", - "eventsFunctions": [ + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ObjectTimerElapsedTime", + "name": "SetObjectTimerElapsedTime", + "sentence": "", + "events": [ { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", - "events": [ + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const timerName = eventsFunctionContext.getArgument(\"Timer\");", + "const timerValue = eventsFunctionContext.getArgument(\"Value\");", + "", + "for (const object of objects) {", + " object.unpauseTimer(timerName);", + " object._timers.get(timerName).setTime(timerValue * 1000);", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Timer's name", + "name": "Timer", + "supplementaryInformation": "objectobjectTimer", + "type": "identifier" + }, + { + "description": "Time in seconds", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the elapsed time of an object timer.", + "fullName": "Object timer value", + "functionType": "ExpressionAndCondition", + "name": "ObjectTimerElapsedTime", + "sentence": "the timer _PARAM1_ of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Deceleration", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Turret::Turret::PropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "value": "Turret::Turret::PropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::And" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "inverted": true, - "value": "Turret::Turret::PropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "Turret::Turret::PropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ] - } - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "-", - "Object.Behavior::PropertyDeceleration() * TimeDelta()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "Object.Behavior::PropertyDeceleration() * TimeDelta()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Acceleration", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "Turret::Turret::PropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "+", - "Object.Behavior::PropertyAcceleration() * TimeDelta()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertySpeedMax()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertySpeedMax()" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - }, - { - "type": { - "inverted": true, - "value": "Turret::Turret::PropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "-", - "Object.Behavior::PropertyAcceleration() * TimeDelta()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "- Object.Behavior::PropertySpeedMax()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "- Object.Behavior::PropertySpeedMax()" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Angle", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "Object.Behavior::PropertyAimingAngle() + Object.Behavior::PropertySpeed() * TimeDelta()", - "Object.Variable(turret_Speed) * TimeDelta()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyHasMoved" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertySpeed" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyHasMoved" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Controls Reset", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ] - }, - { - "type": { - "value": "Turret::Turret::SetPropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "False" - ] - } - ] - } - ], - "parameters": [] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the turret is moving.", - "fullName": "Is moving", - "functionType": "Condition", - "name": "IsMoving", - "sentence": "_PARAM0_ is moving", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyHasMoved" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Move clockwise.", - "fullName": "Move clockwise", - "functionType": "Action", - "name": "MoveClockwise", - "sentence": "Move _PARAM0_ clockwise", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyMustMoveClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Move counter-clockwise.", - "fullName": "Move counter-clockwise", - "functionType": "Action", - "name": "MoveCounterClockwise", - "sentence": "Move _PARAM0_ counter-clockwise", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyMustMoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onCreated", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "(Object.Behavior::PropertyAngleMin() + Object.Behavior::PropertyAngleMax()) / 2", - "(mod(Object.Behavior::PropertyAngleMin(), 360) + mod(Object.Behavior::PropertyAngleMax(), 360)) / 2" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Origin angle is the farest angle from AngleMin and AngleMax, it's used by MoveToward" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyOriginAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "(Object.Behavior::PropertyAngleMin() + Object.Behavior::PropertyAngleMax()) / 2 - 180" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Set angle toward a position.", - "fullName": "Set aiming angle toward a position", - "functionType": "Action", - "name": "SetAimingAngleToward", - "sentence": "Set the aiming angle of _PARAM0_ toward _PARAM2_;_PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()", - "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - }, - { - "description": "X position", - "name": "TargetX", - "type": "expression" - }, - { - "description": "Y position", - "name": "TargetY", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Move toward a position.", - "fullName": "Move toward a position", - "functionType": "Action", - "name": "MoveToward", - "sentence": "Move _PARAM0_ toward _PARAM2_; _PARAM3_ within a _PARAM4_° margin", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use OriginAngle to obtain an angle that is the nearest from AngleMin and AngleMax" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyTargetAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "mod(ToDeg(atan2(GetArgumentAsNumber(\"TargetY\") - Object.Y(), GetArgumentAsNumber(\"TargetX\") - Object.X())) - Object.Behavior::PropertyOriginAngle(), 360) + Object.Behavior::PropertyOriginAngle()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "There is stop angles" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyAngleMin()", - "<", - "Object.Behavior::PropertyAngleMax()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyTargetAngle() + GetArgumentAsNumber(\"AngleMargin\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyTargetAngle() - GetArgumentAsNumber(\"AngleMargin\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "No stop angle, the direction is chosen according to the shortest path (never more that 180°)" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyAngleMin()", - "=", - "Object.Behavior::PropertyAngleMax()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(180 + Object.Behavior::PropertyTargetAngle() - Object.Behavior::PropertyAimingAngle(), 360)", - "<", - "180 - GetArgumentAsNumber(\"AngleMargin\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveCounterClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "mod(180 + Object.Behavior::PropertyAimingAngle() - Object.Behavior::PropertyTargetAngle(), 360)", - "<", - "180 - GetArgumentAsNumber(\"AngleMargin\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::MoveClockwise" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - }, - { - "description": "X position", - "name": "TargetX", - "type": "expression" - }, - { - "description": "Y position", - "name": "TargetY", - "type": "expression" - }, - { - "description": "Angle margin", - "name": "AngleMargin", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Change the aiming angle.", - "fullName": "Aiming angle", - "functionType": "Action", - "name": "SetAimingAngle", - "sentence": "Change the aiming angle of _PARAM0_ to _PARAM2_°", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsNumber(\"AimingAngle\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use mod to avoid the angle value to be too large." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyAngleMin()", - "=", - "Object.Behavior::PropertyAngleMax()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "mod(Object.Behavior::PropertyAimingAngle(), 360)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "SetReturnNumber" }, - "comment": "There are stop angles, the angle is bounded by these." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Egal" - }, - "parameters": [ - "Object.Behavior::PropertyAngleMin()", - "<", - "Object.Behavior::PropertyAngleMax()" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "Object.Behavior::PropertyAngleMax()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyAngleMax()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "Object.Behavior::PropertyAngleMin()" - ] - } - ], - "actions": [ - { - "type": { - "value": "Turret::Turret::SetPropertyAimingAngle" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::PropertyAngleMin()" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Turret::Turret::PropertyRotate" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAngle" - }, - "parameters": [ - "Object", - "=", - "Object.Behavior::PropertyAimingAngle()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - }, - { - "description": "Aiming angle", - "name": "AimingAngle", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Aiming angle (between 0° and 360° if no stop angle are set).", - "fullName": "Aiming angle", - "functionType": "Expression", - "name": "AimingAngle", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyAimingAngle()" - ] - } + "parameters": [ + "Object.ObjectTimerElapsedTime(GetArgumentAsString(\"Timer\"))" ] } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Turret::Turret", - "type": "behavior" - } - ], - "objectGroups": [] + ] } ], - "propertyDescriptors": [ - { - "value": "360", - "type": "Number", - "label": "Maximum rotation speed (in degrees per second)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "SpeedMax" - }, - { - "value": "1440", - "type": "Number", - "label": "Acceleration", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Acceleration" - }, - { - "value": "36000", - "type": "Number", - "label": "Deceleration", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Deceleration" - }, - { - "value": "true", - "type": "Boolean", - "label": "Rotate the object", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Rotate" - }, - { - "value": "0", - "type": "Number", - "label": "Maximum angle (use the same value for min and max to set no constraint)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "AngleMax" - }, - { - "value": "0", - "type": "Number", - "label": "Minimum angle (use the same value for min and max to set no constraint)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "AngleMin" - }, - { - "value": "0", - "type": "Number", - "label": "Aiming angle property", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "AimingAngle" - }, - { - "value": "", - "type": "Number", - "label": "Speed", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Speed" - }, - { - "value": "", - "type": "Boolean", - "label": "Must move clockwise", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MustMoveClockwise" - }, - { - "value": "", - "type": "Boolean", - "label": "Must move counter-clockwise", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MustMoveCounterClockwise" - }, - { - "value": "", - "type": "Boolean", - "label": "Has moved", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "HasMoved" - }, + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "value": "", - "type": "Number", - "label": "Target angle (MoveToward)", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TargetAngle" + "description": "Object", + "name": "Object", + "type": "objectList" }, { - "value": "", - "type": "Number", - "label": "Origin angle: the farest angle from AngleMin and AngleMax", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "OriginAngle" + "description": "Timer's name", + "name": "Timer", + "supplementaryInformation": "objectobjectTimer", + "type": "identifier" } ], - "sharedPropertyDescriptors": [] + "objectGroups": [] } ], + "eventsBasedBehaviors": [], "eventsBasedObjects": [] } ], From 442a156d846c6c9b261f1e05708315b070ca5403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 10 Jun 2023 20:48:22 +0200 Subject: [PATCH 058/114] Add a gutter behavior. --- examples/smoothy/smoothy.json | 421 +++++++++++++++++++++++++++++----- 1 file changed, 363 insertions(+), 58 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 306080341..718eed28b 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -8,6 +8,8 @@ }, "properties": { "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, "folderProject": false, "orientation": "portrait", "packageName": "com.example.smoothy", @@ -2612,17 +2614,6 @@ "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] }, - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "AimingBubble", - "Launcher", - "48", - "Launcher.Turret::AimingAngle()" - ] - }, { "type": { "value": "ObjectStack::ObjectStack::AddOnTop" @@ -4312,6 +4303,27 @@ "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::UpdateFirstHeadPosition" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4382,53 +4394,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "headPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Head position: \" + VariableString(headPosition)", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -13317,6 +13282,152 @@ ], "objectGroups": [] }, + { + "fullName": "Update first head position", + "functionType": "Action", + "name": "UpdateFirstHeadPosition", + "sentence": "Update the position value of the _PARAM5_ at the head of _PARAM3_ from _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "headPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head position: \" + VariableString(headPosition)", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "First head position", + "functionType": "ExpressionAndCondition", + "name": "HeadPosition", + "sentence": "the first head position", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(headPosition)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, { "description": "Return the speed necessary to cover a distance according to the deceleration.", "fullName": "Speed to reach", @@ -17452,6 +17563,200 @@ } ], "sharedPropertyDescriptors": [] + }, + { + "description": "", + "fullName": "Gutter", + "name": "GutterBehavior", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "Update first head position", + "functionType": "Action", + "name": "UpdateFirstHeadPosition", + "sentence": "Update the position value of the _PARAM4_ at the head of _PARAM2_ from _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::SetPropertyFirstQueueHeadPosition" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Head position: \" + ToString(Object.Behavior::PropertyFirstQueueHeadPosition())", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the first queue head position of the gutter.", + "fullName": "First queue head position", + "functionType": "ExpressionAndCondition", + "name": "FirstQueueHeadPosition", + "sentence": "the first queue head position", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFirstQueueHeadPosition()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Object stack", + "description": "", + "group": "", + "extraInformation": [ + "ObjectStack::ObjectStack" + ], + "hidden": false, + "name": "ObjectStack" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "First queue head position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FirstQueueHeadPosition" + } + ], + "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] From 367d700ecdb78b4e36da3543f8d0489edb13e31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 10 Jun 2023 22:30:01 +0200 Subject: [PATCH 059/114] Move all queue speed changes in the same function. --- examples/smoothy/smoothy.json | 1155 ++++++++++++++++++--------------- 1 file changed, 648 insertions(+), 507 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 718eed28b..5f16fa6f2 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2183,6 +2183,12 @@ "variables": [], "effects": [], "behaviors": [ + { + "name": "GutterBehavior", + "type": "Smoothy::GutterBehavior", + "ObjectStack": "ObjectStack", + "FirstQueueHeadPosition": 0 + }, { "name": "ObjectStack", "type": "ObjectStack::ObjectStack" @@ -2512,6 +2518,18 @@ "" ] }, + { + "type": { + "value": "Smoothy::GutterBehavior::SetPathName" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "\"Gutter\"", + "" + ] + }, { "type": { "value": "Create" @@ -4309,12 +4327,11 @@ "actions": [ { "type": { - "value": "Smoothy::UpdateFirstHeadPosition" + "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" }, "parameters": [ - "", "Gutter", - "ObjectStack", + "GutterBehavior", "BubbleQueue", "ObjectStack", "BoardBubble", @@ -4326,44 +4343,36 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::Contains" + "value": "ModVarScene" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] - }, + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::HeadState" + "value": "VarScene" }, "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=", - "\"Idle\"", - "" + "queueIndex", + ">=", + "0" ] } ], + "conditions": [], "actions": [], "events": [ { @@ -4371,24 +4380,31 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "BeginningBoostIsActive", - "True" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" ] } ], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" }, "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", "BoardBubble", "SpeedPathMovement", - "64", - "-889", "" ] } @@ -4396,322 +4412,16 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "headPosition", - ">=", - "1/2 * CurvedMovement::PathLength(\"Gutter\")" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "ModVarScene" }, "parameters": [ - "BeginningBoostIsActive", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "BeginningBoostIsActive", - "False" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "headPosition", - "<", - "7/8 * CurvedMovement::PathLength(\"Gutter\")" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "64", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "64", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "-64", - "" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Normal speed\"", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "headPosition", - ">=", - "7/8 * CurvedMovement::PathLength(\"Gutter\")" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Slow speed\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "17.8", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "-17.8", - "" - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "BoardBubble", - "SpeedPathMovement", - "Gutter.ObjectStack::Height() - 1 - Variable(queueIndex)", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" + "queueIndex", + "-", + "1" ] } ] @@ -5162,6 +4872,10 @@ "name": "FireBullet", "type": "FireBullet::FireBullet" }, + { + "name": "GutterBehavior", + "type": "Smoothy::GutterBehavior" + }, { "name": "InsertedBubble", "type": "Smoothy::InsertedBubbleBehavior" @@ -13282,152 +12996,6 @@ ], "objectGroups": [] }, - { - "fullName": "Update first head position", - "functionType": "Action", - "name": "UpdateFirstHeadPosition", - "sentence": "Update the position value of the _PARAM5_ at the head of _PARAM3_ from _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "headPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] - } - ], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Head position: \" + VariableString(headPosition)", - "", - "" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "First head position", - "functionType": "ExpressionAndCondition", - "name": "HeadPosition", - "sentence": "the first head position", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Variable(headPosition)" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [], - "objectGroups": [] - }, { "description": "Return the speed necessary to cover a distance according to the deceleration.", "fullName": "Speed to reach", @@ -14570,8 +14138,295 @@ "fullName": "Update bubble speed", "functionType": "Action", "name": "SetBubblesSpeed", - "sentence": "Update speed of _PARAM2_ from _PARAM0_ for the rewind animation (queue index from tail: _PARAM4_)", + "sentence": "Update the speed of _PARAM5_ from _PARAM0_ for the rewind animation in _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::HeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-889", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + ">=" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-64", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Normal speed\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + ">=" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Slow speed\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "17.8", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "-17.8", + "" + ] + } + ] + } + ] + } + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -14736,12 +14591,15 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "inverted": true, + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "\"QueueIndexFromTail\"", - ">", - "0" + "", + "Gutter", + "ObjectStack", + "Object", + "" ] } ], @@ -14765,12 +14623,14 @@ "conditions": [ { "type": { - "value": "CompareArgumentAsNumber" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "\"QueueIndexFromTail\"", - "=", - "0" + "", + "Gutter", + "ObjectStack", + "Object", + "" ] } ], @@ -15195,6 +15055,23 @@ "supplementaryInformation": "Smoothy::BubbleQueueBehavior", "type": "behavior" }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { "description": "Board bubble", "name": "BoardBubble", @@ -15205,11 +15082,6 @@ "name": "SpeedPathMovement", "supplementaryInformation": "CurvedMovement::SpeedPathMovement", "type": "behavior" - }, - { - "description": "Queue index from tail", - "name": "QueueIndexFromTail", - "type": "expression" } ], "objectGroups": [] @@ -17649,6 +17521,35 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::FirstQueueHeadPosition" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1/2 * CurvedMovement::PathLength(Object.Behavior::PathName())", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::SetPropertyIsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] } ], "parameters": [ @@ -17729,6 +17630,182 @@ } ], "objectGroups": [] + }, + { + "description": "the path name of the object.", + "fullName": "Path name", + "functionType": "ExpressionAndCondition", + "name": "PathName", + "sentence": "the path name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPathName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PathName", + "name": "SetPathName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if beginning boost is enabled.", + "fullName": "Beginning boost is enabled", + "functionType": "Condition", + "name": "IsBeginningBostEnabled", + "sentence": "_PARAM0_ beginning boost is enabled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::PropertyIsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Near death", + "functionType": "Condition", + "name": "IsNearDeath", + "sentence": "_PARAM0_ is near to death", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::FirstQueueHeadPosition" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior:: PropertyNearDeathLengthRatio() * CurvedMovement::PathLength(Object.Behavior::PropertyPathName())", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -17752,8 +17829,72 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, + "hidden": true, "name": "FirstQueueHeadPosition" + }, + { + "value": "", + "type": "String", + "label": "Path name", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathName" + }, + { + "value": "true", + "type": "Boolean", + "label": "Beginning boost is enabled", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsBeginningBostEnabled" + }, + { + "value": "17.8", + "type": "Number", + "unit": "PixelSpeed", + "label": "Near death speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "NearDeathSpeed" + }, + { + "value": "0.875", + "type": "Number", + "unit": "Dimensionless", + "label": "Near death length ratio", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "NearDeathLengthRatio" + }, + { + "value": "1", + "type": "Number", + "unit": "Second", + "label": "Near death transition duration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "NearDeathTransitionDuration" + }, + { + "value": "64", + "type": "Number", + "unit": "PixelSpeed", + "label": "Normal speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "NormalSpeed" } ], "sharedPropertyDescriptors": [] From 2df9cbce64b8720cc25c3baab203817bea7d9356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 10 Jun 2023 22:44:17 +0200 Subject: [PATCH 060/114] Small simplification. --- examples/smoothy/smoothy.json | 671 +++++++++++++++------------------- 1 file changed, 291 insertions(+), 380 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 5f16fa6f2..390ea1423 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4347,83 +4347,17 @@ "actions": [ { "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" }, "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "Gutter", - "GutterBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } + "BubbleQueue", + "BubbleQueueBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] } ] @@ -14143,18 +14077,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "Object", - "" - ] - }, { "type": { "value": "ObjectStack::Contains" @@ -14166,63 +14088,50 @@ "BoardBubble", "" ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::HeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"", - "" - ] } ], "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "-889", + "GetArgumentAsString(\"QueueIndexFromTail\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", + "", "" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Tail state have precedence over head state." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, "parameters": [ - "Gutter", - "GutterBehavior", - "" + "Object", + "Behavior", + "=", + "\"Idle\"" ] } ], @@ -14233,292 +14142,294 @@ "conditions": [ { "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsNearDeath" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ - "Gutter", - "GutterBehavior", - ">=" + "Object", + "Behavior", + "=", + "\"Idle\"" ] } ], "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "64", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" - ] - } - ] + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Gutter push" }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "64", + "", + "Gutter", + "ObjectStack", + "Object", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "-64", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-889", + "" + ] + } ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Normal speed\"", - "", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - ">=" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Slow speed\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "17.8", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "-17.8", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + ">=" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "64", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "-64", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Normal speed\"", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + ">=" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Slow speed\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "17.8", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::Speed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">", + "17.8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "17.8", + "-17.8", + "" + ] + } + ] + } + ] + } ] } ] } ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "GetArgumentAsString(\"QueueIndexFromTail\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Tail state have precedence over head state." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Idle state speed is decided in the scene events." - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"" - ] - } - ], - "actions": [] }, { "type": "BuiltinCommonInstructions::Comment", @@ -17716,7 +17627,7 @@ "fullName": "Beginning boost is enabled", "functionType": "Condition", "name": "IsBeginningBostEnabled", - "sentence": "_PARAM0_ beginning boost is enabled", + "sentence": "Beginning boost is enabled for _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", From 80ce8e077ea1f4ea0316bb090038847f7c1f001a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 11 Jun 2023 15:04:53 +0200 Subject: [PATCH 061/114] Fix queue states. --- examples/smoothy/smoothy.json | 195 +++++++++++++++------------------- 1 file changed, 88 insertions(+), 107 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 390ea1423..5cf0822b7 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2759,7 +2759,7 @@ "events": [ { "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "6", + "repeatExpression": "4", "conditions": [], "actions": [ { @@ -2834,7 +2834,7 @@ }, { "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "6", + "repeatExpression": "4", "conditions": [], "actions": [ { @@ -11148,6 +11148,15 @@ "Variable(headComboLevel)", "" ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "BubbleQueue", + "\"HeadSplit\"" + ] } ], "events": [ @@ -11160,7 +11169,7 @@ }, "parameters": [ "headSplitTimerExists", - "" + "True" ] } ], @@ -12611,16 +12620,6 @@ } ], "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "insertedBubbleIndex", - "=", - "BubbleQueue.ObjectStack::Height() - 1" - ] - }, { "type": { "value": "ObjectStack::ObjectStack::MoveAllOnTop" @@ -12632,16 +12631,6 @@ "ObjectStack", "ObjectStack" ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadJustMerged" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=" - ] } ], "events": [ @@ -12684,6 +12673,15 @@ "Variable(tailComboLevel)", "" ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "BubbleQueue", + "\"TailSplit\"" + ] } ], "events": [ @@ -12696,7 +12694,7 @@ }, "parameters": [ "tailSplitTimerExists", - "" + "True" ] } ], @@ -14101,7 +14099,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "GetArgumentAsString(\"QueueIndexFromTail\") + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", + "ToString(Gutter.ObjectStack::HeightOf(Object)) + \": \" + Object.Behavior::PropertyTailState() + \" - \" + Object.Behavior::PropertyHeadState()", "", "" ] @@ -14154,6 +14152,38 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -14607,17 +14637,37 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "64", + "64", + "" + ] + } ] } ] @@ -16035,7 +16085,7 @@ "subInstructions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -16481,76 +16531,6 @@ ], "objectGroups": [] }, - { - "fullName": "Head just merged", - "functionType": "Action", - "name": "SetHeadJustMerged", - "sentence": "Change head state of _PARAM0_ to just merged", - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RewindImpact\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Head just merged\"", - "", - "" - ] - } - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::BubbleQueueBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "fullName": "Tail idle", "functionType": "Action", @@ -32092,7 +32072,7 @@ ], "parameterObjects": "Object", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ], "parameters": [ @@ -32120,6 +32100,7 @@ "fullName": "Object timer value", "functionType": "ExpressionAndCondition", "name": "ObjectTimerElapsedTime", + "private": true, "sentence": "the timer _PARAM1_ of _PARAM2_", "events": [ { From fe1fd9cc4bf4ee2ff234cb3488371e55880985e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 11 Jun 2023 16:20:01 +0200 Subject: [PATCH 062/114] Add a 2nd level. --- examples/smoothy/smoothy.json | 125 +++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 39 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 5cf0822b7..a02c935cf 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -284,10 +284,32 @@ "type": "structure", "children": [ { - "folded": true, - "name": "GutterPath", - "type": "string", - "value": "\"m-16 233s72.5-23.5 123 81c50.3 104 193 128 329 129 135 0.349 334-44.8 336-205 1.3-160-230-211-358-209s-248 64.6-249 176c-0.465 112 158 163 260 164s205-56.8 205-131c0.682-74.4-89.5-128-206-128\"" + "name": "Gutters", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "folded": true, + "name": "Path", + "type": "string", + "value": "m-16 233s72.5-23.5 123 81c50.3 104 193 128 329 129 135 0.349 334-44.8 336-205 1.3-160-230-211-358-209s-248 64.6-249 176c-0.465 112 158 163 260 164s205-56.8 205-131c0.682-74.4-89.5-128-206-128" + }, + { + "name": "StartX", + "type": "number", + "value": -16 + }, + { + "folded": true, + "name": "StartY", + "type": "number", + "value": 233 + } + ] + } + ] }, { "folded": true, @@ -299,17 +321,50 @@ "name": "LauncherY", "type": "number", "value": 240 + } + ] + }, + { + "type": "structure", + "children": [ + { + "name": "Gutters", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "folded": true, + "name": "Path", + "type": "string", + "value": "m-16 57.3s96.9-10.8 102 97.3c-7.68 239 37.9 291 258 289 103-1.27 91.3-125-14.5-85.1-128 48.5-184-33.1-176-166 8-147 229-152 290-153 51.4-0.759 350-24.4 356 200 4.96 207-145 200-243 200-93.7-0.285-97.4-126 20.8-86.9 81.2 26.6 159 12.2 153-108-5.36-105-104-132-178-132-85.1-0.0173-84.7 106-5.43 85.1 78.7-20.8 111 9.5 112 47.1 1.34 57.4-67.1 59.6-135 26.2" + }, + { + "name": "StartX", + "type": "number", + "value": -16 + }, + { + "folded": true, + "name": "StartY", + "type": "number", + "value": 57.3 + } + ] + } + ] }, { - "name": "StartX", + "folded": true, + "name": "LauncherX", "type": "number", - "value": -16 + "value": 327 }, { - "folded": true, - "name": "StartY", + "name": "LauncherY", "type": "number", - "value": 233 + "value": 220 } ] } @@ -2514,7 +2569,7 @@ "parameters": [ "", "\"Gutter\"", - "GlobalVariableString(Levels[GlobalVariable(Level)].GutterPath)", + "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[0].Path)", "" ] }, @@ -2537,8 +2592,8 @@ "parameters": [ "StartLocation", "Spawner", - "GlobalVariable(Levels[GlobalVariable(Level)].StartX)", - "GlobalVariable(Levels[GlobalVariable(Level)].StartY)", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartX)", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartY)", "" ] }, @@ -2573,8 +2628,8 @@ "parameters": [ "StartLocation", "Hole", - "GlobalVariable(Levels[GlobalVariable(Level)].StartX) + CurvedMovement::PathEndX(\"Gutter\")", - "GlobalVariable(Levels[GlobalVariable(Level)].StartY) + CurvedMovement::PathEndY(\"Gutter\")", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(\"Gutter\")", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(\"Gutter\")", "" ] }, @@ -4513,7 +4568,7 @@ }, "parameters": [ "Countdown", - "<", + "=", "0" ] } @@ -4916,7 +4971,14 @@ "zOrder": 1, "numberProperties": [], "stringProperties": [], - "initialVariables": [] + "initialVariables": [ + { + "folded": true, + "name": "Level", + "type": "number", + "value": 1 + } + ] } ], "objects": [ @@ -4988,18 +5050,7 @@ "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ - { - "name": "Turret", - "type": "Turret::Turret", - "SpeedMax": 360, - "Acceleration": 1440, - "Deceleration": 36000, - "Property": false, - "AngleMin": 0, - "AngleMax": 0 - } - ], + "behaviors": [], "animations": [ { "name": "", @@ -5322,8 +5373,8 @@ "parameters": [ "", "StartLocation", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].StartX) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].StartY) / 3", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) / 3", "" ] }, @@ -5342,7 +5393,7 @@ "parameters": [ "", "Level.VariableString(Level)", - "GlobalVariableString(Levels[Level.Variable(Level)].GutterPath)", + "GlobalVariableString(Levels[Level.Variable(Level)].Gutters[0].Path)", "" ] }, @@ -5356,8 +5407,8 @@ "Level.VariableString(Level)", "1", "", - "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", - "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", "" ] }, @@ -5379,8 +5430,8 @@ "parameters": [ "StartLocation", "Hole", - "Level.X() + (GlobalVariable(Levels[GlobalVariable(Level)].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", - "Level.Y() + (GlobalVariable(Levels[GlobalVariable(Level)].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", "" ] }, @@ -5495,10 +5546,6 @@ { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" - }, - { - "name": "Turret", - "type": "Turret::Turret" } ] }, From b781edc47d62413cce3168d377d2af9c7643bf8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 11 Jun 2023 17:07:12 +0200 Subject: [PATCH 063/114] Add a level with 2 gutters. --- examples/smoothy/smoothy.json | 294 +++++++++++++++++++++++++--------- 1 file changed, 215 insertions(+), 79 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a02c935cf..054504105 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -367,6 +367,72 @@ "value": 220 } ] + }, + { + "type": "structure", + "children": [ + { + "name": "Gutters", + "type": "array", + "children": [ + { + "type": "structure", + "children": [ + { + "folded": true, + "name": "Path", + "type": "string", + "value": "m300-16c-0.192 75.1-60.5 84.9-150 111-108 31.9-101 140-100 166 1.32 89.4 41.9 187 187 188 127 0.601 186-25.6 252-61.4 157-85.4 16.8-170 189-261" + }, + { + "name": "StartX", + "type": "number", + "value": 300 + }, + { + "folded": true, + "name": "StartY", + "type": "number", + "value": -16 + } + ] + }, + { + "type": "structure", + "children": [ + { + "folded": true, + "name": "Path", + "type": "string", + "value": "m540 505c0.192-75.1 60.5-84.9 150-111 108-31.9 101-140 100-166-1.32-89.4-41.9-187-187-188-127-0.601-186 25.6-252 61.4-157 85.4-16.8 170-189 261" + }, + { + "name": "StartX", + "type": "number", + "value": 540 + }, + { + "folded": true, + "name": "StartY", + "type": "number", + "value": 505 + } + ] + } + ] + }, + { + "folded": true, + "name": "LauncherX", + "type": "number", + "value": 427 + }, + { + "name": "LauncherY", + "type": "number", + "value": 240 + } + ] } ] } @@ -4941,7 +5007,14 @@ "zOrder": 1, "numberProperties": [], "stringProperties": [], - "initialVariables": [] + "initialVariables": [ + { + "folded": true, + "name": "Level", + "type": "number", + "value": 2 + } + ] }, { "angle": 0, @@ -5372,66 +5445,9 @@ }, "parameters": [ "", - "StartLocation", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) / 3", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "StartLocation" - ] - }, - { - "type": { - "value": "CurvedMovement::CreatePathFromSvg" - }, - "parameters": [ - "", - "Level.VariableString(Level)", - "GlobalVariableString(Levels[Level.Variable(Level)].Gutters[0].Path)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPathTo" - }, - "parameters": [ - "StartLocation", - "SpeedPathMovement", - "Level.VariableString(Level)", - "1", - "", - "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", - "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::DrawDebug" - }, - "parameters": [ - "StartLocation", - "SpeedPathMovement", - "GutterPainter", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Hole", - "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(Level.VariableString(Level))) / 3", - "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(Level.VariableString(Level))) / 3", + "Launcher", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].LauncherX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].LauncherY) / 3", "" ] }, @@ -5440,31 +5456,151 @@ "value": "ChangeScale" }, "parameters": [ - "Hole", + "Launcher", "=", "1/3" ] - }, + } + ], + "events": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Launcher", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].LauncherX) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].LauncherY) / 3", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } ] }, { - "type": { - "value": "ChangeScale" - }, - "parameters": [ - "Launcher", - "=", - "1/3" + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "GlobalVariableChildCount(Levels[Level.Variable(Level)].Gutters)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "StartLocation", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) / 3", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "StartLocation" + ] + }, + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "pathName", + "=", + "Level.VariableString(Level) + \"-\" + VariableString(index)" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(pathName)", + "", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "VariableString(pathName)", + "GlobalVariableString(Levels[Level.Variable(Level)].Gutters[Variable(index)].Path)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPathTo" + }, + "parameters": [ + "StartLocation", + "SpeedPathMovement", + "VariableString(pathName)", + "1", + "", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "StartLocation", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", + "" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Hole", + "=", + "1/3" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + } ] } ] From 93232137e47cdaace99183480e028c98fdc26969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 11 Jun 2023 21:29:24 +0200 Subject: [PATCH 064/114] Handle several gutters. --- examples/smoothy/smoothy.json | 2718 +++++++++++++++++++-------------- 1 file changed, 1612 insertions(+), 1106 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 054504105..21d625633 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -274,7 +274,7 @@ { "name": "Level", "type": "number", - "value": 0 + "value": 2 }, { "name": "Levels", @@ -547,36 +547,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Gutter", - "persistentUuid": "d8afc19a-9ff4-43ab-8fea-c48497dbcc65", - "width": 0, - "x": -112, - "y": -72, - "zOrder": 94, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "BubbleQueue", - "persistentUuid": "105cd689-5e24-4b05-86ac-f97e82b6cc75", - "width": 0, - "x": -112, - "y": 20, - "zOrder": 95, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -2308,7 +2278,8 @@ "name": "GutterBehavior", "type": "Smoothy::GutterBehavior", "ObjectStack": "ObjectStack", - "FirstQueueHeadPosition": 0 + "FirstQueueHeadPosition": 0, + "NearDeathLengthRatio": 0.75 }, { "name": "ObjectStack", @@ -2628,77 +2599,6 @@ } ], "actions": [ - { - "type": { - "value": "CurvedMovement::CreatePathFromSvg" - }, - "parameters": [ - "", - "\"Gutter\"", - "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[0].Path)", - "" - ] - }, - { - "type": { - "value": "Smoothy::GutterBehavior::SetPathName" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "=", - "\"Gutter\"", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Spawner", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartX)", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartY)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "Spawner", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::DrawDebug" - }, - "parameters": [ - "Spawner", - "SpeedPathMovement", - "GutterPainter", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Hole", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartX) + CurvedMovement::PathEndX(\"Gutter\")", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[0].StartY) + CurvedMovement::PathEndY(\"Gutter\")", - "" - ] - }, { "type": { "value": "Create" @@ -2753,17 +2653,6 @@ "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, { "type": { "value": "ModVarSceneTxt" @@ -2796,142 +2685,347 @@ ], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Debug", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ChangeTimeScale" - }, - "parameters": [ - "", - "0.25" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "GlobalVariableChildCount(Levels[GlobalVariable(Level)].Gutters)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Gutter", + "-100", + "-100", + "" ] }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "0.9", - "", - "" - ] - } + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-100", + "-100", + "" ] }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "AimingBubble", - "=", - "4" - ] - } + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } + "type": { + "value": "Smoothy::GutterBehavior::SetPathName" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "\"Gutter\" + VariableString(index)", + "" ] }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "2", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { + "type": { + "value": "Smoothy::GutterBehavior::SetIdentifier" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "Variable(index)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "Gutter.GutterBehavior::PathName()", + "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].Path)", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Spawner", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX)", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY)", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "Spawner", + "Gutter" + ] + }, + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetPathName" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "Gutter.GutterBehavior::PathName()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "Spawner", + "SpeedPathMovement", + "Gutter.GutterBehavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "Spawner", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Spawner" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Gutter" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "BubbleQueue" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "0.25" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "0.9", + "", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "AimingBubble", + "=", + "4" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "2", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "\"Gutter\"", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ @@ -3091,45 +3185,23 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Spawner", "conditions": [ { "type": { - "value": "ObjectStack::HasOnTop" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ "", "Gutter", - "ObjectStack", - "BubbleQueue", + "Spawner", "" ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "ObjectStack" - ] } ], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3139,181 +3211,164 @@ }, "parameters": [ "", - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "Spawner", + "Gutter", "ObjectStack", - "BoardBubble", + "BubbleQueue", "" ] }, { "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" + "value": "ObjectStack::ObjectStack::IsEmpty" }, "parameters": [ "BubbleQueue", "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "+", - "1" + "ObjectStack" ] } ], + "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "BeginningBoostIsActive", - "True" + "", + "Spawner", + "ObjectStack", + "BoardBubble", + "" ] } ], "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ObjectStack::ObjectStack::Remove" }, "parameters": [ + "Spawner", + "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "=", - "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(\"Gutter\"), 889, 64)", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ - "BeginningBoostIsActive", - "False" + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "64", - "" + "SpawnedBubbleCount", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(Gutter.GutterBehavior::PathName()), 889, 64)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "64", + "" + ] + } ] } ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">=", - "32", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lastBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" - ] }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "lastBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AjoutObjConcern" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", - "BoardBubble" + "Gutter", + "ObjectStack", + "BubbleQueue", + "" ] }, { @@ -3322,142 +3377,204 @@ }, "parameters": [ "", - "Spawner", + "BubbleQueue", "ObjectStack", "BoardBubble", "" ] - } - ], - "actions": [ + }, { "type": { - "value": "ObjectStack::ObjectStack::Remove" + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" }, "parameters": [ - "Spawner", - "ObjectStack", "BoardBubble", + "SpeedPathMovement", + ">=", + "32", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" + "value": "ModVarScene" }, "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", + "lastBubbleSpeed", "=", - "Variable(lastBubblePathPosition) - 32", - "" + "BoardBubble.SpeedPathMovement::Speed()" ] - }, + } + ], + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubbleSpeed)", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Spawner", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Spawner", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubblePathPosition) - 32", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "+", + "1" + ] + } ] }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "+", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "=", - "128" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" - }, - "parameters": [ - "Spawner", - "SpwanerBehavior", - "=", - "max(5, Spawner.SpwanerBehavior::ColorCount())", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "=", - "256" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "128" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "max(5, Spawner.SpwanerBehavior::ColorCount())", + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" - }, - "parameters": [ - "Spawner", - "SpwanerBehavior", - "=", - "max(6, Spawner.SpwanerBehavior::ColorCount())", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "256" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "max(6, Spawner.SpwanerBehavior::ColorCount())", + "" + ] + } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", - "", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", + "", + "" + ] + } ] } ] @@ -3676,62 +3793,119 @@ ] } ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::Initialize" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "MovingBubble", - "" - ] + "comment": "TODO Better encapsulate this." }, { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - } + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Spawner", + "Gutter", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "InsertedBubble", + "Spawner.X()", + "Spawner.Y()", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::Initialize" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "MovingBubble", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MovingBubble", + "" + ] + } + ] + } ] }, { @@ -3791,31 +3965,31 @@ "InsertedBubble", "InsertedBubble", "Gutter", + "", "ObjectStack", "BubbleQueue", "ObjectStack", "BoardBubble", - "SpeedPathMovement", - "" + "SpeedPathMovement" ] } ], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::Identifier" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "InsertedBubble.InsertedBubble::GutterIdentifier()", + "" + ] + }, { "type": { "value": "Smoothy::MatchBubbles" @@ -3903,191 +4077,244 @@ "parameters": [] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Queues collision", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Gutter", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Queues collision", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "Smoothy::IsQueueColliding" + "value": "ModVarScene" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] } - ], - "actions": [], - "events": [ + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "VarScene" }, - "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "" - ] - } + "parameters": [ + "queueIndex", + ">", + "0" ] - }, + } + ], + "conditions": [], + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Smoothy::MatchBubblesBetween" + "value": "Smoothy::IsQueueColliding" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "BubbleQueueBehavior", "ObjectStack", "BoardBubble", + "SpeedPathMovement", "Variable(queueIndex)", "" ] } ], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "True" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "ModVarScene" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Score", - "+", - "10 * PickedInstancesCount(BoardBubble)" - ] + "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." }, { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Score", - "+", - "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "BoardBubble", + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "", - "BubbleExplosion", - "BoardBubble.X()", - "BoardBubble.Y()", + "areBubblesMatched", "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ParticleSystem::ParticleColor1" + "value": "Smoothy::MatchBubblesBetween" }, "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" - ] - }, + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ { "type": { - "value": "ParticleSystem::ParticleColor2" + "value": "SetSceneVariableAsBoolean" }, "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" + "areBubblesMatched", + "True" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "10 * PickedInstancesCount(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "BoardBubble", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "BoardBubble.X()", + "BoardBubble.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[BoardBubble.Animation()])" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MergeQueue" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" ] } ] @@ -4096,37 +4323,8 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "" - ] - } - ], + "conditions": [], "actions": [ - { - "type": { - "value": "Smoothy::MergeQueue" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack", - "" - ] - }, { "type": { "value": "ModVarScene" @@ -4140,7 +4338,19 @@ ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -4151,199 +4361,129 @@ }, "parameters": [ "queueIndex", - "-", - "1" + "=", + "Gutter.ObjectStack::Height() - 2" ] } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Combo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 2" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "Smoothy::IsQueueMatching" + "value": "VarScene" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" + "queueIndex", + ">=", + "0" ] } ], + "conditions": [], "actions": [], "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "Smoothy::IsQueueMatching" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Stop rewind\"", - "", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } ] } ] @@ -4353,64 +4493,154 @@ "conditions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "inverted": true, + "value": "Smoothy::IsQueueMatching" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", "Variable(queueIndex)", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Stop rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + "value": "ModVarScene" }, "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" + "queueIndex", + "-", + "1" ] } ] } ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -4418,169 +4648,141 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" }, "parameters": [ - "queueIndex", - "-", - "1" + "BubbleQueue", + "BubbleQueueBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] } ] } - ] + ], + "parameters": [] } - ], - "parameters": [] + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO What if the queue is rewinded completly?" + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Spawner", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Gutter", + "Spawner", + "" + ] + } + ], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" + "value": "ObjectStack::HasOnTop" }, "parameters": [ + "", "Gutter", - "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", "BubbleQueue", "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ "BoardBubble", "SpeedPathMovement", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Spawner", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "Gutter", - "GutterBehavior", - "ObjectStack", "BoardBubble", "SpeedPathMovement", + "=", + "0", "" ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "-", + "1" + ] } ] } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO What if the queue is rewinded completly?" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "-", - "1" - ] - } ] }, { @@ -4653,54 +4855,62 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "0", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "actions": [ + "type": "BuiltinCommonInstructions::ForEach", + "object": "Gutter", + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "GameState", - "=", - "\"GameOver\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"GameOver\"" + ] + } ] } ] @@ -4874,22 +5084,6 @@ } ], "layers": [ - { - "ambientLightColorB": 1702453580, - "ambientLightColorG": 6022704, - "ambientLightColorR": 167801445, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "Borders", - "renderingType": "", - "visibility": true, - "cameras": [], - "effects": [] - }, { "ambientLightColorB": 36, "ambientLightColorG": 7379992, @@ -13203,7 +13397,7 @@ "fullName": "Initialize", "functionType": "Action", "name": "Initialize", - "sentence": "Initialize the animation of _PARAM0_ for the insertion of _PARAM4_ next to _PARAM2_", + "sentence": "Initialize the animation of _PARAM0_ for the insertion of _PARAM8_ next to _PARAM6_ in _PARAM4_ of _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13230,6 +13424,18 @@ "BoardBubble", "" ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] } ], "actions": [], @@ -13377,6 +13583,30 @@ "Object", "" ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] } ], "actions": [ @@ -13387,7 +13617,7 @@ "parameters": [ "Object", "SpeedPathMovement", - "\"Gutter\"", + "Gutter.GutterBehavior::PathName()", "1", "", "" @@ -13461,6 +13691,17 @@ "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", "type": "behavior" }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, { "description": "Bubble queue", "name": "BubbleQueue", @@ -13854,7 +14095,7 @@ "fullName": "Create bubble", "functionType": "Action", "name": "CreateBubble", - "sentence": "Replace _PARAM0_ by a new _PARAM6_ into _PARAM4_ from _PARAM2_", + "sentence": "Replace _PARAM0_ by a new _PARAM7_ into _PARAM5_ from _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -13866,7 +14107,7 @@ "textG": 0, "textR": 0 }, - "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when no other BoardBubble is picked." + "comment": "Get the information on the inserted bubble because a BoardBubble can only be initialized when an other BoardBubble is picked." }, { "type": "BuiltinCommonInstructions::Standard", @@ -13951,6 +14192,17 @@ "=", "Gutter.ObjectStack::HeightOf(BubbleQueue)" ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "GutterIdentifier", + "=", + "Gutter.GutterBehavior::Identifier()" + ] } ], "events": [ @@ -13988,6 +14240,18 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::Identifier" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "Object.Variable(GutterIdentifier)", + "" + ] + }, { "type": { "value": "ObjectStack::ContainsBetween" @@ -14028,7 +14292,7 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "\"Gutter\"", + "Gutter.GutterBehavior::PathName()", "1", "", "" @@ -14111,6 +14375,12 @@ "name": "Gutter", "type": "objectList" }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, { "description": "Object stack", "name": "ObjectStack", @@ -14225,6 +14495,47 @@ } ], "objectGroups": [] + }, + { + "description": "Return the identifier of the gutter where the bubble is inserted.", + "fullName": "Gutter identifier", + "functionType": "Expression", + "name": "GutterIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(GutterIdentifier)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -14258,6 +14569,18 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "Object", + "" + ] + }, { "type": { "value": "ObjectStack::Contains" @@ -14630,7 +14953,7 @@ "BoardBubble", "SpeedPathMovement", "17.8", - "-17.8", + "-64", "" ] } @@ -17341,7 +17664,7 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "\"Gutter\"", + "Object.Behavior::PathName()", "1", "", "" @@ -17481,6 +17804,87 @@ } ], "objectGroups": [] + }, + { + "description": "the path name of the object.", + "fullName": "Path name", + "functionType": "ExpressionAndCondition", + "group": "SpwanerBehavior configuration", + "name": "PathName", + "sentence": "the path name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPathName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PathName", + "name": "SetPathName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetPropertyPathName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -17506,6 +17910,16 @@ "extraInformation": [], "hidden": false, "name": "ColorCount" + }, + { + "value": "", + "type": "String", + "label": "Path name", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PathName" } ], "sharedPropertyDescriptors": [] @@ -17880,6 +18294,87 @@ } ], "objectGroups": [] + }, + { + "description": "the identifier of the object.", + "fullName": "Identifier", + "functionType": "ExpressionAndCondition", + "group": "Gutter configuration", + "name": "Identifier", + "sentence": "the identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Identifier", + "name": "SetIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::SetPropertyIdentifier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -17969,6 +18464,17 @@ "extraInformation": [], "hidden": false, "name": "NormalSpeed" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Identifier", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Identifier" } ], "sharedPropertyDescriptors": [] From 6df68df801e201793c73001fffffb9dbbb2968cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 11 Jun 2023 21:57:09 +0200 Subject: [PATCH 065/114] Register the game and leaderboard identifiers. --- examples/smoothy/smoothy.json | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 21d625633..b7393b94e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -11,7 +11,7 @@ "antialiasingMode": "MSAA", "antialisingEnabledOnMobile": false, "folderProject": false, - "orientation": "portrait", + "orientation": "landscape", "packageName": "com.example.smoothy", "pixelsRounding": false, "projectUuid": "14f2c425-ec16-42f0-9cf9-160a087b5e26", @@ -84,10 +84,10 @@ ], "authorUsernames": [], "categories": [ - "action" + "action", + "puzzle" ], "playableDevices": [ - "keyboard", "mobile" ], "extensionProperties": [], @@ -321,6 +321,12 @@ "name": "LauncherY", "type": "number", "value": 240 + }, + { + "folded": true, + "name": "LeaderboardId", + "type": "string", + "value": "6415f008-1a8f-4cae-857e-00e38983cd7a" } ] }, @@ -365,6 +371,12 @@ "name": "LauncherY", "type": "number", "value": 220 + }, + { + "folded": true, + "name": "LeaderboardId", + "type": "string", + "value": "3140c9fb-fa30-4451-8f2a-45efe16d5512" } ] }, @@ -431,6 +443,12 @@ "name": "LauncherY", "type": "number", "value": 240 + }, + { + "folded": true, + "name": "LeaderboardId", + "type": "string", + "value": "7122d867-1f40-4c35-989a-2c55f15f7e49" } ] } @@ -6538,7 +6556,7 @@ }, "parameters": [ "", - "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "GlobalVariableString(Levels[GlobalVariable(Level)].LeaderboardId)", "GlobalVariable(Score)" ] } @@ -6562,7 +6580,7 @@ }, "parameters": [ "", - "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "GlobalVariableString(Levels[GlobalVariable(Level)].LeaderboardId)", "GlobalVariable(Score)", "PlayerNameInput.Text()" ] @@ -6597,7 +6615,7 @@ }, "parameters": [ "", - "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"", + "GlobalVariableString(Levels[GlobalVariable(Level)].LeaderboardId)", "yes" ] } @@ -6631,7 +6649,7 @@ "value": "Leaderboards::HasLastSaveSucceeded" }, "parameters": [ - "\"2e66ecc2-822b-4860-ae21-80d274657f1d\"" + "GlobalVariableString(Levels[GlobalVariable(Level)].LeaderboardId)" ] } ], From faaa321b356b558f866648fb186a1c7bc265e44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 14 Jun 2023 21:07:26 +0200 Subject: [PATCH 066/114] Add properties for rewinding speed. --- examples/smoothy/smoothy.json | 60 +++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index b7393b94e..cac376b77 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -5151,6 +5151,10 @@ "name": "ObjectStack", "type": "ObjectStack::ObjectStack" }, + { + "name": "PlatformerObject", + "type": "PlatformBehavior::PlatformerObjectBehavior" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" @@ -15409,8 +15413,8 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "-444", - "-1333", + "-Object.Behavior::PropertyRewindingSpeedMax()", + "-Object.Behavior::PropertyRewindingAcceleration()", "" ] } @@ -15627,7 +15631,7 @@ "Object", "\"TailSplit\"", ">=", - "0.3" + "Object.Behavior::PropertyRewindDelay()" ] } ], @@ -15805,7 +15809,7 @@ "Object", "\"TailSplit\"", ">=", - "0.3 + 0.1" + "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" ] } ], @@ -15954,7 +15958,7 @@ "Object", "\"HeadSplit\"", ">=", - "0.3" + "Object.Behavior::PropertyRewindDelay()" ] } ], @@ -16160,7 +16164,7 @@ "Object", "\"HeadSplit\"", ">=", - "0.3 + 0.1" + "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" ] } ], @@ -17611,6 +17615,50 @@ "extraInformation": [], "hidden": true, "name": "HeadComboLevel" + }, + { + "value": "444", + "type": "Number", + "unit": "PixelSpeed", + "label": "Rewinding maximum speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RewindingSpeedMax" + }, + { + "value": "1333", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Rewinding acceleration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RewindingAcceleration" + }, + { + "value": "0.3", + "type": "Number", + "unit": "Second", + "label": "Rewind delay", + "description": "Before the hit-stop", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RewindDelay" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Hit-stop duration", + "description": "Before rewinding", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HitStopDuration" } ], "sharedPropertyDescriptors": [] From 0c5a45fc4b468fe47daa76562c9785ed55ef79d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 14 Jun 2023 21:31:17 +0200 Subject: [PATCH 067/114] Add gutter push speed properties. --- examples/smoothy/smoothy.json | 592 ++++++++++++++++++++++------------ 1 file changed, 387 insertions(+), 205 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index cac376b77..4fe14b75e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14747,11 +14747,13 @@ "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + "value": "CurvedMovement::SpeedPathMovement::Speed" }, "parameters": [ - "Gutter", - "GutterBehavior", + "BoardBubble", + "SpeedPathMovement", + "<=", + "Gutter.GutterBehavior::PushSpeed()", "" ] } @@ -14764,8 +14766,8 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "64", - "-889", + "Gutter.GutterBehavior::PushSpeed()", + "Gutter.GutterBehavior::PushAcceleration()", "" ] } @@ -14776,211 +14778,28 @@ "conditions": [ { "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + "value": "CurvedMovement::SpeedPathMovement::Speed" }, "parameters": [ - "Gutter", - "GutterBehavior", + "BoardBubble", + "SpeedPathMovement", + ">", + "Gutter.GutterBehavior::PushSpeed()", "" ] } ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - ">=" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "64", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "64", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "64", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "64", - "-64", - "" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Normal speed\"", - "", - "" - ] - } - ] - } - ] - }, + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - ">=" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Slow speed\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "17.8", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::Speed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">", - "17.8", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "17.8", - "-64", - "" - ] - } - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Gutter.GutterBehavior::PushSpeed()", + "-Gutter.GutterBehavior::PushDeceleration()", + "" ] } ] @@ -18441,6 +18260,369 @@ } ], "objectGroups": [] + }, + { + "description": "the push speed", + "fullName": "Push speed", + "functionType": "ExpressionAndCondition", + "name": "PushSpeed", + "sentence": "the push speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyNormalSpeed()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyNormalSpeed()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyNearDeathSpeed()" + ] + } + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the push acceleration", + "fullName": "Push acceleration", + "functionType": "ExpressionAndCondition", + "name": "PushAcceleration", + "sentence": "the push acceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "64" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "64" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "17.8" + ] + } + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the push deceleration", + "fullName": "Push deceleration", + "functionType": "ExpressionAndCondition", + "name": "PushDeceleration", + "sentence": "the push deceleration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "889" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "64" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsNearDeath" + }, + "parameters": [ + "Object", + "Behavior", + ">=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "64" + ] + } + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -18491,7 +18673,7 @@ "value": "17.8", "type": "Number", "unit": "PixelSpeed", - "label": "Near death speed", + "label": "Near death push speed", "description": "", "group": "", "extraInformation": [], @@ -18524,7 +18706,7 @@ "value": "64", "type": "Number", "unit": "PixelSpeed", - "label": "Normal speed", + "label": "Normal push speed", "description": "", "group": "", "extraInformation": [], From 82ea75b83cab8e90cc2f4336dde29a855b9359f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 13:49:46 +0200 Subject: [PATCH 068/114] Add a function to create a level. --- examples/smoothy/smoothy.json | 1039 ++++++++++++++++++--------------- 1 file changed, 572 insertions(+), 467 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 4fe14b75e..173b4902d 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2619,14 +2619,42 @@ "actions": [ { "type": { - "value": "Create" + "value": "ModVarSceneTxt" }, "parameters": [ - "StartLocation", + "GameState", + "=", + "\"Playing\"" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Countdown", + "=", + "3 * 60" + ] + }, + { + "type": { + "value": "Smoothy::CreateLevel" + }, + "parameters": [ + "", "Launcher", - "GlobalVariable(Levels[GlobalVariable(Level)].LauncherX)", - "GlobalVariable(Levels[GlobalVariable(Level)].LauncherY)", - "" + "Gutter", + "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "GutterPainter", + "Hole", + "Spawner", + "SpwanerBehavior", + "ObjectStack", + "SpeedPathMovement", + "SpwanerBehavior" ] }, { @@ -2670,243 +2698,9 @@ "AimingBubble", "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "GameState", - "=", - "\"Playing\"" - ] - }, - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "BeginningBoostIsActive", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Countdown", - "=", - "3 * 60" - ] } ], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "GlobalVariableChildCount(Levels[GlobalVariable(Level)].Gutters)", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Gutter", - "-100", - "-100", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BubbleQueue", - "-100", - "-100", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "Smoothy::GutterBehavior::SetPathName" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "=", - "\"Gutter\" + VariableString(index)", - "" - ] - }, - { - "type": { - "value": "Smoothy::GutterBehavior::SetIdentifier" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "=", - "Variable(index)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::CreatePathFromSvg" - }, - "parameters": [ - "", - "Gutter.GutterBehavior::PathName()", - "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].Path)", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Spawner", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX)", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY)", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "Spawner", - "Gutter" - ] - }, - { - "type": { - "value": "Smoothy::SpwanerBehavior::SetPathName" - }, - "parameters": [ - "Spawner", - "SpwanerBehavior", - "=", - "Gutter.GutterBehavior::PathName()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "Spawner", - "SpeedPathMovement", - "Gutter.GutterBehavior::PathName()", - "1", - "", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::DrawDebug" - }, - "parameters": [ - "Spawner", - "SpeedPathMovement", - "GutterPainter", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Hole", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Spawner" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Gutter" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "BubbleQueue" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "+", - "1" - ] - } - ] - } - ] - }, { "colorB": 228, "colorG": 176, @@ -2966,181 +2760,6 @@ ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "2", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "+", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "-", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "\"Gutter\"", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - } - ] - } - ] } ], "parameters": [] @@ -10758,67 +10377,366 @@ "name": "State" }, { - "value": "0", - "type": "Number", - "label": "Touch id", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchId" + "value": "0", + "type": "Number", + "label": "Touch id", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "Smoothy", + "helpPath": "", + "iconUrl": "", + "name": "Smoothy", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "Originally automatically extracted from events of the project", + "tags": [], + "authorIds": [], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "Create gutters", + "functionType": "Action", + "name": "CreateLevel", + "sentence": "Create a level with _PARAM1_ and _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Launcher", + "GlobalVariable(Levels[GlobalVariable(Level)].LauncherX)", + "GlobalVariable(Levels[GlobalVariable(Level)].LauncherY)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "GlobalVariableChildCount(Levels[GlobalVariable(Level)].Gutters)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Gutter", + "-100", + "-100", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleQueue", + "-100", + "-100", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "Smoothy::GutterBehavior::SetPathName" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "\"Gutter\" + VariableString(index)", + "" + ] + }, + { + "type": { + "value": "Smoothy::GutterBehavior::SetIdentifier" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "=", + "Variable(index)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "Gutter.GutterBehavior::PathName()", + "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].Path)", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Spawner", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX)", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY)", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "Spawner", + "Gutter" + ] + }, + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetPathName" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "=", + "Gutter.GutterBehavior::PathName()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "Spawner", + "SpeedPathMovement", + "Gutter.GutterBehavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "Spawner", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", + "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Spawner" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Gutter" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "BubbleQueue" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Launcher", + "name": "Launcher", + "type": "objectList" + }, + { + "description": "Gutter", + "name": "Gutter", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" }, { - "value": "", - "type": "Boolean", - "label": "Touch is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "TouchIsInside" + "description": "Gutter painter", + "name": "GutterPainter", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "objectList" }, { - "value": "", - "type": "Boolean", - "label": "Mouse is inside", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "MouseIsInside" + "description": "Hole", + "name": "Hole", + "supplementaryInformation": "Sprite", + "type": "objectList" }, { - "value": "", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "Index" + "description": "Spawner", + "name": "Spawner", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Spwaner behavior", + "name": "SpwanerBehavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Movement on a curve", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" } ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "Smoothy", - "helpPath": "", - "iconUrl": "", - "name": "Smoothy", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "Originally automatically extracted from events of the project", - "tags": [], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [ + "objectGroups": [] + }, { "fullName": "Match bubbles", "functionType": "Condition", @@ -17580,6 +17498,193 @@ ] } ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "2", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] } ], "parameters": [ From 07d18e000792078a072aee8e120332aced3408d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 14:01:24 +0200 Subject: [PATCH 069/114] Pass the level number as a parameter. --- examples/smoothy/smoothy.json | 40 +++++++++++++++-------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 173b4902d..4ad792720 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2643,6 +2643,7 @@ }, "parameters": [ "", + "GlobalVariable(Level)", "Launcher", "Gutter", "GutterBehavior", @@ -2654,7 +2655,7 @@ "SpwanerBehavior", "ObjectStack", "SpeedPathMovement", - "SpwanerBehavior" + "" ] }, { @@ -3784,18 +3785,6 @@ ], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Pick the matched bubbles instead of removing them to add an explosion effect.\n\nIncrease the combo level of the leading queue." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -10439,10 +10428,10 @@ "dependencies": [], "eventsFunctions": [ { - "fullName": "Create gutters", + "fullName": "Create level", "functionType": "Action", "name": "CreateLevel", - "sentence": "Create a level with _PARAM1_ and _PARAM2_", + "sentence": "Create level _PARAM1_ with _PARAM2_ and _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -10455,8 +10444,8 @@ "parameters": [ "StartLocation", "Launcher", - "GlobalVariable(Levels[GlobalVariable(Level)].LauncherX)", - "GlobalVariable(Levels[GlobalVariable(Level)].LauncherY)", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].LauncherX)", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].LauncherY)", "" ] } @@ -10480,7 +10469,7 @@ }, { "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "GlobalVariableChildCount(Levels[GlobalVariable(Level)].Gutters)", + "repeatExpression": "GlobalVariableChildCount(Levels[GetArgumentAsNumber(\"Level\")].Gutters)", "conditions": [], "actions": [ { @@ -10549,7 +10538,7 @@ "parameters": [ "", "Gutter.GutterBehavior::PathName()", - "GlobalVariableString(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].Path)", + "GlobalVariableString(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].Path)", "" ] }, @@ -10560,8 +10549,8 @@ "parameters": [ "StartLocation", "Spawner", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX)", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY)", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX)", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY)", "" ] }, @@ -10618,8 +10607,8 @@ "parameters": [ "StartLocation", "Hole", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", - "GlobalVariable(Levels[GlobalVariable(Level)].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", "" ] }, @@ -10669,6 +10658,11 @@ } ], "parameters": [ + { + "description": "Level number", + "name": "Level", + "type": "expression" + }, { "description": "Launcher", "name": "Launcher", From 5fb54ed00585c22f0d6d862fa606539bcb9e25f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 14:26:39 +0200 Subject: [PATCH 070/114] Add a function for bubble explosions. --- examples/smoothy/smoothy.json | 211 ++++++++++++++++++---------------- 1 file changed, 112 insertions(+), 99 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 4ad792720..578e48052 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -621,6 +621,10 @@ "variables": [], "effects": [], "behaviors": [ + { + "name": "BoardBubbleBehavior", + "type": "Smoothy::BoardBubbleBehavior" + }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement", @@ -2752,12 +2756,11 @@ "actions": [ { "type": { - "value": "ChangeAnimation" + "value": "SetAnimationName" }, "parameters": [ "AimingBubble", - "=", - "4" + "\"Purple\"" ] } ] @@ -3649,15 +3652,6 @@ } ], "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, { "type": { "value": "ModVarScene" @@ -3667,44 +3661,16 @@ "+", "10 * PickedInstancesCount(BoardBubble)" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "BoardBubble", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BubbleExplosion", - "BoardBubble.X()", - "BoardBubble.Y()", - "" - ] - }, - { - "type": { - "value": "ParticleSystem::ParticleColor1" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" - ] - }, - { - "type": { - "value": "ParticleSystem::ParticleColor2" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" - ] - } + "type": { + "value": "Smoothy::BoardBubbleBehavior::Explode" + }, + "parameters": [ + "BoardBubble", + "BoardBubbleBehavior", + "BubbleExplosion", + "" ] } ] @@ -3830,15 +3796,6 @@ "True" ] }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "BoardBubble", - "" - ] - }, { "type": { "value": "ModVarScene" @@ -3858,44 +3815,16 @@ "+", "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "BoardBubble", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BubbleExplosion", - "BoardBubble.X()", - "BoardBubble.Y()", - "" - ] - }, - { - "type": { - "value": "ParticleSystem::ParticleColor1" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" - ] - }, - { - "type": { - "value": "ParticleSystem::ParticleColor2" - }, - "parameters": [ - "BubbleExplosion", - "VariableString(ColorValues[BoardBubble.Animation()])" - ] - } + "type": { + "value": "Smoothy::BoardBubbleBehavior::Explode" + }, + "parameters": [ + "BoardBubble", + "BoardBubbleBehavior", + "BubbleExplosion", + "" ] } ] @@ -4739,6 +4668,10 @@ } ], "behaviorsSharedData": [ + { + "name": "BoardBubbleBehavior", + "type": "Smoothy::BoardBubbleBehavior" + }, { "name": "BubbleQueueBehavior", "type": "Smoothy::BubbleQueueBehavior" @@ -4759,10 +4692,6 @@ "name": "ObjectStack", "type": "ObjectStack::ObjectStack" }, - { - "name": "PlatformerObject", - "type": "PlatformBehavior::PlatformerObjectBehavior" - }, { "name": "SpeedPathMovement", "type": "CurvedMovement::SpeedPathMovement" @@ -18825,6 +18754,90 @@ } ], "sharedPropertyDescriptors": [] + }, + { + "description": "", + "fullName": "Board bubble", + "name": "BoardBubbleBehavior", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "Explode", + "functionType": "Action", + "name": "Explode", + "sentence": "_PARAM0_ explode into _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BubbleExplosion", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor1" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[Object.Animation()])" + ] + }, + { + "type": { + "value": "ParticleSystem::ParticleColor2" + }, + "parameters": [ + "BubbleExplosion", + "VariableString(ColorValues[Object.Animation()])" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BoardBubbleBehavior", + "type": "behavior" + }, + { + "description": "Bubble explosion", + "name": "BubbleExplosion", + "supplementaryInformation": "ParticleSystem::ParticleEmitter", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [], + "sharedPropertyDescriptors": [] } ], "eventsBasedObjects": [] From 6a0c644b5593088b62fdef1a1f31062f13427b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 18:52:14 +0200 Subject: [PATCH 071/114] Add an action to spawn bubbles. --- examples/smoothy/smoothy.json | 3094 ++++++++++++++++++--------------- 1 file changed, 1704 insertions(+), 1390 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 578e48052..c3de9b1ae 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2809,413 +2809,493 @@ "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::CanSpawnBubble" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], "actions": [ { "type": { - "value": "Smoothy::SpwanerBehavior::Refill" + "value": "Smoothy::SpwanerBehavior::SpawnBubble" }, "parameters": [ "Spawner", "SpwanerBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "ObjectStack", "BoardBubble", "SpeedPathMovement", "" ] } ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "AimingBubble", + "Launcher", + "48", + "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())" + ] + } + ] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Spawner", + "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "Space" + ] + }, + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ] + }, + { + "type": { + "value": "FireBullet::FireBullet::IsReadyToShoot" }, "parameters": [ - "", - "Gutter", - "Spawner", + "AimingBubble", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FireBullet::FireBullet::Fire" + }, + "parameters": [ + "AimingBubble", + "FireBullet", + "AimingBubble.X()", + "AimingBubble.Y()", + "MovingBubble", + "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())", + "690", "" ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "MovingBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "PreviewBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Right" + ] + }, + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "LShift" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "animationName", + "=", + "PreviewBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(animationName)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Insert bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "", + "", + "yes" + ] + }, + { + "type": { + "value": "AjoutHasard" + }, + "parameters": [ + "", + "BoardBubble" + ] } ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Better encapsulate this." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectStack::HasOnTop" + "value": "ObjectStack::Contains" }, "parameters": [ "", - "Gutter", - "ObjectStack", "BubbleQueue", + "ObjectStack", + "BoardBubble", "" ] }, { "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" + "value": "ObjectStack::Contains" }, "parameters": [ - "BubbleQueue", + "", + "Gutter", "ObjectStack", - "ObjectStack" + "BubbleQueue", + "" ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "+", - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(Gutter.GutterBehavior::PathName()), 889, 64)", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "64", - "" - ] - } - ] - } + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Spawner", + "Gutter", + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + ], + "actions": [ { "type": { - "value": "ObjectStack::HasOnTop" + "value": "Create" }, "parameters": [ "", - "Gutter", - "ObjectStack", - "BubbleQueue", + "InsertedBubble", + "Spawner.X()", + "Spawner.Y()", "" ] }, { "type": { - "value": "ObjectStack::HasOnTop" + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, + { + "type": { + "value": "AjoutObjConcern" }, "parameters": [ "", + "BoardBubble" + ] + }, + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::Initialize" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "Gutter", + "GutterBehavior", "BubbleQueue", "ObjectStack", "BoardBubble", + "SpeedPathMovement", + "MovingBubble", "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + "value": "Delete" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">=", - "32", + "MovingBubble", "" ] } - ], - "actions": [ + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::PlayInsertion" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::CreateBubble" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "Gutter", + "", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarScene" + "value": "Smoothy::GutterBehavior::Identifier" }, "parameters": [ - "lastBubblePathPosition", + "Gutter", + "GutterBehavior", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" + "InsertedBubble.InsertedBubble::GutterIdentifier()", + "" ] }, { "type": { - "value": "ModVarScene" + "value": "Smoothy::MatchBubbles" }, "parameters": [ - "lastBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubblePathPosition) - 32", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubbleSpeed)", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "+", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "=", - "128" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" - }, - "parameters": [ - "Spawner", - "SpwanerBehavior", - "=", - "max(5, Spawner.SpwanerBehavior::ColorCount())", - "" - ] - } + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "InsertedBubble.InsertedBubble::QueueIndex()", + "InsertedBubble.InsertedBubble::BubbleIndex()", + "BubbleClipboard", + "ObjectStack", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "=", - "256" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" - }, - "parameters": [ - "Spawner", - "SpwanerBehavior", - "=", - "max(6, Spawner.SpwanerBehavior::ColorCount())", - "" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "10 * PickedInstancesCount(BoardBubble)" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", - "", - "" - ] - } + "type": { + "value": "Smoothy::BoardBubbleBehavior::Explode" + }, + "parameters": [ + "BoardBubble", + "BoardBubbleBehavior", + "BubbleExplosion", + "" ] } ] @@ -3226,515 +3306,375 @@ "parameters": [] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Controls", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Gutter", + "conditions": [], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "MettreAutour" - }, - "parameters": [ - "AimingBubble", - "Launcher", - "48", - "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Queues collision", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "KeyReleased" + "value": "ModVarScene" }, "parameters": [ - "", - "Space" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] - }, + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "VarScene" }, "parameters": [ - "", - "Left" + "queueIndex", + ">", + "0" + ] + } + ], + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueColliding" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::MatchBubblesBetween" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "True" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "10 * PickedInstancesCount(BoardBubble)" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Score", + "+", + "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" + ] + }, + { + "type": { + "value": "Smoothy::BoardBubbleBehavior::Explode" + }, + "parameters": [ + "BoardBubble", + "BoardBubbleBehavior", + "BubbleExplosion", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::MergeQueue" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "BubbleClipboard", + "ObjectStack", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } ] } - ] - }, - { - "type": { - "value": "FireBullet::FireBullet::IsReadyToShoot" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "FireBullet::FireBullet::Fire" - }, - "parameters": [ - "AimingBubble", - "FireBullet", - "AimingBubble.X()", - "AimingBubble.Y()", - "MovingBubble", - "AngleBetweenPositions(Launcher.X(), Launcher.Y(), CursorX(), CursorY())", - "690", - "" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "MovingBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "PreviewBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" ] } - ] + ], + "parameters": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "MouseButtonReleased" + "value": "ModVarScene" }, "parameters": [ - "", - "Right" + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 2" ] - }, + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "KeyReleased" + "value": "VarScene" }, "parameters": [ - "", - "LShift" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "animationName", - "=", - "PreviewBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(animationName)" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Insert bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "MovingBubble", - "BoardBubble", - "", - "", - "yes" - ] - }, - { - "type": { - "value": "AjoutHasard" - }, - "parameters": [ - "", - "BoardBubble" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Better encapsulate this." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "Spawner", - "Gutter", - "" + "queueIndex", + ">=", + "0" ] } ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::Initialize" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "GutterBehavior", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "MovingBubble", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueMatching" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + } ] }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::PlayInsertion" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::IsAnimationFinished" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::CreateBubble" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::Identifier" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "=", - "InsertedBubble.InsertedBubble::GutterIdentifier()", - "" - ] - }, - { - "type": { - "value": "Smoothy::MatchBubbles" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", - "InsertedBubble.InsertedBubble::QueueIndex()", - "InsertedBubble.InsertedBubble::BubbleIndex()", - "BubbleClipboard", - "ObjectStack", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Score", - "+", - "10 * PickedInstancesCount(BoardBubble)" - ] - }, - { - "type": { - "value": "Smoothy::BoardBubbleBehavior::Explode" - }, - "parameters": [ - "BoardBubble", - "BoardBubbleBehavior", - "BubbleExplosion", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Gutter", - "conditions": [], - "actions": [], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Queues collision", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } - ] - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Smoothy::IsQueueColliding" + "inverted": true, + "value": "Smoothy::IsQueueMatching" }, "parameters": [ "", @@ -3752,15 +3692,17 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "areBubblesMatched", + "\"Stop rewind\"", + "", "" ] } @@ -3771,16 +3713,13 @@ "conditions": [ { "type": { - "value": "Smoothy::MatchBubblesBetween" + "value": "ObjectStack::ContainsAt" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", - "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", "Variable(queueIndex)", "" ] @@ -3789,41 +3728,12 @@ "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "True" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Score", - "+", - "10 * PickedInstancesCount(BoardBubble)" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Score", - "+", - "100 * BubbleQueue.BubbleQueueBehavior::HeadComboLevel()" - ] - }, - { - "type": { - "value": "Smoothy::BoardBubbleBehavior::Explode" + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" }, "parameters": [ - "BoardBubble", - "BoardBubbleBehavior", - "BubbleExplosion", + "BubbleQueue", + "BubbleQueueBehavior", + "no", "" ] } @@ -3834,10 +3744,14 @@ "conditions": [ { "type": { - "value": "SceneVariableAsBoolean" + "value": "ObjectStack::ContainsAt" }, "parameters": [ - "areBubblesMatched", + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", "" ] } @@ -3845,32 +3759,14 @@ "actions": [ { "type": { - "value": "Smoothy::MergeQueue" + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" }, "parameters": [ - "", - "Gutter", - "ObjectStack", "BubbleQueue", "BubbleQueueBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "BubbleClipboard", - "ObjectStack", + "no", "" ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] } ] } @@ -3902,7 +3798,7 @@ "colorG": 176, "colorR": 74, "creationTime": 0, - "name": "Combo", + "name": "Move bubbles", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -3912,308 +3808,37 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" }, "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 2" + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] } ] }, { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "VarScene" + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" }, "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Stop rewind\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "Gutter", - "GutterBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" + "BubbleQueue", + "BubbleQueueBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" ] } ] @@ -4387,85 +4012,46 @@ "conditions": [ { "type": { - "value": "VarScene" - }, - "parameters": [ - "Countdown", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "GameState", - "=", - "\"GameOver\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Gutter", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "parameters": [], + "subInstructions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "VarScene" }, "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "0", - "" + "Countdown", + "=", + "0" ] }, { "type": { - "value": "ObjectStack::ContainsAt" + "value": "Smoothy::GutterBehavior::IsAnyBubbleReachHole" }, "parameters": [ - "", + "Gutter", + "GutterBehavior", "BubbleQueue", "ObjectStack", - "BoardBubble", - "0", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" - }, - "parameters": [ "BoardBubble", "SpeedPathMovement", "" ] } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "GameState", - "=", - "\"GameOver\"" - ] - } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"GameOver\"" ] } ] @@ -17310,200 +16896,559 @@ "name": "RewindDelay" }, { - "value": "0.1", - "type": "Number", - "unit": "Second", - "label": "Hit-stop duration", - "description": "Before rewinding", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "HitStopDuration" - } - ], - "sharedPropertyDescriptors": [] - }, - { - "description": "", - "fullName": "", - "name": "SpwanerBehavior", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "Refill", + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Hit-stop duration", + "description": "Before rewinding", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HitStopDuration" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "", + "fullName": "", + "name": "SpwanerBehavior", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "Refill", + "functionType": "Action", + "name": "Refill", + "sentence": "Refill _PARAM0_ with _PARAM2_", + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Height" + }, + "parameters": [ + "Object", + "ObjectStack", + "<", + "4", + "" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "randomColorIndex", + "=", + "Random(Object.Behavior::PropertyColorCount() - 1)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "RandomInRange(1, 2)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(randomColorIndex)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "2", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Spawn bubble", "functionType": "Action", - "name": "Refill", - "sentence": "Refill _PARAM0_ with _PARAM2_", + "name": "SpawnBubble", + "sentence": "_PARAM0_ spawn _PARAM7_ into _PARAM5_ of _PARAM2_", "events": [ { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ObjectStack::ObjectStack::Height" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ + "", + "Gutter", "Object", - "ObjectStack", - "<", - "4", "" ] - } - ], - "conditions": [], - "actions": [ + }, { "type": { - "value": "ModVarScene" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "randomColorIndex", - "=", - "Random(Object.Behavior::PropertyColorCount() - 1)" + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" ] } ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "RandomInRange(1, 2)", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Create" + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", + "BubbleQueue", + "ObjectStack", "BoardBubble", - "Object.X()", - "Object.Y()", - "\"\"" + "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" }, "parameters": [ "BoardBubble", "SpeedPathMovement", - "Object.Behavior::PathName()", - "1", - "", + ">=", + "32", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ChangeAnimation" + "value": "ModVarScene" }, "parameters": [ - "BoardBubble", + "lastBubblePathPosition", "=", - "Variable(randomColorIndex)" + "BoardBubble.SpeedPathMovement::PositionOnPath()" ] }, - { - "type": { - "value": "ObjectStack::ObjectStack::Insert" - }, - "parameters": [ - "Object", - "ObjectStack", - "BoardBubble", - "0", - "" - ] - } - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Debug", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ { "type": { "value": "ModVarScene" }, "parameters": [ - "index", + "lastBubbleSpeed", "=", - "0" + "BoardBubble.SpeedPathMovement::Speed()" ] } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "2", - "conditions": [], - "actions": [], + ], "events": [ { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Create" + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" }, "parameters": [ "", + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Object", + "ObjectStack", "BoardBubble", - "Object.X()", - "Object.Y()", "" ] }, { "type": { - "value": "Create" + "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ - "", + "BubbleQueue", + "ObjectStack", "BoardBubble", - "Object.X()", - "Object.Y()", "" ] }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubblePathPosition) - 32", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubbleSpeed)", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "+", + "1" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "ObjectStack" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the first bubble with some speed because it would have been detected as being rewinding otherwise." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "Object.Behavior::PathName()", - "1", "", + "Object", + "ObjectStack", + "BoardBubble", "" ] - }, + } + ], + "actions": [ { "type": { - "value": "ChangeAnimation" + "value": "ObjectStack::ObjectStack::Remove" }, "parameters": [ + "Object", + "ObjectStack", "BoardBubble", - "=", - "Variable(index)" + "" ] }, { @@ -17511,7 +17456,7 @@ "value": "ObjectStack::ObjectStack::AddOnTop" }, "parameters": [ - "Object", + "BubbleQueue", "ObjectStack", "BoardBubble", "" @@ -17522,92 +17467,342 @@ "value": "ModVarScene" }, "parameters": [ - "index", + "SpawnedBubbleCount", "+", "1" ] } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Spawned first bubble\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(Object.Behavior::PathName()), 889, 64)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "64", + "" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "128" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(5, Object.Behavior::ColorCount())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "=", + "256" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SetColorCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(6, Object.Behavior::ColorCount())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::Refill" + }, + "parameters": [ + "Object", + "Behavior", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Can spawn bubble", + "functionType": "Condition", + "name": "CanSpawnBubble", + "sentence": "_PARAM0_ can spawn _PARAM6_ into _PARAM4_ of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Gutter", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" ] }, { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "-", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "Object.Behavior::PathName()", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">=", + "32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::IsEmpty" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "ObjectStack" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] } - ], - "parameters": [] + ] } ], "parameters": [ @@ -17622,6 +17817,28 @@ "supplementaryInformation": "Smoothy::SpwanerBehavior", "type": "behavior" }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, { "description": "Board bubble", "name": "BoardBubble", @@ -17992,6 +18209,103 @@ ], "objectGroups": [] }, + { + "fullName": "Bubble reach hole", + "functionType": "Condition", + "name": "IsAnyBubbleReachHole", + "sentence": "_PARAM4_ from _PARAM2_ reach the hole of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "the first queue head position of the gutter.", "fullName": "First queue head position", From e254d7bd9a27b0d1c891f084dec72c738595b1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 19:08:07 +0200 Subject: [PATCH 072/114] Add an action to unspawn bubbles. --- examples/smoothy/smoothy.json | 717 ++++++++++++++++++++++------------ 1 file changed, 458 insertions(+), 259 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index c3de9b1ae..cd471720f 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2846,6 +2846,58 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO What if the queue is rewinded completly?" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::CanUnspawnBubble" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "Gutter", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::UnspawnBubble" + }, + "parameters": [ + "Spawner", + "SpwanerBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] } ], "parameters": [] @@ -3848,123 +3900,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO What if the queue is rewinded completly?" - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Spawner", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "Gutter", - "Spawner", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Spawner", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "0", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "SpawnedBubbleCount", - "-", - "1" - ] - } - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -17224,10 +17159,10 @@ "objectGroups": [] }, { - "fullName": "Spawn bubble", - "functionType": "Action", - "name": "SpawnBubble", - "sentence": "_PARAM0_ spawn _PARAM7_ into _PARAM5_ of _PARAM2_", + "fullName": "Can spawn bubble", + "functionType": "Condition", + "name": "CanSpawnBubble", + "sentence": "_PARAM0_ can spawn _PARAM6_ into _PARAM4_ of _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17289,91 +17224,358 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "SetReturnBoolean" }, "parameters": [ - "lastBubblePathPosition", - "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" + "True" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarScene" + "value": "ObjectStack::ObjectStack::IsEmpty" }, "parameters": [ - "lastBubbleSpeed", - "=", - "BoardBubble.SpeedPathMovement::Speed()" + "BubbleQueue", + "ObjectStack", + "ObjectStack" ] } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::Remove" - }, - "parameters": [ - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Variable(lastBubblePathPosition) - 32", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Can unspawn bubble", + "functionType": "Condition", + "name": "CanUnspawnBubble", + "sentence": "_PARAM0_ can unspawn _PARAM6_ from _PARAM4_ of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Gutter", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Spawn bubble", + "functionType": "Action", + "name": "SpawnBubble", + "sentence": "_PARAM0_ spawn _PARAM7_ into _PARAM5_ of _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "Gutter", + "Object", + "" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + ">=", + "32", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubblePathPosition", + "=", + "BoardBubble.SpeedPathMovement::PositionOnPath()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "lastBubbleSpeed", + "=", + "BoardBubble.SpeedPathMovement::Speed()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Variable(lastBubblePathPosition) - 32", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ "BoardBubble", "SpeedPathMovement", "=", @@ -17704,10 +17906,10 @@ "objectGroups": [] }, { - "fullName": "Can spawn bubble", - "functionType": "Condition", - "name": "CanSpawnBubble", - "sentence": "_PARAM0_ can spawn _PARAM6_ into _PARAM4_ of _PARAM2_", + "fullName": "Unspawn bubble", + "functionType": "Action", + "name": "UnspawnBubble", + "sentence": "_PARAM0_ unspawn _PARAM7_ from _PARAM5_ of _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -17734,72 +17936,63 @@ "BubbleQueue", "" ] + }, + { + "type": { + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">=", - "32", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } + "type": { + "value": "ObjectStack::ObjectStack::Remove" + }, + "parameters": [ + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ObjectStack::IsEmpty" - }, - "parameters": [ - "BubbleQueue", - "ObjectStack", - "ObjectStack" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } + "type": { + "value": "ObjectStack::ObjectStack::AddOnTop" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "SpawnedBubbleCount", + "-", + "1" ] } ] @@ -17822,6 +18015,12 @@ "name": "Gutter", "type": "objectList" }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, { "description": "Object stack", "name": "ObjectStack", From d6be4b6b6446250c72d39d903cea61b031fd3f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 19:27:31 +0200 Subject: [PATCH 073/114] Add properties for new colors. --- examples/smoothy/smoothy.json | 392 +++++++++++++++++----------------- 1 file changed, 191 insertions(+), 201 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index cd471720f..3fef8c988 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -17309,122 +17309,6 @@ ], "objectGroups": [] }, - { - "fullName": "Can unspawn bubble", - "functionType": "Condition", - "name": "CanUnspawnBubble", - "sentence": "_PARAM0_ can unspawn _PARAM6_ from _PARAM4_ of _PARAM2_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "Gutter", - "Object", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "ObjectStack::HasOnTop" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::SpwanerBehavior", - "type": "behavior" - }, - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Object stack", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "type": "objectList" - }, - { - "description": "Object stack", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Speed path movement", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "fullName": "Spawn bubble", "functionType": "Action", @@ -17585,10 +17469,11 @@ }, { "type": { - "value": "ModVarScene" + "value": "Smoothy::SpwanerBehavior::SetSharedPropertySpawnedBubbleCount" }, "parameters": [ - "SpawnedBubbleCount", + "Object", + "Behavior", "+", "1" ] @@ -17666,10 +17551,11 @@ }, { "type": { - "value": "ModVarScene" + "value": "Smoothy::SpwanerBehavior::SetSharedPropertySpawnedBubbleCount" }, "parameters": [ - "SpawnedBubbleCount", + "Object", + "Behavior", "+", "1" ] @@ -17759,94 +17645,158 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "VarScene" + "value": "Smoothy::SpwanerBehavior::Refill" }, "parameters": [ - "SpawnedBubbleCount", - "=", - "128" + "Object", + "Behavior", + "BoardBubble", + "SpeedPathMovement", + "" ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" + "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "Object", - "Behavior", - "=", - "max(5, Object.Behavior::ColorCount())", + "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", + "", "" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::SpwanerBehavior", + "type": "behavior" + }, + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Object stack", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Can unspawn bubble", + "functionType": "Condition", + "name": "CanUnspawnBubble", + "sentence": "_PARAM0_ can unspawn _PARAM6_ from _PARAM4_ of _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarScene" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ - "SpawnedBubbleCount", - "=", - "256" + "", + "Gutter", + "Object", + "" ] - } - ], - "actions": [ + }, { "type": { - "value": "Smoothy::SpwanerBehavior::SetColorCount" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "Object", - "Behavior", - "=", - "max(6, Object.Behavior::ColorCount())", + "", + "Gutter", + "ObjectStack", + "BubbleQueue", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "ObjectStack::HasOnTop" }, "parameters": [ - "\"Spawned bubbles: \" + VariableString(SpawnedBubbleCount)", "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { - "value": "Smoothy::SpwanerBehavior::Refill" + "value": "CurvedMovement::SpeedPathMovement::HasReachedOrigin" }, "parameters": [ - "Object", - "Behavior", "BoardBubble", "SpeedPathMovement", "" ] } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], @@ -17867,12 +17817,6 @@ "name": "Gutter", "type": "objectList" }, - { - "description": "Gutter behavior", - "name": "GutterBehavior", - "supplementaryInformation": "Smoothy::GutterBehavior", - "type": "behavior" - }, { "description": "Object stack", "name": "ObjectStack", @@ -17987,10 +17931,11 @@ }, { "type": { - "value": "ModVarScene" + "value": "Smoothy::SpwanerBehavior::SetSharedPropertySpawnedBubbleCount" }, "parameters": [ - "SpawnedBubbleCount", + "Object", + "Behavior", "-", "1" ] @@ -18074,51 +18019,63 @@ ] } ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::SpwanerBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "ColorCount", - "name": "SetColorCount", - "sentence": "", - "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SharedPropertySpawnedBubbleCount" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "128" + ] + } + ], "actions": [ { "type": { - "value": "Smoothy::SpwanerBehavior::SetPropertyColorCount" + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyColorCount() + Object.Behavior::PropertyFirstNewColorBubbleCount()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::SharedPropertySpawnedBubbleCount" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" + ">=", + "256" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyColorCount() + Object.Behavior::PropertySecondNewColorBubbleCount()" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -18249,9 +18206,42 @@ "extraInformation": [], "hidden": true, "name": "PathName" + }, + { + "value": "128", + "type": "Number", + "unit": "Dimensionless", + "label": "Spawned bubbles count before 1st new color", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FirstNewColorBubbleCount" + }, + { + "value": "256", + "type": "Number", + "unit": "Dimensionless", + "label": "Spawned bubbles count before 2nd new color", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "SecondNewColorBubbleCount" } ], - "sharedPropertyDescriptors": [] + "sharedPropertyDescriptors": [ + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "SpawnedBubbleCount" + } + ] }, { "description": "", From 3c8f71573404f1c27daa832c53d365e97ee1af7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 19:55:01 +0200 Subject: [PATCH 074/114] Add a function to detect matching queues. --- examples/smoothy/smoothy.json | 926 +++++++++++++++++++--------------- 1 file changed, 506 insertions(+), 420 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 3fef8c988..15413454e 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3358,19 +3358,19 @@ "parameters": [] }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Gutter", - "conditions": [], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Queues collision", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Queues collision", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Gutter", + "conditions": [], + "actions": [], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3571,376 +3571,151 @@ } ] } - ], - "parameters": [] + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Combo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::UpdateMatchingQueue" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "BubbleQueue", + "BubbleQueueBehavior", + "ObjectStack", + "BoardBubble", + "BoardBubbleBehavior", + "SpeedPathMovement", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" + }, + "parameters": [ + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] }, { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Combo", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 2" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "UI", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Score", + "=", + "VariableString(Score)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Countdown", + "=", + "max(0, Variable(Countdown) - TimeDelta())" ] }, { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "queueIndex", - ">=", - "0" - ] - } - ], - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Rewind\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "yes", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::IsQueueMatching" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [], - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Stop rewind\"", - "", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex)", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "Variable(queueIndex) + 1", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "no", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "-", - "1" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Move bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::UpdateFirstHeadPosition" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "Gutter", - "GutterBehavior", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Countdown", + "=", + "TimeFormatter::SecondsToHHMMSS(Variable(Countdown))" ] } - ], - "parameters": [] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Score", - "=", - "VariableString(Score)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Countdown", - "=", - "max(0, Variable(Countdown) - TimeDelta())" - ] - }, - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Countdown", - "=", - "TimeFormatter::SecondsToHHMMSS(Variable(Countdown))" ] } - ] + ], + "parameters": [] }, { "type": "BuiltinCommonInstructions::Standard", @@ -12659,7 +12434,6 @@ { "description": "Bubble queue", "name": "BubbleQueue", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -18031,7 +17805,7 @@ "Object", "Behavior", ">=", - "128" + "Object.Behavior::PropertyFirstNewColorBubbleCount()" ] } ], @@ -18041,7 +17815,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyColorCount() + Object.Behavior::PropertyFirstNewColorBubbleCount()" + "Object.Behavior::PropertyColorCount() + 1" ] } ] @@ -18057,7 +17831,7 @@ "Object", "Behavior", ">=", - "256" + "Object.Behavior::PropertySecondNewColorBubbleCount()" ] } ], @@ -18067,7 +17841,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyColorCount() + Object.Behavior::PropertySecondNewColorBubbleCount()" + "Object.Behavior::PropertyColorCount() + 2" ] } ] @@ -18192,7 +17966,7 @@ "unit": "Dimensionless", "label": "Color count", "description": "", - "group": "", + "group": "Colors", "extraInformation": [], "hidden": false, "name": "ColorCount" @@ -18202,7 +17976,7 @@ "type": "String", "label": "Path name", "description": "", - "group": "", + "group": "Colors", "extraInformation": [], "hidden": true, "name": "PathName" @@ -18213,7 +17987,7 @@ "unit": "Dimensionless", "label": "Spawned bubbles count before 1st new color", "description": "", - "group": "", + "group": "Colors", "extraInformation": [], "hidden": false, "name": "FirstNewColorBubbleCount" @@ -18224,7 +17998,7 @@ "unit": "Dimensionless", "label": "Spawned bubbles count before 2nd new color", "description": "", - "group": "", + "group": "Colors", "extraInformation": [], "hidden": false, "name": "SecondNewColorBubbleCount" @@ -18374,7 +18148,6 @@ { "description": "Bubble queue", "name": "BubbleQueue", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -18386,7 +18159,6 @@ { "description": "Board bubble", "name": "BoardBubble", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -18399,40 +18171,80 @@ "objectGroups": [] }, { - "fullName": "Bubble reach hole", - "functionType": "Condition", - "name": "IsAnyBubbleReachHole", - "sentence": "_PARAM4_ from _PARAM2_ reach the hole of _PARAM0_", + "description": "the first queue head position of the gutter.", + "fullName": "First queue head position", + "functionType": "ExpressionAndCondition", + "name": "FirstQueueHeadPosition", + "sentence": "the first queue head position", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::ContainsAt" - }, - "parameters": [ - "", - "Object", - "ObjectStack", - "BubbleQueue", - "0", - "" - ] - }, + "conditions": [], + "actions": [ { "type": { - "value": "ObjectStack::ContainsAt" + "value": "SetReturnNumber" }, "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "0", - "" + "Object.Behavior::PropertyFirstQueueHeadPosition()" ] - }, + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Bubble reach hole", + "functionType": "Condition", + "name": "IsAnyBubbleReachHole", + "sentence": "_PARAM4_ from _PARAM2_ reach the hole of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "0", + "" + ] + }, + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + }, { "type": { "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" @@ -18471,7 +18283,6 @@ { "description": "Bubble queue", "name": "BubbleQueue", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -18483,7 +18294,6 @@ { "description": "Board bubble", "name": "BoardBubble", - "supplementaryInformation": "Sprite", "type": "objectList" }, { @@ -18496,11 +18306,10 @@ "objectGroups": [] }, { - "description": "the first queue head position of the gutter.", - "fullName": "First queue head position", - "functionType": "ExpressionAndCondition", - "name": "FirstQueueHeadPosition", - "sentence": "the first queue head position", + "fullName": "Update queue matching status", + "functionType": "Action", + "name": "UpdateMatchingQueue", + "sentence": "Update matching status between _PARAM2_ from _PARAM0_ according to _PARAM5_ colors", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -18508,18 +18317,260 @@ "actions": [ { "type": { - "value": "SetReturnNumber" + "value": "ModVarScene" }, "parameters": [ - "Object.Behavior::PropertyFirstQueueHeadPosition()" + "queueIndex", + "=", + "Object.ObjectStack::Height() - 2" + ] + } + ] + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "queueIndex", + ">=", + "0" + ] + } + ], + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::IsQueueMatching" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "yes", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::IsQueueMatching" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Stop rewind\"", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex)", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ContainsAt" + }, + "parameters": [ + "", + "Object", + "ObjectStack", + "BubbleQueue", + "Variable(queueIndex) + 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadMatching" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "no", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "-", + "1" + ] + } ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -18531,6 +18582,41 @@ "name": "Behavior", "supplementaryInformation": "Smoothy::GutterBehavior", "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "type": "objectList" + }, + { + "description": "Bubble queue behavior", + "name": "BubbleQueueBehavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Board bubble behavior", + "name": "BoardBubbleBehavior", + "supplementaryInformation": "Smoothy::BoardBubbleBehavior", + "type": "behavior" + }, + { + "description": "Speed path movement", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" } ], "objectGroups": [] From ca7d1ecf0e3cf516e2f1671ac8d29e66e2870f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 21:18:24 +0200 Subject: [PATCH 075/114] Add a function to create inserted bubbles. --- examples/smoothy/smoothy.json | 1106 +++++++++++++++++---------------- 1 file changed, 577 insertions(+), 529 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 15413454e..be01a64d8 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2600,178 +2600,166 @@ ], "events": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Build the level", - "source": "", - "type": "BuiltinCommonInstructions::Group", + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Playing\"" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Countdown", + "=", + "3 * 60" + ] + }, + { + "type": { + "value": "Smoothy::CreateLevel" + }, + "parameters": [ + "", + "GlobalVariable(Level)", + "Launcher", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "GutterPainter", + "Hole", + "Spawner", + "SpwanerBehavior", + "ObjectStack", + "SpeedPathMovement", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "PreviewBubble", + "Launcher.X()", + "Launcher.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "AimingBubble", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + ] + } + ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "GameState", - "=", - "\"Playing\"" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "Countdown", - "=", - "3 * 60" - ] - }, - { - "type": { - "value": "Smoothy::CreateLevel" - }, - "parameters": [ - "", - "GlobalVariable(Level)", - "Launcher", - "Gutter", - "GutterBehavior", - "ObjectStack", - "BubbleQueue", - "GutterPainter", - "Hole", - "Spawner", - "SpwanerBehavior", - "ObjectStack", - "SpeedPathMovement", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "PreviewBubble", - "Launcher.X()", - "Launcher.Y()", - "" - ] - }, + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "AimingBubble", - "0", - "0", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "0.25" + ] + } ] }, { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "0.9", + "", + "" + ] + } ] }, { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(ColorNames[RandomInRange(0, Spawner.SpwanerBehavior::ColorCount() - 1)])" - ] - } - ], - "events": [ - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Debug", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ChangeTimeScale" - }, - "parameters": [ - "", - "0.25" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ZoomCamera" - }, - "parameters": [ - "", - "0.9", - "", - "" - ] - } - ] - }, + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "\"Purple\"" - ] - } + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "\"Purple\"" ] } - ], - "parameters": [] + ] } - ] + ], + "parameters": [] } - ], - "parameters": [] + ] }, { "colorB": 228, @@ -2847,18 +2835,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO What if the queue is rewinded completly?" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3056,172 +3032,79 @@ }, { "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "PreviewBubble", - "AimingBubble.AnimationName()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "AimingBubble", - "VariableString(animationName)" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Insert bubbles", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "MovingBubble", - "BoardBubble", - "", - "", - "yes" - ] - }, - { - "type": { - "value": "AjoutHasard" - }, - "parameters": [ - "", - "BoardBubble" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "TODO Better encapsulate this." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "Spawner", - "Gutter", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "Spawner.X()", - "Spawner.Y()", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::Initialize" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubble", - "Gutter", - "GutterBehavior", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "MovingBubble", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - } + "value": "SetAnimationName" + }, + "parameters": [ + "PreviewBubble", + "AimingBubble.AnimationName()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "AimingBubble", + "VariableString(animationName)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Insert bubbles", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "MovingBubble", + "BoardBubble", + "", + "", + "yes" + ] + }, + { + "type": { + "value": "AjoutHasard" + }, + "parameters": [ + "", + "BoardBubble" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::CreateInsertedBubble" + }, + "parameters": [ + "", + "Gutter", + "GutterBehavior", + "ObjectStack", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "MovingBubble", + "InsertedBubble", + "InsertedBubble", + "" ] } ] @@ -3883,37 +3766,20 @@ "actions": [ { "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Score", - "=", - "Variable(Score)" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "Cache" + "value": "Wait" }, "parameters": [ - "BoardBubble" + "0.5" ] }, { "type": { - "value": "Wait" + "value": "ModVarGlobal" }, "parameters": [ - "0.5" + "Score", + "=", + "Variable(Score)" ] }, { @@ -4472,65 +4338,17 @@ "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Level", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "GutterPainter", - "Level.X()", - "Level.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Launcher", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].LauncherX) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].LauncherY) / 3", - "" - ] - }, - { - "type": { - "value": "ChangeScale" - }, - "parameters": [ - "Launcher", - "=", - "1/3" - ] - } - ], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Level thumbnails", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "GlobalVariableChildCount(Levels[Level.Variable(Level)].Gutters)", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Level", "conditions": [], "actions": [ { @@ -4539,74 +4357,9 @@ }, "parameters": [ "", - "StartLocation", - "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) / 3", - "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) / 3", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "StartLocation" - ] - }, - { - "type": { - "value": "ModVarSceneTxt" - }, - "parameters": [ - "pathName", - "=", - "Level.VariableString(Level) + \"-\" + VariableString(index)" - ] - }, - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "VariableString(pathName)", - "", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::CreatePathFromSvg" - }, - "parameters": [ - "", - "VariableString(pathName)", - "GlobalVariableString(Levels[Level.Variable(Level)].Gutters[Variable(index)].Path)", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPathTo" - }, - "parameters": [ - "StartLocation", - "SpeedPathMovement", - "VariableString(pathName)", - "1", - "", - "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", - "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::DrawDebug" - }, - "parameters": [ - "StartLocation", - "SpeedPathMovement", "GutterPainter", + "Level.X()", + "Level.Y()", "" ] }, @@ -4615,10 +4368,10 @@ "value": "Create" }, "parameters": [ - "StartLocation", - "Hole", - "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", - "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", + "", + "Launcher", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].LauncherX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].LauncherY) / 3", "" ] }, @@ -4627,7 +4380,7 @@ "value": "ChangeScale" }, "parameters": [ - "Hole", + "Launcher", "=", "1/3" ] @@ -4640,58 +4393,195 @@ "actions": [ { "type": { - "value": "ModVarScene" + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "GlobalVariableChildCount(Levels[Level.Variable(Level)].Gutters)", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "StartLocation", + "Level.X() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) / 3", + "Level.Y() + GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) / 3", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "StartLocation" + ] + }, + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "pathName", + "=", + "Level.VariableString(Level) + \"-\" + VariableString(index)" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "VariableString(pathName)", + "", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::CreatePathFromSvg" + }, + "parameters": [ + "", + "VariableString(pathName)", + "GlobalVariableString(Levels[Level.Variable(Level)].Gutters[Variable(index)].Path)", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPathTo" }, "parameters": [ - "index", - "+", - "1" + "StartLocation", + "SpeedPathMovement", + "VariableString(pathName)", + "1", + "", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "StartLocation", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "Level.X() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartX) + CurvedMovement::PathEndX(VariableString(pathName))) / 3", + "Level.Y() + (GlobalVariable(Levels[Level.Variable(Level)].Gutters[Variable(index)].StartY) + CurvedMovement::PathEndY(VariableString(pathName))) / 3", + "" + ] + }, + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Hole", + "=", + "1/3" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } ] } ] } ] } - ] + ], + "parameters": [] } ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "UI", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "ButtonStates::ButtonFSM::IsClicked" - }, - "parameters": [ - "Level", - "ButtonFSM", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Level", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Level", + "=", + "Level.Variable(Level)" + ] + }, + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Game\"", + "" + ] + } ] } ], - "actions": [ - { - "type": { - "value": "ModVarGlobal" - }, - "parameters": [ - "Level", - "=", - "Level.Variable(Level)" - ] - }, - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Game\"", - "" - ] - } - ] + "parameters": [] } ], "layers": [ @@ -9704,8 +9594,8 @@ "parameters": [ "", "Gutter", - "-100", - "-100", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX)", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY)", "" ] }, @@ -9774,8 +9664,8 @@ "parameters": [ "StartLocation", "Spawner", - "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX)", - "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY)", + "Gutter.X()", + "Gutter.Y()", "" ] }, @@ -12463,6 +12353,164 @@ ], "objectGroups": [] }, + { + "fullName": "Create inserted bubble", + "functionType": "Action", + "name": "CreateInsertedBubble", + "sentence": "Replace _PARAM8_ by a new _PARAM9_ to insert into _PARAM6_ of _PARAM4_ from _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "InsertedBubble", + "Gutter.X()", + "Gutter.Y()", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::Initialize" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubbleBehavior", + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "MovingBubble", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MovingBubble", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Gutter", + "name": "Gutter", + "type": "objectList" + }, + { + "description": "Gutter behavior", + "name": "GutterBehavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Bubble queue", + "name": "BubbleQueue", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Object stack behavior", + "name": "ObjectStack", + "supplementaryInformation": "ObjectStack::ObjectStack", + "type": "behavior" + }, + { + "description": "Board bubble", + "name": "BoardBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Movement on a curve", + "name": "SpeedPathMovement", + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", + "type": "behavior" + }, + { + "description": "Moving bubble", + "name": "MovingBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Inserted Bubble", + "name": "InsertedBubble", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Inserted bubble behavior", + "name": "InsertedBubbleBehavior", + "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, { "description": "Return the speed necessary to cover a distance according to the deceleration.", "fullName": "Speed to reach", @@ -19354,7 +19402,7 @@ "fullName": "Explode", "functionType": "Action", "name": "Explode", - "sentence": "_PARAM0_ explode into _PARAM2_", + "sentence": "Explode _PARAM0_ into _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", From 04f512ee163b45e352903245cce85e6b4c328eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 17 Jun 2023 23:01:07 +0200 Subject: [PATCH 076/114] Typo --- examples/smoothy/smoothy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index be01a64d8..5ed5396e9 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -12357,7 +12357,7 @@ "fullName": "Create inserted bubble", "functionType": "Action", "name": "CreateInsertedBubble", - "sentence": "Replace _PARAM8_ by a new _PARAM9_ to insert into _PARAM6_ of _PARAM4_ from _PARAM1_", + "sentence": "Replace _PARAM8_ by a new _PARAM9_ to insert into _PARAM6_ from _PARAM4_ of _PARAM1_", "events": [ { "type": "BuiltinCommonInstructions::Standard", From 8cc6e4571acf6f10f1e5970ece89ec8f0b81387b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 18 Jun 2023 00:11:44 +0200 Subject: [PATCH 077/114] Add acceleration properties. --- examples/smoothy/smoothy.json | 76 ++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 5ed5396e9..9941302eb 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2355,7 +2355,8 @@ "TailState": "Idle", "HeadState": "Idle", "TailComboLevel": 0, - "HeadComboLevel": 0 + "HeadComboLevel": 0, + "HitStopDuration": 0.1 }, { "name": "ObjectStack", @@ -10396,7 +10397,7 @@ "textG": 0, "textR": 0 }, - "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted.\n\nThe tailing queue should never be deleted becausebubble spawn inside it." }, { "type": "BuiltinCommonInstructions::Standard", @@ -10410,6 +10411,19 @@ "ObjectStack", "" ] + }, + { + "type": { + "inverted": true, + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] } ], "actions": [ @@ -11367,7 +11381,7 @@ "textG": 0, "textR": 0 }, - "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted." + "comment": "When the bubbles are matched at the tail of the queue, the original queue is left empty an must be deleted.\n\nThe tailing queue should never be deleted becausebubble spawn inside it." }, { "type": "BuiltinCommonInstructions::Standard", @@ -11381,6 +11395,19 @@ "ObjectStack", "" ] + }, + { + "type": { + "inverted": true, + "value": "ObjectStack::HasOnTop" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] } ], "actions": [ @@ -14994,8 +15021,8 @@ "parameters": [ "Object", "Behavior", - "<=", - "1" + "=", + "0" ] } ], @@ -15034,7 +15061,7 @@ "Object", "Behavior", ">", - "1" + "0" ] } ], @@ -15082,8 +15109,8 @@ "parameters": [ "Object", "Behavior", - "<=", - "1" + "=", + "0" ] } ], @@ -15122,7 +15149,7 @@ "Object", "Behavior", ">", - "1" + "0" ] } ], @@ -18295,7 +18322,7 @@ }, { "type": { - "value": "CurvedMovement::SpeedPathMovement::HasReachedAnEnd" + "value": "CurvedMovement::SpeedPathMovement::HasReachedTarget" }, "parameters": [ "BoardBubble", @@ -19074,7 +19101,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "64" + "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyAccelerationDuration()" ] } ] @@ -19117,7 +19144,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "64" + "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyAccelerationDuration()" ] } ] @@ -19142,7 +19169,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "17.8" + "Object.Behavior::PropertyNearDeathSpeed() / Object.Behavior::PropertyAccelerationDuration()" ] } ] @@ -19238,7 +19265,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "64" + "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyNearDeathTransitionDuration()" ] } ] @@ -19263,7 +19290,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "64" + "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyNearDeathTransitionDuration()" ] } ] @@ -19340,7 +19367,7 @@ "unit": "PixelSpeed", "label": "Near death push speed", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "NearDeathSpeed" @@ -19362,7 +19389,7 @@ "unit": "Second", "label": "Near death transition duration", "description": "", - "group": "", + "group": "Acceleration", "extraInformation": [], "hidden": false, "name": "NearDeathTransitionDuration" @@ -19373,7 +19400,7 @@ "unit": "PixelSpeed", "label": "Normal push speed", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "NormalSpeed" @@ -19386,8 +19413,19 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, + "hidden": true, "name": "Identifier" + }, + { + "value": "2", + "type": "Number", + "unit": "Second", + "label": "Time to get to full speed", + "description": "", + "group": "Acceleration", + "extraInformation": [], + "hidden": false, + "name": "AccelerationDuration" } ], "sharedPropertyDescriptors": [] From 18eb3de5579cb6467f2ee80c35f77329244832cd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 17 Jun 2023 22:16:35 +0000 Subject: [PATCH 078/114] Optimised images with calibre/image-actions --- .../smoothy/assets/Grey Button_Hovered.png | Bin 2208 -> 1689 bytes examples/smoothy/assets/Grey Button_Idle.png | Bin 2353 -> 1775 bytes .../smoothy/assets/Grey Button_Pressed.png | Bin 2118 -> 1681 bytes examples/smoothy/assets/GreyBubble.png | Bin 647 -> 473 bytes examples/smoothy/assets/Hole.png | Bin 737 -> 537 bytes examples/smoothy/assets/LevelBackground.png | Bin 1207 -> 490 bytes examples/smoothy/assets/NewSprite.png | Bin 202 -> 179 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/smoothy/assets/Grey Button_Hovered.png b/examples/smoothy/assets/Grey Button_Hovered.png index 628c879d7b074683459175ff43829bbb077f72e7..8065deaec03d77c5a71c6749d8d82ec1a1992dc4 100644 GIT binary patch literal 1689 zcmbtUZB!Cg7`}ibNtxP2{3vm0rf#L>h&;x?(t<=PKg!DRW9k%jEF@7ep|Z#s;gfR2aBNxT?lEw6u$4 z`5;EjjTOtdV$O!P!v|7gg)+Al-ZItMj3qq;>AS?@{$j7eJID4v65NqtLeJ}};?s83 zMoL*$l-8H=D*_gkdH6 zr-aJ>?jhEWS9U?#vcay7voQs&ijeDqigh?qaDCr)OTT3_avr&o+(uTB&9=I4-8O0g z4R|BHqN<*`-1f)ns27|`PcJ}l%cViEAAN7%@NDz`~pOmX_ zo9$*(xC#EZ=mAQd#r2HvTY_Szb6}~ha*YzJ^itxLjZf|U8P&;z<|Gs?XLP((=p*-Y zbnG8C!A04H>pd{=cJK0#-3}+=ycd1n{ji9RTU+?{5QD2?rZ!fFjya;w)OeyQp|EkBZnnQv;swDS`nk~w|NTy%-zbDM!H(|XNB z<&=`JHf)( zr{^xAcl0m>9y`QGkK>xWAq_@E{IvX6s!k7qA)I#Uwq*|wfbKO-gISN89iVd-AaEda zB>+$!0LB0c91O@apdmGQ#Xu6lLS?>i3XJ{-ZDf!$Hz*Jnv>*o6e%(R(a4G2R54rVskKngMzh;~9Ueg=!So*@P z4sqji#n>BIgtCPxD-sH=Nel=9c(NPR5#~J3*vn+5Zu!SK z^CLr|`OePQde|eXnOlE&UYPId7x#gKmkIZ7^#;WWL1N{1p!039wOvv0%UDn5n!-Kz zoWVpNo}1e1z5<`YW-S-a)GkBtCO_X+URb!LJg8;y&(}_U#Ll8(;g9UR{}`5h{L2<< zI`^KSr|e_4TA30Lip-1Mj)RgK&W&7J1BV}@ ze&Bv%V=gDfUwl8JHFY(NJZnRh7WXO0wYB~U4{SNE4C_YnSn2Al_%u6H(;uCJrOK=9 zlM#hN&gDap+$W-Wlw(*S<^6?Arcpdz=K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JGlmra1MnycHBe=l|{;CTwoBJYW zA-3nce9C#D#!d*k9&(f61^E!f;~Hs?5sL62#tLJ4>?}Z@dJwZHd?}pyM^;^3G`;IY zIF<~}pz5b$Xb43_kd1W@Jm50$BFElwTa>gn0Kb5M=WeqW+qI1sKXAf=vmzOZi5OSc zLDomrC=hrre_-j%H4i6`SMbyBC)OfXfkL>XrtUZZg z|KW6)v^!cn*`~%?OgZhq6LuXE$N|3(9DkJMEbi|qd_$H3Zti$KS9j8T)-l& z(D&N{4Di9u;ny#y7tq8nGG#kTRrwFy#uKsvU7*{?Pc4bpvR8kM3@=|cu?A5fEHJWv zW^iX=QPERzIY65b0SRI+SC-F=H_HgsC;& z#lzY%E|^V4aI1DzRDL$Mv%5On6d6hVpR)0DJh%yxrGddI?*#(`=xf&k9QR|$-oXf* z9mpB|3(q4kJxe4$CE%d@$w|YlM-FiRE=TW@^&3=On z3{yEeJY4roKwGX^eSq0qJk%P$T87s~sZ>C9iHR1r3I`sb1EcX>v2lYqR zT=bLn+;{McUFut7Z#00yu~st5OLz8h2&;R5Fr~p33Wd687K+_%JWnjkk*Ix2U`pvN zZ!hHJyiXo#Wv>@eXFyS!vk~-=r&Do}>5W8*n|F!)j47?2pZK O0Vw1XP`y)7#{U8P9oX0a diff --git a/examples/smoothy/assets/Grey Button_Idle.png b/examples/smoothy/assets/Grey Button_Idle.png index 8ac4d0f33b1ea3db3c725dbd1d01a349faa0ed0a..efbb5d1314f9f50ba47457f58dc1f071281da01e 100644 GIT binary patch literal 1775 zcmbVMc~H~W8vU^tf>!^Vr&V81R)|wNmv9VqKJeovOQbG79EsG z!%{*}QTAXB`;sWdD6*poYsj>P012eBge4FfX8fZw@1HmC&fIg)obP`3oBPc@_a`sh zw|cuj-wgnO9@Y)x4FGB?3Xs7d75b2~7gUS(bvOT50637jGu5)EK867Rs052SO-LM_ zA0LZ03^V3^TsOjKTPa=4?|PfjW@+cOP+2eJs#PY z%q(&$2`akY{sg)yc`cJllZUYM#-$R3u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QSD5+#Xh z7t3PtB{@r0xELB>H?;kh9bto07U=QU2b=JGoW89*#JYFshw0Y;Mb1^dlrWC|M)9G52QbhW@YVG z3#qxWbhYn_u>@g*!>E>$Ln^`R% z^&Y5@1F%`b?;Jh3lh7b_Xmr#u6cQYx>q@D|0Uu{iKF@a>@fS>oPtbD_@(xfCn+}J* zqukKcO04}gISIYqx@$5%fCeZ{i`qhu7}7**)5^=BA$}R7bN?p6FQuGu;^VNz3h3$S zSgBN^t{Zdq@oeUvW5+QB3^6zT6n*}p#yUhu`hjaDr-`PBIz+Y-;?*~I?@K9WNMU+} zJKfyG4{kNj_doH-nm2M$Cj^fvHZbdb!Z#W6Vp}OyQIKLQBtY1sL3O2)#awrsdX4ot z7gAcPoiwvvrX%(VWX`%9*~I}kULwWY`;0}*6e$o%p>vzz_Qo^+U>AE}CV1H^vh z0D6?978E|$W`S6G)-K5%9x#&qyg3CEx2truZC`n7m632E&#!zApIpXyvBPJiQ)Xv# z^Q$7iy**(n-)vg0owzgIl_UANBX#HIB#8lPOBixw*O6{s3+8%oLu;x4C`7M$dVN6_ z+&oee73lE^>+yQu4J0zqvljdN=reuf|$r~ z+nJi^_Jw?B#Nq7qC17i77x+kiI-$juD2rEDFV)+BcjaX*T{%=0HK#pr25keNi+W+D zdv2fVG8iyUfe-_rg=xy+dI8snT2z$z%dl0)ZQ8YOd2zE%ogKNrM8#E2*^1Ic(dDwe zo;IJUqkoE4HPQRY;Y603NgzR1(1VuPViOxAY3*YM=^Q>T3&SvvY2VaJ{aB z%e=cy?jSY|s$NRKM7XxJL{tXJ<>vMH4jh&XO5I0mR~&;zL#RSMTKe3;TDDPgMUW8u uR=bG+^Rcz8Di`_c5ikN+3BxkB{- diff --git a/examples/smoothy/assets/Grey Button_Pressed.png b/examples/smoothy/assets/Grey Button_Pressed.png index e22c00b1c7fbbf916016a5c5506a614d0af427b3..6735c8e5ecdc255a3f9ff763f2e57ef967933b83 100644 GIT binary patch literal 1681 zcmbVNdo#?qR+~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|HQ71=5p&lwq-(qtWz%FTUS6A4nRDIdY86}Z!-Xp zTU?rT(Q_d0+WFaS&l}AZ%3pRm3$~HZuNK3R(na77u(qFS7t#CS$jaE(S)iriG?j=9 z)GR9_aJ_}iY7Ny#1~bv9_B~I>4HAh&By2X);4Y7;$eGO`vvoYr3ViaBw;NvQmE$<& bX4d@;h;jf9rq@9S00000NkvXXu0mjf%dbnbR SO%DM^9)qW=pUXO@geCxS@QXeG literal 1207 zcmeAS@N?(olHy`uVBq!ia0y~yV3Y;27jUovNkh*aDL{&`ILO_JVcj{ImkbOng`O^s zAr*0NuLN>3C`3PQv8;^?m+Xy8qQe93jy`uF zUsPc3l-m-FOp6|~a|n2_x~M-jb8BdL@q>|xC5Z8&=gwY11qG|R28PBEhmxSYWEPH& nKKW5?qd_v7N=A0Z`M@yaprJssiTf&GNyOmk>gTe~DWM4fTP}da diff --git a/examples/smoothy/assets/NewSprite.png b/examples/smoothy/assets/NewSprite.png index 5f70b8a64765bccaedde116b093d2c9bed3f8539..bf4408fa1596ebba0f4c58e83e8fc21d1ba03b45 100644 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GGLLkg|>2BR0pkS(} zi(^Q|t+y8(1sNDv7z}KmUhwoTvZ!8jV3GFo%>oJz4GfG-EF2Uu-bHK37kL$4{?`k% OkipZ{&t;ucLK6U+UMErj delta 174 zcmdnYc#3g?NGZx^prw85kH^JY5_^D&pQ=XB1>m;9)jgCM;WVNR{KK!ouUT zUf zFG%1BP>qBi1C-%*Knf%PRIHw4FoyxmN;2qaFzq;K)hvItZXTojyk(z&4r1_h^>bP0 Hl+XkKRtq-( From b2d19cb5eca86b73c707d3bbc58af278b67313fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 18 Jun 2023 14:19:07 +0200 Subject: [PATCH 079/114] Fix to prevent tailing queue deletion that spawns bubble until the next queue. --- examples/smoothy/smoothy.json | 455 +++++++++++++++++----------------- 1 file changed, 229 insertions(+), 226 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 9941302eb..d5ef138fb 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -274,7 +274,7 @@ { "name": "Level", "type": "number", - "value": 2 + "value": 0 }, { "name": "Levels", @@ -10414,14 +10414,15 @@ }, { "type": { - "inverted": true, - "value": "ObjectStack::HasOnTop" + "value": "ObjectStack::ContainsBetween" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", + "0", + "Gutter.ObjectStack::Height() - 2", "" ] } @@ -11398,14 +11399,15 @@ }, { "type": { - "inverted": true, - "value": "ObjectStack::HasOnTop" + "value": "ObjectStack::ContainsBetween" }, "parameters": [ "", "Gutter", "ObjectStack", "BubbleQueue", + "0", + "Gutter.ObjectStack::Height() - 2", "" ] } @@ -16705,6 +16707,209 @@ "name": "Refill", "sentence": "Refill _PARAM0_ with _PARAM2_", "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Debug", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::ObjectStack::Height" + }, + "parameters": [ + "Object", + "ObjectStack", + "<", + "4", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "2", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "4", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "index", + "-", + "1" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BoardBubble", + "Object.X()", + "Object.Y()", + "" + ] + }, + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "Object.Behavior::PathName()", + "1", + "", + "" + ] + }, + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "BoardBubble", + "=", + "Variable(index)" + ] + }, + { + "type": { + "value": "ObjectStack::ObjectStack::Insert" + }, + "parameters": [ + "Object", + "ObjectStack", + "BoardBubble", + "0", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, { "infiniteLoopWarning": true, "type": "BuiltinCommonInstructions::While", @@ -16791,193 +16996,6 @@ ] } ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Debug", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "=", - "0" - ] - } - ] - }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "2", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "Object.Behavior::PathName()", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "+", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "4", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "index", - "-", - "1" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BoardBubble", - "Object.X()", - "Object.Y()", - "" - ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "Object.Behavior::PathName()", - "1", - "", - "" - ] - }, - { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "BoardBubble", - "=", - "Variable(index)" - ] - }, - { - "type": { - "value": "ObjectStack::ObjectStack::AddOnTop" - }, - "parameters": [ - "Object", - "ObjectStack", - "BoardBubble", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] } ], "parameters": [ @@ -17164,6 +17182,24 @@ "name": "SpawnBubble", "sentence": "_PARAM0_ spawn _PARAM7_ into _PARAM5_ of _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::SpwanerBehavior::Refill" + }, + "parameters": [ + "Object", + "Behavior", + "BoardBubble", + "SpeedPathMovement", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -17411,22 +17447,6 @@ } ], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Spawned first bubble\"", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -17493,24 +17513,7 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::SpwanerBehavior::Refill" - }, - "parameters": [ - "Object", - "Behavior", - "BoardBubble", - "SpeedPathMovement", - "" - ] - } - ] - }, - { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From 4154ff3e013ef6bb16244a1f473357538ce47d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 24 Jun 2023 20:26:24 +0200 Subject: [PATCH 080/114] Add descriptions and comments. --- examples/smoothy/smoothy.json | 178 ++++++++++++++++++++++++---------- 1 file changed, 125 insertions(+), 53 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d5ef138fb..c3ea9b05a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2600,6 +2600,18 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3932,21 +3944,6 @@ } ] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Level", - "persistentUuid": "ede591d3-1668-4b49-b21d-10a6584f70e6", - "width": 0, - "x": 475, - "y": 265, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -9544,6 +9541,7 @@ "dependencies": [], "eventsFunctions": [ { + "description": "Create a level according to the \"Levels\" global variable.", "fullName": "Create level", "functionType": "Action", "name": "CreateLevel", @@ -9705,29 +9703,6 @@ "" ] }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::DrawDebug" - }, - "parameters": [ - "Spawner", - "SpeedPathMovement", - "GutterPainter", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "StartLocation", - "Hole", - "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", - "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", - "" - ] - }, { "type": { "value": "Cache" @@ -9754,6 +9729,47 @@ } ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The gutter path is drawn with a shape painter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::DrawDebug" + }, + "parameters": [ + "Spawner", + "SpeedPathMovement", + "GutterPainter", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "StartLocation", + "Hole", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartX) + CurvedMovement::PathEndX(Gutter.GutterBehavior::PathName())", + "GlobalVariable(Levels[GetArgumentAsNumber(\"Level\")].Gutters[VariableString(index)].StartY) + CurvedMovement::PathEndY(Gutter.GutterBehavior::PathName())", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -9848,6 +9864,7 @@ "objectGroups": [] }, { + "description": "Check if the inserted bubble matches the color of at least 2 other bubble next to it.", "fullName": "Match bubbles", "functionType": "Condition", "name": "MatchBubbles", @@ -10715,6 +10732,7 @@ "objectGroups": [] }, { + "description": "Check if there is at least 3 bubbles of the same color at the impact between 2 queues.", "fullName": "Match bubbles bewteen 2 queues", "functionType": "Condition", "name": "MatchBubblesBetween", @@ -11486,6 +11504,7 @@ "objectGroups": [] }, { + "description": "Check if 2 queues are colliding with each other.", "fullName": "Queue collision", "functionType": "Condition", "name": "IsQueueColliding", @@ -11675,6 +11694,7 @@ "objectGroups": [] }, { + "description": "Merge 2 queues. This action is called when 2 queues are colliding.", "fullName": "Merge queue", "functionType": "Action", "name": "MergeQueue", @@ -12240,6 +12260,7 @@ "objectGroups": [] }, { + "description": "Check if the bubble at 2 end of queues are matching and the leading one must be rewinded.", "fullName": "Queue match", "functionType": "Condition", "name": "IsQueueMatching", @@ -12383,6 +12404,7 @@ "objectGroups": [] }, { + "description": "Create an InsertedQueue to handle the insersion animation.", "fullName": "Create inserted bubble", "functionType": "Action", "name": "CreateInsertedBubble", @@ -12623,12 +12645,13 @@ ], "eventsBasedBehaviors": [ { - "description": "", + "description": "Animate bubble insertions by pushing leading bubbles from the same queue.", "fullName": "Inserted bubble", "name": "InsertedBubbleBehavior", "objectType": "Sprite", "eventsFunctions": [ { + "description": "Initialize the insertion animation.", "fullName": "Initialize", "functionType": "Action", "name": "Initialize", @@ -12969,6 +12992,7 @@ "objectGroups": [] }, { + "description": "Play the insertion animation. Leading bubbles from the same queue are pushed to make room for the inserted bubble.", "fullName": "Play insertion animation", "functionType": "Action", "name": "PlayInsertion", @@ -13278,6 +13302,7 @@ "objectGroups": [] }, { + "description": "Check if the insertion animation is finished.", "fullName": "Animation finished", "functionType": "Condition", "name": "IsAnimationFinished", @@ -13327,6 +13352,7 @@ "objectGroups": [] }, { + "description": "Create a BoardBubble in place of the InsertedBubble in the queue.", "fullName": "Create bubble", "functionType": "Action", "name": "CreateBubble", @@ -13790,17 +13816,30 @@ "sharedPropertyDescriptors": [] }, { - "description": "", + "description": "Contains bubbles bonded to each other. Each end of the queue has a FSM for the combo movement.", "fullName": "Bubble queue", "name": "BubbleQueueBehavior", "objectType": "", "eventsFunctions": [ { + "description": "Update the bubble speed of the queue according to the state of the combo animation.", "fullName": "Update bubble speed", "functionType": "Action", "name": "SetBubblesSpeed", "sentence": "Update the speed of _PARAM5_ from _PARAM0_ for the rewind animation in _PARAM2_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "States are explained in doStepPreEvents." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -14613,6 +14652,18 @@ "name": "doStepPreEvents", "sentence": "", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Bubble queues have 2 finite state machines:\n- one for the queue tail\n- one for the queue head\n\nAs stated in the SetBubbleSpeed action, the tail state have precedence over the head state to choose the speed.\n\nThe state are the following:\n- Idle, there is no combo animation\n- JustSplit, the queue was split and the magnet check is not yet done or color don't match.\n- WillMagnet, the queue are matching but they keep there current speed during a small delay.\n- HitStop, the queue are stopping for a small amount of time to put emphasis to the animation.\n- HitStopEnd, the end of the hit stop. The tailing queue start back at the previous impact speed.\n- Rewinding, the leading queue is going backward until it reaches its tailing queue.\n- RewindImpact, the queue are colliding, when combo are chained the tailing queue is given more and more speed at the impact.\n- StopOrTaillingPush, change the speed before going back to the idle state." + }, { "colorB": 228, "colorG": 176, @@ -15328,6 +15379,7 @@ "objectGroups": [] }, { + "description": "Change the state of the tail according to whether its color matches the tailing queue head.", "fullName": "Tail is matching", "functionType": "Action", "name": "SetTailMatching", @@ -15525,6 +15577,7 @@ "objectGroups": [] }, { + "description": "Change the state of the head according to whether its color matches the leading queue tail.", "fullName": "Head is matching", "functionType": "Action", "name": "SetHeadMatching", @@ -15818,6 +15871,7 @@ "objectGroups": [] }, { + "description": "Change the state of the tail when the queue was split because bubbles exploded.", "fullName": "Tail just split", "functionType": "Action", "name": "SetTailJustSplit", @@ -15885,6 +15939,7 @@ "objectGroups": [] }, { + "description": "Change the state of the head when the queue was split because bubbles exploded.", "fullName": "Head just split", "functionType": "Action", "name": "SetHeadJustSplit", @@ -15952,6 +16007,7 @@ "objectGroups": [] }, { + "description": "Change the state of the tail when the queue collided its tailing queue and bubbles exploded.", "fullName": "Tail just hit", "functionType": "Action", "name": "SetTailJustHit", @@ -16022,6 +16078,7 @@ "objectGroups": [] }, { + "description": "Change the state of the head when the queue was collided by its leading queue and bubbles exploded.", "fullName": "Head just hit", "functionType": "Action", "name": "SetHeadJustHit", @@ -16092,6 +16149,7 @@ "objectGroups": [] }, { + "description": "Change the state of the tail to \"StopOrTaillingPush\" to go back to idle.", "fullName": "Tail idle", "functionType": "Action", "name": "SetTailIdle", @@ -16136,6 +16194,7 @@ ], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -16170,6 +16229,7 @@ "objectGroups": [] }, { + "description": "Change the state of the head to \"StopOrTaillingPush\" to go back to idle.", "fullName": "Head idle", "functionType": "Action", "name": "SetHeadIdle", @@ -16230,7 +16290,7 @@ "objectGroups": [] }, { - "description": "the tail state of the object. It should only be used by this extension.", + "description": "the tail state of the queue. It should only be used by this extension.", "fullName": "Tail state", "functionType": "ExpressionAndCondition", "group": "Bubble queue (private)", @@ -16329,7 +16389,7 @@ "objectGroups": [] }, { - "description": "the head state of the object. It should only be used by this extension.", + "description": "the head state of the queue. It should only be used by this extension.", "fullName": "Head state", "functionType": "ExpressionAndCondition", "group": "Bubble queue (private)", @@ -16428,7 +16488,7 @@ "objectGroups": [] }, { - "description": "the tail combo level of the object.", + "description": "the tail combo level.", "fullName": "Tail combo level", "functionType": "ExpressionAndCondition", "name": "TailComboLevel", @@ -16508,7 +16568,7 @@ "objectGroups": [] }, { - "description": "the head combo level of the object.", + "description": "the head combo level.", "fullName": "Head combo level", "functionType": "ExpressionAndCondition", "name": "HeadComboLevel", @@ -16696,12 +16756,13 @@ "sharedPropertyDescriptors": [] }, { - "description": "", - "fullName": "", + "description": "Generate bubbles to add in its gutter.", + "fullName": "Spawner", "name": "SpwanerBehavior", "objectType": "", "eventsFunctions": [ { + "description": "Create and stack bubbles. Bubbles are created by group of 1 or 2 bubbles of the same color. 2 groups with the same color can follow each other which create a smaller chance of bigger groups.", "fullName": "Refill", "functionType": "Action", "name": "Refill", @@ -16717,6 +16778,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -17026,6 +17088,7 @@ "objectGroups": [] }, { + "description": "Check if there is enough room at the beginning of the gutter to spawn a new bubble.", "fullName": "Can spawn bubble", "functionType": "Condition", "name": "CanSpawnBubble", @@ -17177,6 +17240,7 @@ "objectGroups": [] }, { + "description": "Spawn a bubble at the gutter beginning.", "fullName": "Spawn bubble", "functionType": "Action", "name": "SpawnBubble", @@ -17586,6 +17650,7 @@ "objectGroups": [] }, { + "description": "Check if a bubble was rewinded to the beginning of the path and should go back inside the spawner.", "fullName": "Can unspawn bubble", "functionType": "Condition", "name": "CanUnspawnBubble", @@ -17702,6 +17767,7 @@ "objectGroups": [] }, { + "description": "Make a bubble go back inside the spawner. It happens when the bubble was rewinded to the beginning of the gutter.", "fullName": "Unspawn bubble", "functionType": "Action", "name": "UnspawnBubble", @@ -17851,7 +17917,7 @@ "objectGroups": [] }, { - "description": "the color count of the object.", + "description": "the number of color that can be spwaned.", "fullName": "Color count", "functionType": "ExpressionAndCondition", "group": "SpwanerBehavior configuration", @@ -17944,7 +18010,7 @@ "objectGroups": [] }, { - "description": "the path name of the object.", + "description": "the path name of the associated gutter.", "fullName": "Path name", "functionType": "ExpressionAndCondition", "group": "SpwanerBehavior configuration", @@ -18096,12 +18162,13 @@ ] }, { - "description": "", + "description": "Contains bubbles queues and push the queue at the beginning of the gutter.", "fullName": "Gutter", "name": "GutterBehavior", "objectType": "", "eventsFunctions": [ { + "description": "Update the position of the leading bubble from the tailing queue. This behavior uses it to choose the push speed.", "fullName": "Update first head position", "functionType": "Action", "name": "UpdateFirstHeadPosition", @@ -18253,6 +18320,7 @@ "fullName": "First queue head position", "functionType": "ExpressionAndCondition", "name": "FirstQueueHeadPosition", + "private": true, "sentence": "the first queue head position", "events": [ { @@ -18289,6 +18357,7 @@ "objectGroups": [] }, { + "description": "Check if any bubble reach the end of the gutter.", "fullName": "Bubble reach hole", "functionType": "Condition", "name": "IsAnyBubbleReachHole", @@ -18384,6 +18453,7 @@ "objectGroups": [] }, { + "description": "Check if the bubble color at the end of the queue are matching and update the queues state accordingly.", "fullName": "Update queue matching status", "functionType": "Action", "name": "UpdateMatchingQueue", @@ -18700,7 +18770,7 @@ "objectGroups": [] }, { - "description": "the path name of the object.", + "description": "the path name of the gutter.", "fullName": "Path name", "functionType": "ExpressionAndCondition", "name": "PathName", @@ -18780,7 +18850,7 @@ "objectGroups": [] }, { - "description": "Check if beginning boost is enabled.", + "description": "Check if the beginning boost is enabled.", "fullName": "Beginning boost is enabled", "functionType": "Condition", "name": "IsBeginningBostEnabled", @@ -18827,6 +18897,7 @@ "objectGroups": [] }, { + "description": "Check if bubbles are near to the end of gutter and the push speed should slow down.", "fullName": "Near death", "functionType": "Condition", "name": "IsNearDeath", @@ -18876,7 +18947,7 @@ "objectGroups": [] }, { - "description": "the identifier of the object.", + "description": "the identifier of the gutter.", "fullName": "Identifier", "functionType": "ExpressionAndCondition", "group": "Gutter configuration", @@ -19434,12 +19505,13 @@ "sharedPropertyDescriptors": [] }, { - "description": "", + "description": "Animate explosions.", "fullName": "Board bubble", "name": "BoardBubbleBehavior", "objectType": "Sprite", "eventsFunctions": [ { + "description": "Change the particle emmiter color according to the bubble and delete the bubble.", "fullName": "Explode", "functionType": "Action", "name": "Explode", From 83fbd41fb0abcc7c8ced94dee9ddf1cb631af2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 24 Jun 2023 20:29:25 +0200 Subject: [PATCH 081/114] Typo --- examples/smoothy/smoothy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index c3ea9b05a..9e6d4b5f9 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14662,7 +14662,7 @@ "textG": 0, "textR": 0 }, - "comment": "Bubble queues have 2 finite state machines:\n- one for the queue tail\n- one for the queue head\n\nAs stated in the SetBubbleSpeed action, the tail state have precedence over the head state to choose the speed.\n\nThe state are the following:\n- Idle, there is no combo animation\n- JustSplit, the queue was split and the magnet check is not yet done or color don't match.\n- WillMagnet, the queue are matching but they keep there current speed during a small delay.\n- HitStop, the queue are stopping for a small amount of time to put emphasis to the animation.\n- HitStopEnd, the end of the hit stop. The tailing queue start back at the previous impact speed.\n- Rewinding, the leading queue is going backward until it reaches its tailing queue.\n- RewindImpact, the queue are colliding, when combo are chained the tailing queue is given more and more speed at the impact.\n- StopOrTaillingPush, change the speed before going back to the idle state." + "comment": "Bubble queues have 2 finite state machines:\n- one for the queue tail\n- one for the queue head\n\nAs stated in the SetBubbleSpeed action, the tail state has precedence over the head state to choose the speed.\n\nThe states are the following:\n- Idle, there is no combo animation\n- JustSplit, the queue was split and the magnet check is not yet done or color don't match.\n- WillMagnet, the queues are matching but they keep their current speed during a small delay.\n- HitStop, the queues are stopping for a small amount of time to put emphasis to the animation.\n- HitStopEnd, the end of the hit stop. The tailing queue start back at the previous impact speed.\n- Rewinding, the leading queue is going backward until it reaches its tailing queue.\n- RewindImpact, the queues are colliding, when combo are chained the tailing queue is given more and more speed at the impact.\n- StopOrTaillingPush, change the speed before going back to the idle state." }, { "colorB": 228, From 1efb2f06003855b15b3446976bd80ef59b8408a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 24 Jun 2023 20:57:53 +0200 Subject: [PATCH 082/114] Add properties for the bubble size and the insertion duration. --- examples/smoothy/smoothy.json | 47 +++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 9e6d4b5f9..a8bf17bd4 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -13026,7 +13026,7 @@ "Object", "FreedDistance", "<", - "32" + "Object.Behavior::PropertyBubbleSize()" ] } ], @@ -13050,7 +13050,7 @@ "Object", "FreedDistance", "=", - "min(Object.Variable(FreedDistance) + 32 * TimeDelta() * 5, 32)" + "min(Object.Variable(FreedDistance) + Object.Behavior::PropertyBubbleSize() * TimeDelta() / Object.Behavior::PropertyInsertionDuration(), Object.Behavior::PropertyBubbleSize())" ] } ], @@ -13114,9 +13114,9 @@ "parameters": [ "Object", "=", - "lerp(BoardBubble.X() + Object.Variable(InitialDeltaX), Object.X(), Object.Variable(FreedDistance) / 32)", + "lerp(BoardBubble.X() + Object.Variable(InitialDeltaX), Object.X(), Object.Variable(FreedDistance) / Object.Behavior::PropertyBubbleSize())", "=", - "lerp(BoardBubble.Y() + Object.Variable(InitialDeltaY), Object.Y(), Object.Variable(FreedDistance) / 32)" + "lerp(BoardBubble.Y() + Object.Variable(InitialDeltaY), Object.Y(), Object.Variable(FreedDistance) / Object.Behavior::PropertyBubbleSize())" ] } ], @@ -13319,7 +13319,7 @@ "Object", "FreedDistance", "=", - "32" + "Object.Behavior::PropertyBubbleSize()" ] } ], @@ -13418,7 +13418,7 @@ "Object", "PositionOnPath", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath() + 32" + "BoardBubble.SpeedPathMovement::PositionOnPath() + Object.Behavior::PropertyBubbleSize()" ] }, { @@ -13811,6 +13811,28 @@ ], "hidden": false, "name": "SpeedPathMovement" + }, + { + "value": "32", + "type": "Number", + "unit": "Pixel", + "label": "Bubble size", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "BubbleSize" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Insertion duration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "InsertionDuration" } ], "sharedPropertyDescriptors": [] @@ -17146,7 +17168,7 @@ "BoardBubble", "SpeedPathMovement", ">=", - "32", + "Object.Behavior::PropertyBubbleSize()", "" ] } @@ -18146,6 +18168,17 @@ "extraInformation": [], "hidden": false, "name": "SecondNewColorBubbleCount" + }, + { + "value": "32", + "type": "Number", + "unit": "Pixel", + "label": "Bubble size", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "BubbleSize" } ], "sharedPropertyDescriptors": [ From 2e3b7e3580551c60c9793452e7112ba65089d9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 24 Jun 2023 21:17:27 +0200 Subject: [PATCH 083/114] Replace other 32 values by BubbleSize properties. --- examples/smoothy/smoothy.json | 81 ++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 7 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a8bf17bd4..d0f2a83ff 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3316,6 +3316,7 @@ "BubbleQueue", "ObjectStack", "BoardBubble", + "BoardBubbleBehavior", "SpeedPathMovement", "Variable(queueIndex)", "" @@ -3428,6 +3429,7 @@ "BubbleQueueBehavior", "ObjectStack", "BoardBubble", + "BoardBubbleBehavior", "SpeedPathMovement", "Variable(queueIndex)", "BubbleClipboard", @@ -11508,7 +11510,7 @@ "fullName": "Queue collision", "functionType": "Condition", "name": "IsQueueColliding", - "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM7_ is in collision with the bubble queue ahaed", + "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM8_ is in collision with the bubble queue ahaed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -11611,7 +11613,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + 32 - BoardBubble.SpeedPathMovement::PositionOnPath())", + "\"delta: \" + ToString(Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize() - BoardBubble.SpeedPathMovement::PositionOnPath())", "", "" ] @@ -11629,7 +11631,7 @@ "BoardBubble", "SpeedPathMovement", "<=", - "Variable(firstBubblePathPosition) + 32", + "Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize()", "" ] } @@ -11678,6 +11680,12 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, + { + "description": "Board bubble behavior", + "name": "BoardBubbleBehavior", + "supplementaryInformation": "Smoothy::BoardBubbleBehavior", + "type": "behavior" + }, { "description": "Speed path movement", "name": "SpeedPathMovement", @@ -11698,7 +11706,7 @@ "fullName": "Merge queue", "functionType": "Action", "name": "MergeQueue", - "sentence": "Merge _PARAM6_ from _PARAM1_ at _PARAM3_ number _PARAM8_ with the bubble queue ahead", + "sentence": "Merge _PARAM6_ from _PARAM1_ at _PARAM3_ number _PARAM9_ with the bubble queue ahead", "events": [ { "disabled": true, @@ -11905,7 +11913,7 @@ "BoardBubble", "SpeedPathMovement", "+", - "Variable(firstBubblePathPosition) + 32 - Variable(lastBubblePathPosition)", + "Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize() - Variable(lastBubblePathPosition)", "" ] }, @@ -12233,6 +12241,12 @@ "supplementaryInformation": "Sprite", "type": "objectList" }, + { + "description": "Board bubble behavior", + "name": "BoardBubbleBehavior", + "supplementaryInformation": "Smoothy::BoardBubbleBehavior", + "type": "behavior" + }, { "description": "Speed path movement", "name": "SpeedPathMovement", @@ -17422,7 +17436,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "Variable(lastBubblePathPosition) - 32", + "Variable(lastBubblePathPosition) - Object.Behavior::PropertyBubbleSize()", "" ] }, @@ -19617,9 +19631,62 @@ } ], "objectGroups": [] + }, + { + "description": "the bubble size.", + "fullName": "Bubble size", + "functionType": "ExpressionAndCondition", + "name": "BubbleSize", + "sentence": "the bubble size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyBubbleSize()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BoardBubbleBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "32", + "type": "Number", + "unit": "Pixel", + "label": "Bubble size", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "BubbleSize" } ], - "propertyDescriptors": [], "sharedPropertyDescriptors": [] } ], From 76152ee7524cd1788edf702c8c1e3307c9c24467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 24 Jun 2023 22:01:25 +0200 Subject: [PATCH 084/114] Replace some speed value with properties. --- examples/smoothy/smoothy.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d0f2a83ff..ca11b4549 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14219,7 +14219,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "64", + "Gutter.GutterBehavior::PushSpeed()", "" ] } @@ -14298,8 +14298,8 @@ "parameters": [ "BoardBubble", "SpeedPathMovement", - "64", - "64", + "Gutter.GutterBehavior::PushAcceleration()", + "Gutter.GutterBehavior::PushSpeed()", "" ] } From 15e3b3bb13051d8b8f82a7c3bcc6344838ac6ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 14:54:13 +0200 Subject: [PATCH 085/114] Add a main comment. --- examples/smoothy/smoothy.json | 261 +--------------------------------- 1 file changed, 4 insertions(+), 257 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index ca11b4549..457725fe7 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2194,47 +2194,6 @@ } ] }, - { - "assetStoreId": "", - "name": "Mark", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ - { - "name": "Cross-1", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.07999999821186066, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Cross.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 15, - "y": 15 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, { "assetStoreId": "", "name": "Launcher", @@ -2610,7 +2569,7 @@ "textG": 0, "textR": 0 }, - "comment": "" + "comment": "\nObjects on the board:\n- BoardBubble are bubbles that move on the gutter.\n- BubbleQueue contain BoardBubble that are touching one to another.\n- Gutter contain BubbleQueue\n- Spawner create new BoardBubble in the gutter.\n\nObjects for player actions:\n- AimingBubble rotates according to how the player is aiming.\n- PreviewBubble shows the next color.\n- InsertedBubble handle the insertion animation.\n\nA big part of the events is inside the Smoothy extension.\nMost of the objects have dedicated behaviors:\n- BoardBubble animate explosions.\n- BubbleQueueBehavior contains bubbles bonded to each other. Each end of the queue has a FSM for the combo movement.\n- GutterBehavior contains bubbles queues and push the queue at the beginning of the gutter.\n- SpawnerBehavior generate bubbles to add in its gutter.\n- InsertedBubbleBehavior animates bubble insertions by pushing leading bubbles from the same queue.\n\nThe \"Curved movement\" extension is used to move bubbles on a path.\nThe \"Object stack\" extension is used to keep track of the bubbles order.\n\n" }, { "type": "BuiltinCommonInstructions::Standard", @@ -3184,7 +3143,8 @@ "BubbleQueue", "ObjectStack", "BoardBubble", - "SpeedPathMovement" + "SpeedPathMovement", + "" ] } ], @@ -13852,7 +13812,7 @@ "sharedPropertyDescriptors": [] }, { - "description": "Contains bubbles bonded to each other. Each end of the queue has a FSM for the combo movement.", + "description": "Contain bubbles bonded to each other. Each end of the queue has a FSM for the combo movement.", "fullName": "Bubble queue", "name": "BubbleQueueBehavior", "objectType": "", @@ -28551,219 +28511,6 @@ ], "eventsBasedObjects": [] }, - { - "author": "D8H", - "category": "Input", - "extensionNamespace": "", - "fullName": "Cursor movement conditions", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTEsMjhMMTEsMjhjLTMuMywwLTYtMi43LTYtNnYtNGMwLTMuMywyLjctNiw2LTZoMGMzLjMsMCw2LDIuNyw2LDZ2NEMxNywyNS4zLDE0LjMsMjgsMTEsMjh6Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMTEiIHkxPSIxNSIgeDI9IjExIiB5Mj0iMTkiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yOSw5YzAsMi41LTIsNC41LTQuNSw0LjVTMjAsMTEuNSwyMCw5VjguNUMyMCw2LDE4LDQsMTUuNSw0UzExLDYsMTEsOC41Ii8+DQo8L3N2Zz4NCg==", - "name": "CursorMovement", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_mouse_pc.svg", - "shortDescription": "Conditions to check the cursor movement (still or moving).", - "version": "1.0.1", - "description": [ - "Provides two conditions:", - "* The cursor is moving", - "* The cursor has stayed still for a given duration" - ], - "origin": { - "identifier": "CursorMovement", - "name": "gdevelop-extension-store" - }, - "tags": [ - "mouse", - "pointer", - "cursor" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Check if the cursor has stayed still for the specified time on the default layer.", - "fullName": "Cursor stays still", - "functionType": "Condition", - "name": "CursorStayStill", - "sentence": "Cursor has stayed still for _PARAM1_ seconds ", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "CompareTimer" - }, - "parameters": [ - "", - "\"__mousemovement_MouseStayStill\"", - "<", - "GetArgumentAsNumber(\"Duration\")" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CursorMovement::CursorIsMoving" - }, - "parameters": [ - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"__mousemovement_MouseStayStill\"" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Duration (in seconds)", - "name": "Duration", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Check if the cursor is moving on the default layer.", - "fullName": "Cursor is moving", - "functionType": "Condition", - "name": "CursorIsMoving", - "sentence": "Cursor is moving", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__mousemovement.MousePreX", - "=", - "MouseX(\"\", 0)" - ] - }, - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "__mousemovement.MousePreY", - "=", - "MouseY(\"\", 0)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "" - ] - } - ] - } - ], - "parameters": [], - "objectGroups": [] - }, - { - "fullName": "", - "functionType": "Action", - "name": "onScenePostEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__mousemovement.MousePreX", - "=", - "MouseX(\"\", 0)" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "__mousemovement.MousePreY", - "=", - "MouseY(\"\", 0)" - ] - } - ] - } - ], - "parameters": [], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [], - "eventsBasedObjects": [] - }, { "author": "@4ian", "category": "Game mechanic", From b9874fc47f68b888281b12c4dcf5056139511749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 15:01:40 +0200 Subject: [PATCH 086/114] Add the example description. --- examples/smoothy/README.md | 2 +- examples/smoothy/TAGS.md | 2 +- examples/smoothy/smoothy.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/smoothy/README.md b/examples/smoothy/README.md index 122c0cc7e..2a282e923 100644 --- a/examples/smoothy/README.md +++ b/examples/smoothy/README.md @@ -1 +1 @@ -A Bust-a-Move clone to show how to make a match 3 game. \ No newline at end of file +A Zuma clone to show how to orginize a project with behaviors. \ No newline at end of file diff --git a/examples/smoothy/TAGS.md b/examples/smoothy/TAGS.md index 2928a3cb5..2c8ca5111 100644 --- a/examples/smoothy/TAGS.md +++ b/examples/smoothy/TAGS.md @@ -1 +1 @@ -game \ No newline at end of file +game, expert \ No newline at end of file diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 457725fe7..0e0da857f 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -21,7 +21,7 @@ "useExternalSourceFiles": false, "version": "1.0.0", "name": "Smoothy", - "description": "", + "description": "A Zuma clone to show how to orginize a project with behaviors.", "author": "", "windowWidth": 854, "windowHeight": 480, From c682f5c4245cc73626a459fb505a48f2f5ae7ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 15:10:16 +0200 Subject: [PATCH 087/114] Add a swap control for touch screens. --- examples/smoothy/smoothy.json | 45 +++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 0e0da857f..803de22f8 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2204,14 +2204,14 @@ "effects": [], "behaviors": [ { - "name": "Turret", - "type": "Turret::Turret", - "SpeedMax": 360, - "Acceleration": 1440, - "Deceleration": 36000, - "Property": false, - "AngleMin": 0, - "AngleMax": 0 + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 } ], "animations": [ @@ -2914,6 +2914,17 @@ "FireBullet", "" ] + }, + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Launcher", + "ButtonFSM", + "" + ] } ], "actions": [ @@ -2987,6 +2998,16 @@ "", "LShift" ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Launcher", + "ButtonFSM", + "" + ] } ] } @@ -3813,6 +3834,10 @@ "name": "BubbleQueueBehavior", "type": "Smoothy::BubbleQueueBehavior" }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, { "name": "FireBullet", "type": "FireBullet::FireBullet" @@ -3836,10 +3861,6 @@ { "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior" - }, - { - "name": "Turret", - "type": "Turret::Turret" } ] }, From 42b5cda3d12f3cb7eb87063b2d0c33fd7b446243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 17:20:31 +0200 Subject: [PATCH 088/114] Add more comments. --- examples/smoothy/smoothy.json | 122 ++++++++++++++++------------------ 1 file changed, 58 insertions(+), 64 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 803de22f8..7be4ae763 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -11493,6 +11493,18 @@ "name": "IsQueueColliding", "sentence": "_PARAM5_ from _PARAM1_ at _PARAM3_ number _PARAM8_ is in collision with the bubble queue ahaed", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "firstBubblePathPosition variable is only used locally to this condition." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -11536,23 +11548,6 @@ } ] }, - { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"Gutter: \" + ToString(Gutter.ObjectStack::Height())", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -11580,52 +11575,27 @@ "BoardBubble", "" ] - } - ], - "actions": [], - "events": [ + }, { - "disabled": true, - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "\"delta: \" + ToString(Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize() - BoardBubble.SpeedPathMovement::PositionOnPath())", - "", - "" - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "<=", + "Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize()", + "" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "<=", - "Variable(firstBubblePathPosition) + BoardBubble.BoardBubbleBehavior::BubbleSize()", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -12261,6 +12231,18 @@ "name": "IsQueueMatching", "sentence": "_PARAM5_ from _PARAM1_ at the tail of _PARAM3_ number _PARAM7_ is matching the bubble at the head of the previous queue", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "firstBubbleColor variable is only used locally to this condition." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -12564,6 +12546,18 @@ "name": "SpeedToReach", "sentence": "Braking distance from an initial speed: _PARAM2_ and a deceleration: _PARAM3_ is less than _PARAM1_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This system:\n\ntargetedSpeed = initialSpeed + acceleration * t\ndistance = initialSpeed * t + acceleration * t² / 2\n\nallows to find this formula:\n\ninitialSpeed = sqrt(- 2 * distance * acceleration + targetedSpeed²)\n\n" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -12584,7 +12578,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "sqrt(2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"FinalSpeed\") * GetArgumentAsNumber(\"FinalSpeed\"))" + "sqrt(2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"TargetedSpeed\") * GetArgumentAsNumber(\"TargetedSpeed\"))" ] } ] @@ -12609,7 +12603,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "-sqrt(-2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"FinalSpeed\") * GetArgumentAsNumber(\"FinalSpeed\"))" + "-sqrt(-2 * GetArgumentAsNumber(\"Distance\") * GetArgumentAsNumber(\"Deceleration\") + GetArgumentAsNumber(\"TargetedSpeed\") * GetArgumentAsNumber(\"TargetedSpeed\"))" ] } ] @@ -12630,8 +12624,8 @@ "type": "expression" }, { - "description": "Final speed", - "name": "FinalSpeed", + "description": "Targeted speed", + "name": "TargetedSpeed", "type": "expression" } ], From 12b64b57b045b941024909a7e5745f2bab6c187c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 18:41:35 +0200 Subject: [PATCH 089/114] Add the preview image. --- examples/smoothy/assets/Cross.png | Bin 208 -> 0 bytes examples/smoothy/preview.png | Bin 0 -> 68417 bytes examples/smoothy/smoothy.json | 77 ++++++++++++++++++++---------- 3 files changed, 53 insertions(+), 24 deletions(-) delete mode 100644 examples/smoothy/assets/Cross.png create mode 100644 examples/smoothy/preview.png diff --git a/examples/smoothy/assets/Cross.png b/examples/smoothy/assets/Cross.png deleted file mode 100644 index 009f1e68e8752f1807cf89a74eb4132f85f7661c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3oCO|{#S9GGLLkg|>2BR0pkR}y zi(`n#@#F*v)`|mvL!STtVQ^P>$u4G(trN8P7F-G1q@#XJA*N=Nu6mfUV&Nnp#k}#8 zOQcVix93)g^-q`Vm?UCaadncE{*#EFP}{X$3l}CEuDscl^SAlfqluEoOHTSRhc)nI zOtegxdZZz&oB5i6#D!(&8_d43ZKT7cESoxRye3C~a|fhZZkx!QEYpJH@pWcemi~?(QzZgS+bueV=>(eBT%h zI0-q~`)rwOtvTlok&_WaMZ!mdf`UT*DK4x41qGuF1@&$n0S@v`zT6Wv6x3&^pTa+s zT$YYjRsLwIc!BRvYxkv%;>9}MC80l~bmqTXyfTbA78{LMPo4{(sV1ndgG zJR0T=*JoEwj$>6Au9;a?;%H7uw{-LQh9H#aM+apD73-W7$6vl2nS9v{PJNa4x+}dV7DOQR$AJ7YmX6c<{O`&i1GD763qilQxBo$2iC19$ z_en(M|9i_fRmA_@>;InSzl%S*WdEP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aJ@dfjuVm<#tmxL@TY2Xat`JuBg<^STs_WHo( zD@A2dG4QI9!)rX-m6`yf1{QU|AgoHc$})TnL9V@qxi_jEBHbOYnHll$4mvbI>N^;J zrH8k2E?SJ%MaqzyX1dLzMQztfYX_(@WC5e4zTxtTI`d>X{(EX=Rq1X{(<=duK_`|! zqpUrGAPM>!SK9W_e%-V5hWU~3Z1uqy$H}=&wX<_rJFP8KCW?NPR5vpXoomGUA7&2u z&6i!OYYFY? zOkZ{QTiO|;#^D2Q3*OzS*kv1!Sbdqz%Ox&dH;Gb^2-OIE-QB~e{P)oRtb!1Md!r{l zMUaq?A?eaLRp57sfydnNm=YP~ Date: Sun, 25 Jun 2023 18:51:06 +0200 Subject: [PATCH 090/114] Fix spwaned colors. --- examples/smoothy/smoothy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 05739777f..68b63c6ce 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -17038,7 +17038,7 @@ "parameters": [ "randomColorIndex", "=", - "Random(Object.Behavior::PropertyColorCount() - 1)" + "Random(Object.Behavior::ColorCount() - 1)" ] } ], From 26eb3a43befec58e1594b1dc929068dad390700e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:53:27 +0000 Subject: [PATCH 091/114] Optimised images with calibre/image-actions --- examples/smoothy/preview.png | Bin 68417 -> 55393 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/smoothy/preview.png b/examples/smoothy/preview.png index c1bacf1b3461dbc3f5c67aee3ae39c9376055ac8..dd454447bd5f5243a02f0afd1cfe5ce222e9e084 100644 GIT binary patch literal 55393 zcmZs@Wk8hO_XVmTDczDXNVjw=9nuWlA>G~54Ior7p;C~7f9_WC7knAKi z9ACY9i}mv7^~AEz!>d>CUrC96R&iT6Y=ioOr`s!hpZ#l2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8|Uw?Z0PyS7(~ApUHW3IAy!J~niT)oQR*0!?8#k%w@zGC(tpW3q@X_$zuJPM zbh4J1YMWG>ey6fNeWUK3ukCH z=BsgdtNVB7@u1efM#~sn^?k0pg)FaJ@dfjuVm<#tmxL@TY2Xat`JuBg<^STs_WHo( zD@A2dG4QI9!)rX-m6`yf1{QU|AgoHc$})TnL9V@qxi_jEBHbOYnHll$4mvbI>N^;J zrH8k2E?SJ%MaqzyX1dLzMQztfYX_(@WC5e4zTxtTI`d>X{(EX=Rq1X{(<=duK_`|! zqpUrGAPM>!SK9W_e%-V5hWU~3Z1uqy$H}=&wX<_rJFP8KCW?NPR5vpXoomGUA7&2u z&6i!OYYFY? zOkZ{QTiO|;#^D2Q3*OzS*kv1!Sbdqz%Ox&dH;Gb^2-OIE-QB~e{P)oRtb!1Md!r{l zMUaq?A?eaLRp57sfydnNm=YP~ Date: Sun, 25 Jun 2023 22:19:44 +0200 Subject: [PATCH 092/114] Slit hit stop states. --- examples/smoothy/smoothy.json | 629 ++++++++++++++++------------------ 1 file changed, 298 insertions(+), 331 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 68b63c6ce..2778c6949 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14249,6 +14249,36 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -14470,7 +14500,37 @@ "Object", "Behavior", "=", - "\"HitStopEnd\"" + "\"HitStopBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"" ] } ], @@ -14731,6 +14791,45 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"AfterImpact\"", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -14740,7 +14839,7 @@ }, "parameters": [ "Object", - "\"TailSplit\"", + "\"TimeFromTailImpact\"", ">=", "Object.Behavior::PropertyRewindDelay()" ] @@ -14759,7 +14858,7 @@ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"AfterImpact\"" ] } ], @@ -14772,18 +14871,9 @@ "Object", "Behavior", "=", - "\"StopOrTaillingPush\"", + "\"HitStop\"", "" ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"TailSplit\"" - ] } ] }, @@ -14858,7 +14948,7 @@ "Object", "Behavior", "=", - "\"HitStop\"", + "\"HitStopBeforeRewind\"", "" ] } @@ -14879,7 +14969,7 @@ "Object", "Behavior", "=", - "\"HitStopEnd\"" + "\"HitStopEndBeforeRewind\"" ] } ], @@ -14901,24 +14991,13 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - }, { "type": { "value": "CompareObjectTimer" }, "parameters": [ "Object", - "\"TailSplit\"", + "\"TimeFromTailImpact\"", ">=", "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" ] @@ -14927,51 +15006,114 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" + "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"HitStopEnd\"", - "" + "\"TimeFromTailImpact\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"", + "" + ] + } ] }, { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"TailSplit\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"", + "" + ] + } ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Head state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"HitStop\"" + "\"StopOrTaillingPush\"" ] } ], "actions": [ { "type": { - "value": "DebuggerTools::ConsoleLog" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ - "\"HitStop: \" + ToString(Object.ObjectTimerElapsedTime(\"TailSplit\"))", - "", + "Object", + "Behavior", + "=", + "\"Idle\"", "" ] } @@ -14982,7 +15124,7 @@ "conditions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, "parameters": [ "Object", @@ -14995,13 +15137,13 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" }, "parameters": [ "Object", "Behavior", "=", - "\"JustSplit\"", + "\"AfterImpact\"", "" ] }, @@ -15011,49 +15153,7 @@ }, "parameters": [ "Object", - "\"TailSplit\"" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Head state", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Idle\"", - "" + "\"TimeFromHeadImpact\"" ] } ] @@ -15067,7 +15167,7 @@ }, "parameters": [ "Object", - "\"HeadSplit\"", + "\"TimeFromHeadImpact\"", ">=", "Object.Behavior::PropertyRewindDelay()" ] @@ -15076,89 +15176,31 @@ "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"", - "" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"" - ] - } + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"AfterImpact\"" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"", - "" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"", + "" ] } ] @@ -15214,7 +15256,7 @@ }, "parameters": [ "Object", - "\"HeadSplit\"" + "\"TimeFromHeadImpact\"" ] } ] @@ -15243,7 +15285,7 @@ "Object", "Behavior", "=", - "\"HitStop\"", + "\"HitStopBeforeRewind\"", "" ] } @@ -15256,88 +15298,88 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - }, { "type": { "value": "CompareObjectTimer" }, "parameters": [ "Object", - "\"HeadSplit\"", + "\"TimeFromHeadImpact\"", ">=", "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" ] } ], "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"", - "" - ] - }, { "type": { "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "\"HeadSplit\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RewindImpact\"" + "\"TimeFromHeadImpact\"" ] } ], - "actions": [ + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStop\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"", + "" + ] + } ] }, { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"", + "" + ] + } ] } ] @@ -15449,7 +15491,7 @@ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"AfterImpact\"" ] } ] @@ -15484,7 +15526,7 @@ }, "parameters": [ "Object", - "\"TailSplit\"" + "\"TimeFromTailImpact\"" ] } ], @@ -15522,21 +15564,13 @@ }, { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"" - ] - } + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" ] } ], @@ -15647,7 +15681,7 @@ "Object", "Behavior", "=", - "\"JustSplit\"" + "\"AfterImpact\"" ] } ] @@ -15682,7 +15716,7 @@ }, "parameters": [ "Object", - "\"HeadSplit\"" + "\"TimeFromHeadImpact\"" ] } ], @@ -15720,21 +15754,13 @@ }, { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"" - ] - } + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" ] } ], @@ -15911,41 +15937,12 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" }, "parameters": [ "Object", "Behavior", - "=", - "\"JustSplit\"" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"TailSplit\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } + "" ] } ] @@ -15979,41 +15976,12 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadState" + "value": "Smoothy::BubbleQueueBehavior::SetHeadIdle" }, "parameters": [ "Object", "Behavior", - "=", - "\"JustSplit\"" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"HeadSplit\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetPropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } + "" ] } ] @@ -16216,7 +16184,7 @@ }, "parameters": [ "Object", - "\"TailSplit\"" + "\"TimeFromTailImpact\"" ] } ], @@ -16296,7 +16264,7 @@ }, "parameters": [ "Object", - "\"HeadSplit\"" + "\"TimeFromHeadImpact\"" ] } ] @@ -16318,7 +16286,7 @@ "objectGroups": [] }, { - "description": "the tail state of the queue. It should only be used by this extension.", + "description": "the tail state of the queue. It should only be used by this extension when merging or splitting queues.", "fullName": "Tail state", "functionType": "ExpressionAndCondition", "group": "Bubble queue (private)", @@ -16417,7 +16385,7 @@ "objectGroups": [] }, { - "description": "the head state of the queue. It should only be used by this extension.", + "description": "the head state of the queue. It should only be used by this extension when merging or splitting queues.", "fullName": "Head state", "functionType": "ExpressionAndCondition", "group": "Bubble queue (private)", @@ -16818,7 +16786,6 @@ "comment": "Enable this event to test the combos." }, { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { From b9b4731af8987ac251718cbe3b3513175d5944f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 25 Jun 2023 23:03:33 +0200 Subject: [PATCH 093/114] Fix missing impact rewind when there is only 2 bubble of the same color. --- examples/smoothy/smoothy.json | 320 ++++++++++++++++++++++++---------- 1 file changed, 225 insertions(+), 95 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 2778c6949..a3107784d 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -12003,11 +12003,12 @@ }, { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "ModVarScene" }, "parameters": [ - "tailSplitTimerExists", - "=" + "tailSplitTimerValue", + "=", + "-1" ] } ], @@ -12021,22 +12022,13 @@ }, "parameters": [ "BubbleQueue", - "\"TailSplit\"", + "\"TimeFromTailImpact\"", ">=", "0" ] } ], "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "tailSplitTimerExists", - "True" - ] - }, { "type": { "value": "ModVarScene" @@ -12044,7 +12036,7 @@ "parameters": [ "tailSplitTimerValue", "=", - "BubbleQueue.ObjectTimerElapsedTime(\"TailSplit\")" + "BubbleQueue.ObjectTimerElapsedTime(\"TimeFromTailImpact\")" ] } ] @@ -12082,89 +12074,18 @@ "ObjectStack", "ObjectStack" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Set back the tail state." }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=", - "VariableString(tailState)", - "" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailComboLevel" - }, - "parameters": [ - "BubbleQueue", - "BubbleQueueBehavior", - "=", - "Variable(tailComboLevel)", - "" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "BubbleQueue", - "\"TailSplit\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "tailSplitTimerExists", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "AdvancedTimer::SetObjectTimerElapsedTime" - }, - "parameters": [ - "", - "=", - "Variable(tailSplitTimerValue)", - "BubbleQueue", - "\"TailSplit\"", - "" - ] - } - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetJustMerged" + }, + "parameters": [ + "BubbleQueue", + "BubbleQueueBehavior", + "VariableString(tailState)", + "Variable(tailComboLevel)", + "Variable(tailSplitTimerValue)", + "" ] } ] @@ -16144,6 +16065,212 @@ ], "objectGroups": [] }, + { + "description": "Change the state of the tail when the queue merge with anothe one.", + "fullName": "Just merged", + "functionType": "Action", + "name": "SetJustMerged", + "sentence": "Change tail state of _PARAM0_ after a merge of a queue with tail state: _PARAM2_, tail combo level: _PARAM3_ and time from tail impact: _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The leading queue rewind back to the tailing queue and they merged (because there were only 2 bubbles of the same color)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The tailing queue reached the leading queue and they merged." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RewindImpact\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set back the tail state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"TailState\")", + "" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TailComboLevel\")", + "" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsNumber" + }, + "parameters": [ + "\"TimeFromTailImpact\"", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedTimer::SetObjectTimerElapsedTime" + }, + "parameters": [ + "", + "=", + "GetArgumentAsNumber(\"TimeFromTailImpact\")", + "Object", + "\"TimeFromTailImpact\"", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::BubbleQueueBehavior", + "type": "behavior" + }, + { + "description": "Tail state", + "name": "TailState", + "type": "string" + }, + { + "description": "Tail combo level", + "name": "TailComboLevel", + "type": "expression" + }, + { + "description": "Time from tail impact", + "name": "TimeFromTailImpact", + "type": "expression" + } + ], + "objectGroups": [] + }, { "description": "Change the state of the tail to \"StopOrTaillingPush\" to go back to idle.", "fullName": "Tail idle", @@ -16332,6 +16459,7 @@ "functionType": "ActionWithOperator", "getterName": "TailState", "name": "SetTailState", + "private": true, "sentence": "", "events": [ { @@ -16431,6 +16559,7 @@ "functionType": "ActionWithOperator", "getterName": "HeadState", "name": "SetHeadState", + "private": true, "sentence": "", "events": [ { @@ -16786,6 +16915,7 @@ "comment": "Enable this event to test the combos." }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { From 9a454775503af533f312d3ebf7a2fe8af737ec60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Mon, 26 Jun 2023 01:02:35 +0200 Subject: [PATCH 094/114] Fix a regression on bubble insertion position. --- examples/smoothy/smoothy.json | 284 +++++++++++++--------------------- 1 file changed, 106 insertions(+), 178 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a3107784d..af5c0174c 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3097,24 +3097,94 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::CreateInsertedBubble" - }, - "parameters": [ - "", - "Gutter", - "GutterBehavior", - "ObjectStack", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "MovingBubble", - "InsertedBubble", - "InsertedBubble", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "" + ] + }, + { + "type": { + "value": "ObjectStack::Contains" + }, + "parameters": [ + "", + "Gutter", + "ObjectStack", + "BubbleQueue", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "InsertedBubble", + "Gutter.X()", + "Gutter.Y()", + "" + ] + }, + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "InsertedBubble", + "BoardBubble" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "BoardBubble" + ] + }, + { + "type": { + "value": "Smoothy::InsertedBubbleBehavior::Initialize" + }, + "parameters": [ + "InsertedBubble", + "InsertedBubble", + "Gutter", + "GutterBehavior", + "BubbleQueue", + "ObjectStack", + "BoardBubble", + "SpeedPathMovement", + "MovingBubble", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MovingBubble", + "" + ] + } ] } ] @@ -12318,165 +12388,6 @@ ], "objectGroups": [] }, - { - "description": "Create an InsertedQueue to handle the insersion animation.", - "fullName": "Create inserted bubble", - "functionType": "Action", - "name": "CreateInsertedBubble", - "sentence": "Replace _PARAM8_ by a new _PARAM9_ to insert into _PARAM6_ from _PARAM4_ of _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "" - ] - }, - { - "type": { - "value": "ObjectStack::Contains" - }, - "parameters": [ - "", - "Gutter", - "ObjectStack", - "BubbleQueue", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "InsertedBubble", - "Gutter.X()", - "Gutter.Y()", - "" - ] - }, - { - "type": { - "value": "LinkedObjects::LinkObjects" - }, - "parameters": [ - "", - "InsertedBubble", - "BoardBubble" - ] - }, - { - "type": { - "value": "AjoutObjConcern" - }, - "parameters": [ - "", - "BoardBubble" - ] - }, - { - "type": { - "value": "Smoothy::InsertedBubbleBehavior::Initialize" - }, - "parameters": [ - "InsertedBubble", - "InsertedBubbleBehavior", - "Gutter", - "GutterBehavior", - "BubbleQueue", - "ObjectStack", - "BoardBubble", - "SpeedPathMovement", - "MovingBubble", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "MovingBubble", - "" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Gutter", - "name": "Gutter", - "type": "objectList" - }, - { - "description": "Gutter behavior", - "name": "GutterBehavior", - "supplementaryInformation": "Smoothy::GutterBehavior", - "type": "behavior" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Bubble queue", - "name": "BubbleQueue", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Object stack behavior", - "name": "ObjectStack", - "supplementaryInformation": "ObjectStack::ObjectStack", - "type": "behavior" - }, - { - "description": "Board bubble", - "name": "BoardBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Movement on a curve", - "name": "SpeedPathMovement", - "supplementaryInformation": "CurvedMovement::SpeedPathMovement", - "type": "behavior" - }, - { - "description": "Moving bubble", - "name": "MovingBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Inserted Bubble", - "name": "InsertedBubble", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Inserted bubble behavior", - "name": "InsertedBubbleBehavior", - "supplementaryInformation": "Smoothy::InsertedBubbleBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "description": "Return the speed necessary to cover a distance according to the deceleration.", "fullName": "Speed to reach", @@ -12625,6 +12536,22 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(abs(AngleDifference(AngleBetweenPositions(BoardBubble.X(), BoardBubble.Y(), MovingBubble.X(), MovingBubble.Y()), BoardBubble.SpeedPathMovement::MovementAngle())))", + "", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -12634,7 +12561,7 @@ }, "parameters": [ "abs(AngleDifference(AngleBetweenPositions(BoardBubble.X(), BoardBubble.Y(), MovingBubble.X(), MovingBubble.Y()), BoardBubble.SpeedPathMovement::MovementAngle()))", - "<", + ">", "90" ] } @@ -12691,7 +12618,7 @@ "parameters": [ "BubbleIndex", "<", - "BubbleQueue.ObjectStack::HeightOf(BoardBubble)" + "BubbleQueue.ObjectStack::Height()" ] } ], @@ -13820,6 +13747,7 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From c7908e6cec9c495c7f9f4d8b3f949ff76dffbec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Mon, 26 Jun 2023 01:27:07 +0200 Subject: [PATCH 095/114] Replace some value by properties. --- examples/smoothy/smoothy.json | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index af5c0174c..e8ffc1637 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -12536,22 +12536,6 @@ ], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "DebuggerTools::ConsoleLog" - }, - "parameters": [ - "ToString(abs(AngleDifference(AngleBetweenPositions(BoardBubble.X(), BoardBubble.Y(), MovingBubble.X(), MovingBubble.Y()), BoardBubble.SpeedPathMovement::MovementAngle())))", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -17372,18 +17356,6 @@ "BoardBubble", "" ] - }, - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::PositionOnPath" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - ">=", - "32", - "" - ] } ], "actions": [ @@ -17629,7 +17601,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "64", + "Gutter.GutterBehavior::PushSpeed()", "" ] } From 6c8ca61418d40f7a63be3146f243511f62988508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 1 Jul 2023 14:06:31 +0200 Subject: [PATCH 096/114] Allow to setup the beginning boost. --- examples/smoothy/smoothy.json | 66 +++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index e8ffc1637..aca29b1b8 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -17571,7 +17571,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "Smoothy::SpeedToReach(1/2 * CurvedMovement::PathLength(Object.Behavior::PathName()), 889, 64)", + "Gutter.GutterBehavior::BeginningSpeed()", "" ] } @@ -18307,7 +18307,7 @@ "Object", "Behavior", ">", - "1/2 * CurvedMovement::PathLength(Object.Behavior::PathName())", + "Object.Behavior::PropertyBeginningFillRatio() * CurvedMovement::PathLength(Object.Behavior::PathName())", "" ] } @@ -19437,6 +19437,46 @@ } ], "objectGroups": [] + }, + { + "description": "the speed at the beginning of the game.", + "fullName": "Beggining speed", + "functionType": "ExpressionAndCondition", + "name": "BeginningSpeed", + "sentence": "the beginning speed ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Smoothy::SpeedToReach(Object.Behavior::PropertyBeginningFillRatio() * CurvedMovement::PathLength(Object.Behavior::PathName()), Object.Behavior::PropertyBeginningDeceleration(), Object.Behavior::PropertyNormalSpeed())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] } ], "propertyDescriptors": [ @@ -19548,6 +19588,28 @@ "extraInformation": [], "hidden": false, "name": "AccelerationDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Dimensionless", + "label": "Beggining fill ratio", + "description": "", + "group": "Beginning", + "extraInformation": [], + "hidden": false, + "name": "BeginningFillRatio" + }, + { + "value": "889", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Beginning deceleration", + "description": "", + "group": "Beginning", + "extraInformation": [], + "hidden": false, + "name": "BeginningDeceleration" } ], "sharedPropertyDescriptors": [] From 0ed24b63fe1a4e1df58de54baf78c6a9789e7a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 1 Jul 2023 16:30:59 +0200 Subject: [PATCH 097/114] Add an expression to get the 1st queue progression. --- examples/smoothy/smoothy.json | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index aca29b1b8..0f44a67a7 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -18266,13 +18266,13 @@ "actions": [ { "type": { - "value": "Smoothy::GutterBehavior::SetPropertyFirstQueueHeadPosition" + "value": "Smoothy::GutterBehavior::SetPropertyPushingQueueProgression" }, "parameters": [ "Object", "Behavior", "=", - "BoardBubble.SpeedPathMovement::PositionOnPath()" + "BoardBubble.SpeedPathMovement::PositionOnPath() / CurvedMovement::PathLength(Object.Behavior::PropertyPathName())" ] } ], @@ -18287,7 +18287,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Head position: \" + ToString(Object.Behavior::PropertyFirstQueueHeadPosition())", + "\"Head position: \" + ToString(Object.Behavior::PropertyPushingQueueProgression())", "", "" ] @@ -18301,13 +18301,13 @@ "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::FirstQueueHeadPosition" + "value": "Smoothy::GutterBehavior::PushingQueueProgression" }, "parameters": [ "Object", "Behavior", ">", - "Object.Behavior::PropertyBeginningFillRatio() * CurvedMovement::PathLength(Object.Behavior::PathName())", + "Object.Behavior::PropertyBeginningFillRatio()", "" ] } @@ -18364,12 +18364,11 @@ "objectGroups": [] }, { - "description": "the first queue head position of the gutter.", - "fullName": "First queue head position", + "description": "the pushing queue progression in the gutter.", + "fullName": "Pushing queue progression", "functionType": "ExpressionAndCondition", - "name": "FirstQueueHeadPosition", - "private": true, - "sentence": "the first queue head position", + "name": "PushingQueueProgression", + "sentence": "the pushing queue progression", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -18380,7 +18379,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyFirstQueueHeadPosition()" + "Object.Behavior::PropertyPushingQueueProgression()" ] } ] @@ -18956,13 +18955,13 @@ "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::FirstQueueHeadPosition" + "value": "Smoothy::GutterBehavior::PushingQueueProgression" }, "parameters": [ "Object", "Behavior", ">=", - "Object.Behavior:: PropertyNearDeathLengthRatio() * CurvedMovement::PathLength(Object.Behavior::PropertyPathName())", + "Object.Behavior:: PropertyNearDeathLengthRatio()", "" ] } @@ -19495,13 +19494,13 @@ { "value": "0", "type": "Number", - "unit": "Pixel", - "label": "First queue head position", + "unit": "Dimensionless", + "label": "Pushing queue progression", "description": "", "group": "", "extraInformation": [], "hidden": true, - "name": "FirstQueueHeadPosition" + "name": "PushingQueueProgression" }, { "value": "", From 1256539c4e5828950b1159e798e3a87adc9f5dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 1 Jul 2023 19:09:30 +0200 Subject: [PATCH 098/114] Add properties to finely tune the push speed. --- examples/smoothy/smoothy.json | 1403 +++++++++++++++++++++++++++------ 1 file changed, 1150 insertions(+), 253 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 0f44a67a7..4f6c46c8b 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -5600,6 +5600,925 @@ } ], "eventsFunctionsExtensions": [ + { + "author": "add_, @Jurfix", + "category": "Advanced", + "extensionNamespace": "", + "fullName": "Extended math support", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZ1bmN0aW9uLXZhcmlhbnQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNDIsNS4yOUMxMS4zMiw1LjE5IDEwLjM1LDYgMTAuMjUsNy4xMUwxMCwxMEgxMi44MlYxMkg5LjgyTDkuMzgsMTcuMDdDOS4xOCwxOS4yNyA3LjI0LDIwLjkgNS4wNCwyMC43QzMuNzksMjAuNTkgMi42NiwxOS45IDIsMTguODNMMy41LDE3LjMzQzMuODMsMTguMzggNC45NiwxOC45NyA2LDE4LjYzQzYuNzgsMTguMzkgNy4zMywxNy43IDcuNCwxNi44OUw3LjgyLDEySDQuODJWMTBIOEw4LjI3LDYuOTNDOC40Niw0LjczIDEwLjM5LDMuMSAxMi42LDMuMjhDMTMuODYsMy4zOSAxNSw0LjA5IDE1LjY2LDUuMTdMMTQuMTYsNi42N0MxMy45MSw1LjkgMTMuMjMsNS4zNiAxMi40Miw1LjI5TTIyLDEzLjY1TDIwLjU5LDEyLjI0TDE3Ljc2LDE1LjA3TDE0LjkzLDEyLjI0TDEzLjUsMTMuNjVMMTYuMzUsMTYuNUwxMy41LDE5LjMxTDE0LjkzLDIwLjcyTDE3Ljc2LDE3Ljg5TDIwLjU5LDIwLjcyTDIyLDE5LjMxTDE5LjE3LDE2LjVMMjIsMTMuNjVaIiAvPjwvc3ZnPg==", + "name": "ExtendedMath", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/function-variant.svg", + "shortDescription": "Additional math functions and constants as expressions and conditions.", + "version": "1.1.0", + "description": [ + "Expressions:", + " - Mathematical constants", + " - Greatest common factor/Lowest common multiple", + " - Factorial", + " - Coordinates conversion for polar and isometric systems", + " - ToFixedString: Formats a number into a string with the specified number of decimal places", + " - ToFixed: (Deprecated) Formats a number to use the specified number of decimal places", + "", + "Conditions:", + "- IsEven: Check if the number is even (divisible by 2)", + "", + "Release Notes:", + "", + "Version 1.0.7", + "- Added ToFixedString()", + "- Deprecated ToFixed() because it does not show any trailing zeros for whole numbers. Prefer using ToFixedString() to set values in text objects.", + "" + ], + "origin": { + "identifier": "ExtendedMath", + "name": "gdevelop-extension-store" + }, + "tags": [ + "math", + "constants", + "conversion", + "coordinates", + "convert", + "format", + "modulus" + ], + "authorIds": [ + "AlZ3D1xkH0QDao7T37VZZUeYNpn1", + "dt0tRnf2kHWJnjkrpnzTzNj9Yc63" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Returns a term from the Fibonacci sequence.", + "fullName": "Fibonacci numbers", + "functionType": "Expression", + "name": "Fibonacci", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "function fibonacci(n) {", + " let initial = 0;", + " let final = 1;", + " let sum = 0;", + "", + " let i = 0;", + " for(i = 2; i <= n; i++) {", + " sum = initial + final;", + "", + " initial = final;", + " final = sum;", + " }", + " return n ? final : initial;", + "}", + "", + "const n = eventsFunctionContext.getArgument(\"n\");", + "", + "eventsFunctionContext.returnValue = fibonacci(n);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The desired term in the sequence", + "name": "n", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Calculates the steepness of a line between two points.", + "fullName": "Slope", + "functionType": "Expression", + "name": "Slope", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const x1 = eventsFunctionContext.getArgument(\"x1\");\r", + "const y1 = eventsFunctionContext.getArgument(\"y1\");\r", + "const x2 = eventsFunctionContext.getArgument(\"x2\");\r", + "const y2 = eventsFunctionContext.getArgument(\"y2\");\r", + "\r", + "eventsFunctionContext.returnValue = (y2 - y1) / (x2 - x1);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "X value of the first point", + "name": "x1", + "type": "expression" + }, + { + "description": "Y value of the first point", + "name": "y1", + "type": "expression" + }, + { + "description": "X value of the second point", + "name": "x2", + "type": "expression" + }, + { + "description": "Y value of the second point", + "name": "y2", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Converts a number of one range e.g. 0-1 to another 0-255.", + "fullName": "Map", + "functionType": "Expression", + "name": "Map", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const n = eventsFunctionContext.getArgument(\"n\");", + "const min1 = eventsFunctionContext.getArgument(\"min1\");", + "const max1 = eventsFunctionContext.getArgument(\"max1\");", + "const min2 = eventsFunctionContext.getArgument(\"min2\");", + "const max2 = eventsFunctionContext.getArgument(\"max2\");", + "", + "eventsFunctionContext.returnValue = (n - min1) * (max2 - min2) / (max1 - min1) + min2;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The value to convert", + "name": "n", + "type": "expression" + }, + { + "description": "The lowest value of the first range", + "name": "min1", + "type": "expression" + }, + { + "description": "The highest value of the first range", + "name": "max1", + "type": "expression" + }, + { + "description": "The lowest value of the second range", + "name": "min2", + "type": "expression" + }, + { + "description": "The highest value of the second range", + "name": "max2", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Returns the value of the length of the hypotenuse.", + "fullName": "Hypotenuse length", + "functionType": "Expression", + "name": "Hypot", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const a = eventsFunctionContext.getArgument(\"a\");\r", + "const b = eventsFunctionContext.getArgument(\"b\");\r", + "\r", + "eventsFunctionContext.returnValue = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "First side of the triangle", + "name": "a", + "type": "expression" + }, + { + "description": "Second side of the triangle", + "name": "b", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Returns the greatest common factor of two numbers.", + "fullName": "Greatest common factor (gcf)", + "functionType": "Expression", + "name": "Gcf", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//uses Euclid's algorithm", + "function gcf(a, b) {", + " while (a != b) {", + " if (a > b) {", + " a = a - b;", + " } else {", + " b = b - a;", + " }", + " }", + " return a;", + "}", + "", + "const a = eventsFunctionContext.getArgument(\"a\");", + "const b = eventsFunctionContext.getArgument(\"b\");", + "", + "if (Number.isInteger(a) === false || Number.isInteger(b) === false) {", + " eventsFunctionContext.returnValue = 0;", + "} ", + "else if (a === 0) {", + " eventsFunctionContext.returnValue = b;", + "} ", + "else if (b === 0) {", + " eventsFunctionContext.returnValue = a;", + "} else {", + " eventsFunctionContext.returnValue = gcf(a, b);", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Any integer", + "name": "a", + "type": "expression" + }, + { + "description": "Any integer", + "name": "b", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Returns the lowest common multiple of two numbers.", + "fullName": "Lowest common multiple (lcm)", + "functionType": "Expression", + "name": "Lcm", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "function gcf(a, b) {\r", + " while (a != b) {\r", + " if (a > b) {\r", + " a = a - b;\r", + " } else {\r", + " b = b - a;\r", + " }\r", + " }\r", + " return a;\r", + "}\r", + "\r", + "function lcm(a, b) {\r", + " return Math.abs(a * b) / gcf(a, b);\r", + "}\r", + "\r", + "const a = eventsFunctionContext.getArgument(\"a\");\r", + "const b = eventsFunctionContext.getArgument(\"b\");\r", + "\r", + "if (Number.isInteger(a) === false || Number.isInteger(b) === false) {\r", + " eventsFunctionContext.returnValue = 0;\r", + "} \r", + "else if (a === 0) {\r", + " eventsFunctionContext.returnValue = b;\r", + "} \r", + "else if (b === 0) {\r", + " eventsFunctionContext.returnValue = a;\r", + "} else {\r", + " eventsFunctionContext.returnValue = lcm(a, b);\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Any integer", + "name": "a", + "type": "expression" + }, + { + "description": "Any integer", + "name": "b", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Returns the input multiplied by all the previous whole numbers.", + "fullName": "Factorial", + "functionType": "Expression", + "name": "Factorial", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "function factorial(n) {\r", + " let result = 1;\r", + "\r", + " let i = 1;\r", + " for (i = 1; i <= n; i++) {\r", + " result *= i;\r", + " }\r", + "\r", + " return result;\r", + "}\r", + "\r", + "const n = eventsFunctionContext.getArgument(\"n\");\r", + "\r", + "eventsFunctionContext.returnValue = factorial(n);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Any positive integer", + "name": "n", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Converts a polar coordinate into the Cartesian x value.", + "fullName": "Polar coordinate to Cartesian X value", + "functionType": "Expression", + "name": "PolarToCartesianX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const r = eventsFunctionContext.getArgument(\"r\");", + "const theta = eventsFunctionContext.getArgument(\"theta\");", + "", + "eventsFunctionContext.returnValue = r * Math.cos(theta);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Radius", + "name": "r", + "type": "expression" + }, + { + "description": "Angle or theta in radians", + "name": "theta", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Converts a polar coordinate into the Cartesian y value.", + "fullName": "Polar coordinate to Cartesian Y value", + "functionType": "Expression", + "name": "PolarToCartesianY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const r = eventsFunctionContext.getArgument(\"r\");", + "const theta = eventsFunctionContext.getArgument(\"theta\");", + "", + "eventsFunctionContext.returnValue = r * Math.sin(theta);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Radius ", + "name": "r", + "type": "expression" + }, + { + "description": "Angle or theta in radians", + "name": "theta", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Converts a isometric coordinate into the Cartesian x value.", + "fullName": "Isometric coordinate to Cartesian X value", + "functionType": "Expression", + "name": "IsoToCartesianX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const x = eventsFunctionContext.getArgument(\"x\");", + "const y = eventsFunctionContext.getArgument(\"y\");", + "", + "eventsFunctionContext.returnValue = (2 * y + x) * 0.5;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Position on the x axis", + "name": "x", + "type": "expression" + }, + { + "description": "Position on the y axis", + "name": "y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Converts a isometric coordinate into the Cartesian y value.", + "fullName": "Isometric coordinate to Cartesian Y value", + "functionType": "Expression", + "name": "IisoToCartesianY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const x = eventsFunctionContext.getArgument(\"x\");", + "const y = eventsFunctionContext.getArgument(\"y\");", + "", + "eventsFunctionContext.returnValue = (2 * y - x) * 0.5;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Position on the x axis", + "name": "x", + "type": "expression" + }, + { + "description": "Position on the y axis", + "name": "y", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Returns the golden ratio.", + "fullName": "Golden ratio", + "functionType": "Expression", + "name": "GoldenRatio", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "1.618033988749894" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns Pi (π).", + "fullName": "Pi (π)", + "functionType": "Expression", + "name": "Pi", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.PI;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns half Pi.", + "fullName": "Half Pi", + "functionType": "Expression", + "name": "HalfPi", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.PI / 2;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the natural logarithm of e. (Euler's number).", + "fullName": "Natural logarithm of e", + "functionType": "Expression", + "name": "E", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.E;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the natural logarithm of 2.", + "fullName": "Natural logarithm of 2", + "functionType": "Expression", + "name": "Ln2", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.LN2;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the natural logarithm of 10.", + "fullName": "Natural logarithm of 10", + "functionType": "Expression", + "name": "Ln10", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.LN10;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the base 2 logarithm of e. (Euler's number).", + "fullName": "Base 2 logarithm of e", + "functionType": "Expression", + "name": "Log2e", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.LOG10E;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the base 10 logarithm of e. (Euler's number).", + "fullName": "Base 10 logarithm of e", + "functionType": "Expression", + "name": "Log10e", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.LOG10E;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns square root of 2.", + "fullName": "Square root of 2", + "functionType": "Expression", + "name": "Sqrt2", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.SQRT2;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns square root of 1/2.", + "fullName": "Square root of 1/2", + "functionType": "Expression", + "name": "Sqrt1_2", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.SQRT1_2;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns quarter Pi.", + "fullName": "Quarter Pi", + "functionType": "Expression", + "name": "QuarterPi", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = Math.PI / 4;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Formats a number to use the specified number of decimal places (Deprecated).", + "fullName": "ToFixed", + "functionType": "Expression", + "name": "ToFixed", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = Number(valueToBeRounded.toFixed(numberOfDecimalPlaces));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Formats a number to a string with the specified number of decimal places.", + "fullName": "ToFixed", + "functionType": "StringExpression", + "name": "ToFixedString", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const valueToBeRounded = eventsFunctionContext.getArgument(\"ValueToBeRounded\");", + "const numberOfDecimalPlaces = eventsFunctionContext.getArgument(\"NumberOfDecimalPlaces\");", + "eventsFunctionContext.returnValue = valueToBeRounded.toFixed(numberOfDecimalPlaces);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The value to be rounded", + "name": "ValueToBeRounded", + "type": "expression" + }, + { + "description": "Number of decimal places", + "name": "NumberOfDecimalPlaces", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the number is even (divisible by 2). To check for odd numbers, invert this condition.", + "fullName": "Is even?", + "functionType": "Condition", + "name": "IsEven", + "sentence": "_PARAM1_ is even", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "mod(GetArgumentAsNumber(\"Value\"),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, { "author": "", "category": "User interface", @@ -13905,13 +14824,30 @@ "actions": [ { "type": { - "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" }, "parameters": [ "BoardBubble", "SpeedPathMovement", + "=", "Gutter.GutterBehavior::PushSpeed()", - "-Gutter.GutterBehavior::PushDeceleration()", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Push speed: \" + ToString(Gutter.GutterBehavior::PushSpeed())", + "", "" ] } @@ -17571,7 +18507,7 @@ "BoardBubble", "SpeedPathMovement", "=", - "Gutter.GutterBehavior::BeginningSpeed()", + "Gutter.GutterBehavior::BoostBeginningSpeed()", "" ] } @@ -18315,7 +19251,7 @@ "actions": [ { "type": { - "value": "Smoothy::GutterBehavior::SetPropertyIsBeginningBostEnabled" + "value": "Smoothy::GutterBehavior::SetPropertyIsStartBoostEnabled" }, "parameters": [ "Object", @@ -18908,7 +19844,7 @@ "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::PropertyIsBeginningBostEnabled" + "value": "Smoothy::GutterBehavior::PropertyIsStartBoostEnabled" }, "parameters": [ "Object", @@ -19052,134 +19988,13 @@ "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsNumber(\"Value\")" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Smoothy::GutterBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "the push speed", - "fullName": "Push speed", - "functionType": "ExpressionAndCondition", - "name": "PushSpeed", - "sentence": "the push speed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyNormalSpeed()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Object", - "Behavior", - ">=" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyNormalSpeed()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Object", - "Behavior", - ">=" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyNearDeathSpeed()" - ] - } + "=", + "GetArgumentAsNumber(\"Value\")" ] } ] } ], - "expressionType": { - "type": "expression" - }, "parameters": [ { "description": "Object", @@ -19196,11 +20011,11 @@ "objectGroups": [] }, { - "description": "the push acceleration", - "fullName": "Push acceleration", + "description": "the push speed", + "fullName": "Push speed", "functionType": "ExpressionAndCondition", - "name": "PushAcceleration", - "sentence": "the push acceleration", + "name": "PushSpeed", + "sentence": "the push speed", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -19222,7 +20037,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyAccelerationDuration()" + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), 0, Object.Behavior::PropertyBeginningFillRatio(), Object.Behavior::BoostBeginningSpeed(), Object.Behavior::PropertySafeZoneEndSpeed())" ] } ] @@ -19249,13 +20064,92 @@ "conditions": [ { "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsNearDeath" + "value": "Smoothy::GutterBehavior::PushingQueueProgression" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertySafeZoneEndLengthRatio()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), 0, Object.Behavior::PropertySafeZoneEndLengthRatio(), Object.Behavior::PropertyBeginningSpeed(), Object.Behavior::PropertySafeZoneEndSpeed())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::PushingQueueProgression" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior::PropertySafeZoneEndLengthRatio()", + "" + ] + }, + { + "type": { + "value": "Smoothy::GutterBehavior::PushingQueueProgression" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyNormalZoneEndLengthRatio()", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), Object.Behavior::PropertySafeZoneEndLengthRatio(), Object.Behavior::PropertyNormalZoneEndLengthRatio(), Object.Behavior::PropertySafeZoneEndSpeed(), Object.Behavior::PropertyNormalZoneEndSpeed())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::PushingQueueProgression" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "Object.Behavior::PropertyNormalZoneEndLengthRatio()", + "" + ] + }, + { + "type": { + "value": "Smoothy::GutterBehavior::PushingQueueProgression" }, "parameters": [ "Object", "Behavior", - ">=" + "<", + "Object.Behavior::PropertyNearDeathZoneBeginningLengthRatio()", + "" ] } ], @@ -19265,7 +20159,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyAccelerationDuration()" + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), Object.Behavior::PropertyNormalZoneEndLengthRatio(), Object.Behavior::PropertyNearDeathZoneBeginningLengthRatio(), Object.Behavior::PropertyNormalZoneEndSpeed(), Object.Behavior::PropertyNearDeathZoneBeginningSpeed())" ] } ] @@ -19275,12 +20169,14 @@ "conditions": [ { "type": { - "value": "Smoothy::GutterBehavior::IsNearDeath" + "value": "Smoothy::GutterBehavior::PushingQueueProgression" }, "parameters": [ "Object", "Behavior", - ">=" + ">=", + "Object.Behavior::PropertyNearDeathZoneBeginningLengthRatio()", + "" ] } ], @@ -19290,7 +20186,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Object.Behavior::PropertyNearDeathSpeed() / Object.Behavior::PropertyAccelerationDuration()" + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), Object.Behavior::PropertyNearDeathZoneBeginningLengthRatio(), 1, Object.Behavior::PropertyNearDeathZoneBeginningSpeed(), Object.Behavior::PropertyEndSpeed())" ] } ] @@ -19317,103 +20213,62 @@ "objectGroups": [] }, { - "description": "the push deceleration", - "fullName": "Push deceleration", + "description": "the push acceleration", + "fullName": "Push acceleration", "functionType": "ExpressionAndCondition", - "name": "PushDeceleration", - "sentence": "the push deceleration", + "name": "PushAcceleration", + "sentence": "the push acceleration", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { "value": "SetReturnNumber" }, "parameters": [ - "889" + "Object.Behavior::PushSpeed() / Object.Behavior::PropertyAccelerationDuration()" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Smoothy::GutterBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the push deceleration", + "fullName": "Push deceleration", + "functionType": "ExpressionAndCondition", + "name": "PushDeceleration", + "sentence": "the push deceleration", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Object", - "Behavior", - ">=" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyNearDeathTransitionDuration()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsNearDeath" - }, - "parameters": [ - "Object", - "Behavior", - ">=" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "Object.Behavior::PropertyNormalSpeed() / Object.Behavior::PropertyNearDeathTransitionDuration()" - ] - } + "Object.Behavior::PushSpeed() / Object.Behavior::PropertyAccelerationDuration()" ] } ] @@ -19439,9 +20294,9 @@ }, { "description": "the speed at the beginning of the game.", - "fullName": "Beggining speed", + "fullName": "Boost beggining speed", "functionType": "ExpressionAndCondition", - "name": "BeginningSpeed", + "name": "BoostBeginningSpeed", "sentence": "the beginning speed ", "events": [ { @@ -19453,7 +20308,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "Smoothy::SpeedToReach(Object.Behavior::PropertyBeginningFillRatio() * CurvedMovement::PathLength(Object.Behavior::PathName()), Object.Behavior::PropertyBeginningDeceleration(), Object.Behavior::PropertyNormalSpeed())" + "Smoothy::SpeedToReach(Object.Behavior::PropertyBeginningFillRatio() * CurvedMovement::PathLength(Object.Behavior::PathName()), Object.Behavior::PropertyStartBoostDeceleration(), Object.Behavior::PropertyBeginningSpeed())" ] } ] @@ -19515,100 +20370,142 @@ { "value": "true", "type": "Boolean", - "label": "Beginning boost is enabled", + "label": "Start boost is enabled", "description": "", "group": "", "extraInformation": [], "hidden": true, - "name": "IsBeginningBostEnabled" + "name": "IsStartBoostEnabled" + }, + { + "value": "64", + "type": "Number", + "unit": "PixelSpeed", + "label": "Beginning push speed", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "BeginningSpeed" }, { "value": "17.8", "type": "Number", "unit": "PixelSpeed", - "label": "Near death push speed", + "label": "End push speed", "description": "", "group": "Speed", "extraInformation": [], "hidden": false, - "name": "NearDeathSpeed" + "name": "EndSpeed" }, { - "value": "0.875", + "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Near death length ratio", + "label": "Identifier", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "NearDeathLengthRatio" + "hidden": true, + "name": "Identifier" }, { - "value": "1", + "value": "2", "type": "Number", "unit": "Second", - "label": "Near death transition duration", + "label": "Time to get to full speed", "description": "", "group": "Acceleration", "extraInformation": [], "hidden": false, - "name": "NearDeathTransitionDuration" + "name": "AccelerationDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Dimensionless", + "label": "Beggining fill ratio", + "description": "", + "group": "Start boost", + "extraInformation": [], + "hidden": false, + "name": "BeginningFillRatio" + }, + { + "value": "889", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Start boost deceleration", + "description": "", + "group": "Start boost", + "extraInformation": [], + "hidden": false, + "name": "StartBoostDeceleration" }, { "value": "64", "type": "Number", "unit": "PixelSpeed", - "label": "Normal push speed", + "label": "Safe zone end push speed", "description": "", "group": "Speed", "extraInformation": [], "hidden": false, - "name": "NormalSpeed" + "name": "SafeZoneEndSpeed" }, { "value": "0", "type": "Number", - "unit": "Dimensionless", - "label": "Identifier", + "label": "Safe zone end length ratio", "description": "", - "group": "", + "group": "Speed zone", "extraInformation": [], - "hidden": true, - "name": "Identifier" + "hidden": false, + "name": "SafeZoneEndLengthRatio" }, { - "value": "2", + "value": "64", "type": "Number", - "unit": "Second", - "label": "Time to get to full speed", + "unit": "PixelSpeed", + "label": "Normal zone end push speed", "description": "", - "group": "Acceleration", + "group": "Speed", "extraInformation": [], "hidden": false, - "name": "AccelerationDuration" + "name": "NormalZoneEndSpeed" }, { - "value": "0.5", + "value": "0.87", "type": "Number", - "unit": "Dimensionless", - "label": "Beggining fill ratio", + "label": "Normal zone end length ratio", "description": "", - "group": "Beginning", + "group": "Speed zone", "extraInformation": [], "hidden": false, - "name": "BeginningFillRatio" + "name": "NormalZoneEndLengthRatio" }, { - "value": "889", + "value": "17.8", "type": "Number", - "unit": "PixelAcceleration", - "label": "Beginning deceleration", + "unit": "PixelSpeed", + "label": "Near death zone beginning push speed", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "NearDeathZoneBeginningSpeed" + }, + { + "value": "0.88", + "type": "Number", + "unit": "Dimensionless", + "label": "Near death zone beginning length ratio", "description": "", - "group": "Beginning", + "group": "Speed zone", "extraInformation": [], "hidden": false, - "name": "BeginningDeceleration" + "name": "NearDeathZoneBeginningLengthRatio" } ], "sharedPropertyDescriptors": [] From 7da85dd734c2a57e33f4bc312af6b2f09c772e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 00:49:26 +0200 Subject: [PATCH 099/114] Add properties for the impact speeds. --- examples/smoothy/smoothy.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 4f6c46c8b..502ce418f 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -16188,7 +16188,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "max(-400, -133.3 * GetArgumentAsNumber(\"ComboLevel\"))" + "max(-Object.Behavior::PropertyImpactSpeedMax(), -Object.Behavior:: PropertyImpactSpeedGain() * GetArgumentAsNumber(\"ComboLevel\"))" ] } ] @@ -17724,6 +17724,28 @@ "extraInformation": [], "hidden": false, "name": "HitStopDuration" + }, + { + "value": "133.3", + "type": "Number", + "unit": "PixelSpeed", + "label": "Impact speed gain at each combo level", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ImpactSpeedGain" + }, + { + "value": "400", + "type": "Number", + "unit": "PixelSpeed", + "label": "Impact speed maximum", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ImpactSpeedMax" } ], "sharedPropertyDescriptors": [] From eb92bdb3fac3c07ffc8b3bdf35394e3b0890dce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 13:21:35 +0200 Subject: [PATCH 100/114] Add back the delay after a split. --- examples/smoothy/smoothy.json | 53 +++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 502ce418f..f34817726 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -15616,6 +15616,45 @@ ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"", + "" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -16706,12 +16745,22 @@ "actions": [ { "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailIdle" + "value": "Smoothy::BubbleQueueBehavior::SetPropertyTailState" }, "parameters": [ "Object", "Behavior", - "" + "=", + "\"JustSplit\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" ] } ] From 60493efe3d021a3ae6f9e1fccd5a62c63a381834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 14:34:44 +0200 Subject: [PATCH 101/114] Fix the first rewind. --- examples/smoothy/smoothy.json | 86 ++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index f34817726..70ffb565b 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1047,7 +1047,7 @@ "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior", "ObjectStack": "ObjectStack", - "ColorCount": 4 + "ColorCount": 2 } ], "animations": [ @@ -15599,6 +15599,36 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -15726,7 +15756,7 @@ "Object", "Behavior", "=", - "\"Rewinding\"", + "\"HitStopEndBeforeRewind\"", "" ] } @@ -15766,36 +15796,6 @@ } ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEndBeforeRewind\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -16301,6 +16301,17 @@ "=", "\"AfterImpact\"" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] } ] } @@ -16491,6 +16502,17 @@ "=", "\"AfterImpact\"" ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] } ] } From 7ae41322a2b0578f7ab8ad96543d5ab3c99e1693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 20:12:10 +0200 Subject: [PATCH 102/114] Add a hit-stop at the end of combos. --- examples/smoothy/smoothy.json | 303 ++++++++++++++++------------------ 1 file changed, 143 insertions(+), 160 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 70ffb565b..18dd8d08d 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14999,7 +14999,7 @@ "Object", "Behavior", "=", - "\"HitStop\"" + "\"HitStopBeforeIdle\"" ] } ], @@ -15239,7 +15239,7 @@ "Object", "Behavior", "=", - "\"HitStop\"" + "\"HitStopBeforeRewind\"" ] } ], @@ -15269,7 +15269,7 @@ "Object", "Behavior", "=", - "\"HitStopBeforeRewind\"" + "\"HitStopEndBeforeRewind\"" ] } ], @@ -15282,38 +15282,27 @@ "BoardBubble", "SpeedPathMovement", "=", - "0", + "Object.Behavior::ImpactSpeed(max(1, Object.Behavior::PropertyTailComboLevel() - 1))", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEndBeforeRewind\"" - ] - } ], - "actions": [ + "events": [ { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel())", - "" + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Set speed for the tail for rewind: \" + ToString(Object.Behavior::ImpactSpeed(max(1, Object.Behavior::PropertyTailComboLevel() - 1)))", + "", + "" + ] + } ] } ] @@ -15388,7 +15377,7 @@ "value": "DebuggerTools::ConsoleLog" }, "parameters": [ - "\"Set speed for the tail imact: \" + ToString(Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel()))", + "\"Set speed for the tail impact: \" + ToString(Object.Behavior::ImpactSpeed(Object.Behavior::PropertyTailComboLevel()))", "", "" ] @@ -15709,7 +15698,7 @@ "Object", "Behavior", "=", - "\"HitStop\"", + "\"StopOrTaillingPush\"", "" ] } @@ -15799,6 +15788,17 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + }, { "type": { "value": "CompareObjectTimer" @@ -15807,80 +15807,30 @@ "Object", "\"TimeFromTailImpact\"", ">=", - "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" + "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopBeforeRewindDuration()" ] } ], "actions": [ { "type": { - "value": "RemoveObjectTimer" + "value": "Smoothy::BubbleQueueBehavior::SetTailState" }, "parameters": [ "Object", - "\"TimeFromTailImpact\"" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"", - "" - ] - } + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopBeforeRewind\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEndBeforeRewind\"", - "" - ] - } + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" ] } ] @@ -16007,7 +15957,7 @@ "Object", "Behavior", "=", - "\"HitStop\"", + "\"HitStopBeforeIdle\"", "" ] } @@ -16106,6 +16056,17 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + }, { "type": { "value": "CompareObjectTimer" @@ -16114,11 +16075,23 @@ "Object", "\"TimeFromHeadImpact\"", ">=", - "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopDuration()" + "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopBeforeRewindDuration()" ] } ], "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Rewinding\"", + "" + ] + }, { "type": { "value": "RemoveObjectTimer" @@ -16128,66 +16101,54 @@ "\"TimeFromHeadImpact\"" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeIdle\"" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromHeadImpact\"", + ">=", + "Object.Behavior::PropertyRewindDelay() + Object.Behavior::PropertyHitStopAfterComboDuration()" + ] + } ], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStop\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"StopOrTaillingPush\"", - "" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"StopOrTaillingPush\"", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopBeforeRewind\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"", - "" - ] - } + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromHeadImpact\"" ] } ] @@ -16492,6 +16453,17 @@ "\"Idle\"" ] }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeIdle\"" + ] + }, { "type": { "value": "Smoothy::BubbleQueueBehavior::PropertyHeadState" @@ -17758,7 +17730,7 @@ "unit": "PixelSpeed", "label": "Rewinding maximum speed", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "RewindingSpeedMax" @@ -17769,7 +17741,7 @@ "unit": "PixelAcceleration", "label": "Rewinding acceleration", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "RewindingAcceleration" @@ -17780,7 +17752,7 @@ "unit": "Second", "label": "Rewind delay", "description": "Before the hit-stop", - "group": "", + "group": "Hit-stop", "extraInformation": [], "hidden": false, "name": "RewindDelay" @@ -17789,12 +17761,23 @@ "value": "0.1", "type": "Number", "unit": "Second", - "label": "Hit-stop duration", - "description": "Before rewinding", - "group": "", + "label": "Hit-stop duration before rewinding", + "description": "", + "group": "Hit-stop", + "extraInformation": [], + "hidden": false, + "name": "HitStopBeforeRewindDuration" + }, + { + "value": "0.4", + "type": "Number", + "unit": "Second", + "label": "Hit-stop at the end of a combo", + "description": "", + "group": "Hit-stop", "extraInformation": [], "hidden": false, - "name": "HitStopDuration" + "name": "HitStopAfterComboDuration" }, { "value": "133.3", @@ -17802,7 +17785,7 @@ "unit": "PixelSpeed", "label": "Impact speed gain at each combo level", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "ImpactSpeedGain" @@ -17813,7 +17796,7 @@ "unit": "PixelSpeed", "label": "Impact speed maximum", "description": "", - "group": "", + "group": "Speed", "extraInformation": [], "hidden": false, "name": "ImpactSpeedMax" From 4bbbad7c83cbe09b179c35b8a513bff039c55367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 20:32:12 +0200 Subject: [PATCH 103/114] Faster push acceleration. --- examples/smoothy/smoothy.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 18dd8d08d..d51e156c0 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2259,7 +2259,8 @@ "type": "Smoothy::GutterBehavior", "ObjectStack": "ObjectStack", "FirstQueueHeadPosition": 0, - "NearDeathLengthRatio": 0.75 + "NearDeathLengthRatio": 0.75, + "AccelerationDuration": 1 }, { "name": "ObjectStack", @@ -16138,7 +16139,7 @@ "Object", "Behavior", "=", - "\"StopOrTaillingPush\"", + "\"Idle\"", "" ] }, From b6ba8b3634d8dd029903930ea9c6f0d7a463feb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 21:02:32 +0200 Subject: [PATCH 104/114] Fix the first delay before rewinding. --- examples/smoothy/smoothy.json | 275 +++++++++++++++------------------- 1 file changed, 121 insertions(+), 154 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index d51e156c0..6bbbb42d4 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -2315,7 +2315,9 @@ "HeadState": "Idle", "TailComboLevel": 0, "HeadComboLevel": 0, - "HitStopDuration": 0.1 + "HitStopDuration": 0.1, + "RewindDelay": 0.3, + "HitStopAfterComboDuration": 0.3 }, { "name": "ObjectStack", @@ -15718,68 +15720,30 @@ "=", "\"WillMagnet\"" ] - } - ], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "<=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEndBeforeRewind\"", - "" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "1" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopBeforeRewind\"", - "" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"", + "" ] } ] @@ -15789,17 +15753,6 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopBeforeRewind\"" - ] - }, { "type": { "value": "CompareObjectTimer" @@ -15812,26 +15765,98 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopEndBeforeRewind\"", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"", + "" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"TimeFromTailImpact\"" + ] + } ] }, { - "type": { - "value": "RemoveObjectTimer" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "Object", - "\"TimeFromTailImpact\"" + "comment": "There is no hit-stop before the first rewinding but the total delay is still the same." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" + ] + }, + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailComboLevel" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopEndBeforeRewind\"", + "" + ] + } ] } ] @@ -15979,75 +16004,17 @@ ] } ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Rewinding\"", - "" - ] - }, - { - "type": { - "value": "RemoveObjectTimer" - }, - "parameters": [ - "Object", - "\"TimeFromHeadImpact\"" - ] - } - ] - }, + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyHeadComboLevel" - }, - "parameters": [ - "Object", - "Behavior", - ">", - "0" - ] - } - ], - "actions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::SetHeadState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"HitStopBeforeRewind\"", - "" - ] - } + "type": { + "value": "Smoothy::BubbleQueueBehavior::SetHeadState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"HitStopBeforeRewind\"", + "" ] } ] From 40d4b36d7f05b143573c71e2a2c82039e55f82a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 2 Jul 2023 21:14:07 +0200 Subject: [PATCH 105/114] Add a deceleration on the split queue. --- examples/smoothy/smoothy.json | 62 ++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 6bbbb42d4..a662c02b5 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -15165,42 +15165,52 @@ "comment": "Keep the same speed." }, { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Or" + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"JustSplit\"" - ] - }, - { - "type": { - "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"WillMagnet\"" - ] - } + "parameters": [ + "Object", + "Behavior", + "=", + "\"WillMagnet\"" ] } ], "actions": [] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Smoothy::BubbleQueueBehavior::PropertyTailState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"JustSplit\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "CurvedMovement::SpeedPathMovement::AccelarateAt" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "0", + "-Gutter.GutterBehavior::PushAcceleration()", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ From 24cf59b5ccf7391fa0082904866129d762c24bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Wed, 5 Jul 2023 12:33:43 +0200 Subject: [PATCH 106/114] Add back 4 colors by default. --- examples/smoothy/smoothy.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a662c02b5..0770555f5 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -613,6 +613,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BoardBubble", "tags": "", @@ -1005,6 +1006,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Spawner", "tags": "", @@ -1047,7 +1049,7 @@ "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior", "ObjectStack": "ObjectStack", - "ColorCount": 2 + "ColorCount": 4 } ], "animations": [ @@ -1199,6 +1201,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "AimingBubble", "tags": "", @@ -1392,6 +1395,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "MovingBubble", "tags": "", @@ -1759,6 +1763,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "InsertedBubble", "tags": "", @@ -1977,6 +1982,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "PreviewBubble", "tags": "", @@ -2205,6 +2211,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Launcher", "tags": "", @@ -2246,6 +2253,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Gutter", "tags": "", @@ -2300,6 +2308,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BubbleQueue", "tags": "", @@ -2382,6 +2391,7 @@ "antialiasing": "none" }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "BubbleClipboard", "tags": "", @@ -2519,6 +2529,7 @@ } }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Hole", "tags": "", @@ -4042,6 +4053,7 @@ ], "objects": [ { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Level", "tags": "", @@ -4102,6 +4114,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Launcher", "tags": "", @@ -4168,6 +4181,7 @@ "antialiasing": "none" }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "StartLocation", "tags": "", @@ -4352,6 +4366,7 @@ ] }, { + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Hole", "tags": "", From f0241326e4eff367a24874dd6658ee53af609a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 8 Jul 2023 19:43:19 +0200 Subject: [PATCH 107/114] Avoid the boost to go back to full speed after a match. --- examples/smoothy/smoothy.json | 129 ++++++++++++++++++---------------- 1 file changed, 69 insertions(+), 60 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 0770555f5..ce57eee38 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1049,7 +1049,7 @@ "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior", "ObjectStack": "ObjectStack", - "ColorCount": 4 + "ColorCount": 2 } ], "animations": [ @@ -2740,6 +2740,24 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Launcher", + "=", + "50", + "=", + "150" + ] + } + ] } ], "parameters": [] @@ -18550,66 +18568,17 @@ "+", "1" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Gutter.GutterBehavior::BoostBeginningSpeed()", - "" - ] - } - ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "Smoothy::GutterBehavior::IsBeginningBostEnabled" - }, - "parameters": [ - "Gutter", - "GutterBehavior", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CurvedMovement::SpeedPathMovement::SetSpeed" - }, - "parameters": [ - "BoardBubble", - "SpeedPathMovement", - "=", - "Gutter.GutterBehavior::PushSpeed()", - "" - ] - } + "type": { + "value": "CurvedMovement::SpeedPathMovement::SetSpeed" + }, + "parameters": [ + "BoardBubble", + "SpeedPathMovement", + "=", + "Gutter.GutterBehavior::PushSpeed()", + "" ] } ] @@ -19329,6 +19298,35 @@ ] } ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The PushingQueueProgression property is used to calculate the initial boost speed.\nThis is to make sure the boost doesn't start back to full speed when a match happens during the boost." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Smoothy::GutterBehavior::SetPropertyPushingQueueFarestProgression" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(Object.Behavior::PropertyPushingQueueFarestProgression(), Object.Behavior::PropertyPushingQueueProgression())" + ] + } + ] } ], "parameters": [ @@ -20106,7 +20104,7 @@ "value": "SetReturnNumber" }, "parameters": [ - "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueProgression(), 0, Object.Behavior::PropertyBeginningFillRatio(), Object.Behavior::BoostBeginningSpeed(), Object.Behavior::PropertySafeZoneEndSpeed())" + "ExtendedMath::Map(Object.Behavior::PropertyPushingQueueFarestProgression(), 0, Object.Behavior::PropertyBeginningFillRatio(), Object.Behavior::BoostBeginningSpeed(), Object.Behavior::PropertySafeZoneEndSpeed())" ] } ] @@ -20575,6 +20573,17 @@ "extraInformation": [], "hidden": false, "name": "NearDeathZoneBeginningLengthRatio" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PushingQueueFarestProgression" } ], "sharedPropertyDescriptors": [] From 2b9b7bb162c3fc0d317af75958237e7e396b94be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 12:13:14 +0200 Subject: [PATCH 108/114] Fix the queue collision check when a queue is empty. --- examples/smoothy/smoothy.json | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index ce57eee38..acbe84bca 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -1049,7 +1049,7 @@ "name": "SpwanerBehavior", "type": "Smoothy::SpwanerBehavior", "ObjectStack": "ObjectStack", - "ColorCount": 2 + "ColorCount": 4 } ], "animations": [ @@ -2742,6 +2742,7 @@ ] }, { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -12545,7 +12546,23 @@ "textG": 0, "textR": 0 }, - "comment": "firstBubblePathPosition variable is only used locally to this condition." + "comment": "firstBubblePathPosition variable is only used locally to this condition.\n\nIt's set to 0 in case the queue is empty. It can happens for the queue at the beginning of the path because it's never deleted as bubble are spawned inside it." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "firstBubblePathPosition", + "=", + "0" + ] + } + ] }, { "type": "BuiltinCommonInstructions::Standard", @@ -14686,7 +14703,6 @@ "actions": [], "events": [ { - "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From 4d9d14ee7d072c265cc63d9f8ce3a2e00e8b5809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 12:18:22 +0200 Subject: [PATCH 109/114] Disable debugging logs. --- examples/smoothy/smoothy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index acbe84bca..45d1ccfdc 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -14703,6 +14703,7 @@ "actions": [], "events": [ { + "disabled": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ From c14c63508e8c9e64bda28e35a24aaae44ed97f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 12:43:48 +0200 Subject: [PATCH 110/114] Update the FSM comment. --- examples/smoothy/smoothy.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 45d1ccfdc..3dbd0b8d4 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -4033,7 +4033,7 @@ "name": "Level", "persistentUuid": "3f55e0f1-f0b3-4abb-8e43-3dc482f80577", "width": 0, - "x": 95, + "x": 285, "y": 265, "zOrder": 1, "numberProperties": [], @@ -15571,7 +15571,7 @@ "textG": 0, "textR": 0 }, - "comment": "Bubble queues have 2 finite state machines:\n- one for the queue tail\n- one for the queue head\n\nAs stated in the SetBubbleSpeed action, the tail state has precedence over the head state to choose the speed.\n\nThe states are the following:\n- Idle, there is no combo animation\n- JustSplit, the queue was split and the magnet check is not yet done or color don't match.\n- WillMagnet, the queues are matching but they keep their current speed during a small delay.\n- HitStop, the queues are stopping for a small amount of time to put emphasis to the animation.\n- HitStopEnd, the end of the hit stop. The tailing queue start back at the previous impact speed.\n- Rewinding, the leading queue is going backward until it reaches its tailing queue.\n- RewindImpact, the queues are colliding, when combo are chained the tailing queue is given more and more speed at the impact.\n- StopOrTaillingPush, change the speed before going back to the idle state." + "comment": "Bubble queues have 2 finite state machines:\n- one for the queue tail\n- one for the queue head\n\nAs stated in the SetBubbleSpeed action, the tail state has precedence over the head state to choose the speed.\n\nThe states are the following:\n- Idle, there is no combo animation\n- JustSplit, the queue was split and the magnet check is not yet done or color don't match.\n- WillMagnet, the queues are matching but they keep their current speed during a small delay.\n- HitStopBeforeIdle, at the end of a combo, the queues are stopping for a small amount of time to put emphasis to the animation before starting back to push.\n- HitStopBeforeRewind, the queues are stopping for a small amount of time to put emphasis to the animation.\n- HitStopEndBeforeRewind, the end of the hit stop. The tailing queue start back at the previous impact speed.\n- Rewinding, the leading queue is going backward until it reaches its tailing queue.\n- RewindImpact, the queues are colliding, when combo are chained the tailing queue is given more and more speed at the impact.\n- StopOrTaillingPush, change the speed before going back to the idle state." }, { "colorB": 228, @@ -20381,6 +20381,7 @@ "fullName": "Boost beggining speed", "functionType": "ExpressionAndCondition", "name": "BoostBeginningSpeed", + "private": true, "sentence": "the beginning speed ", "events": [ { From 0d2c2e6e5d43ef1da55d10cb02408ed06938c873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 12:53:14 +0200 Subject: [PATCH 111/114] Squash some events. --- examples/smoothy/smoothy.json | 68 ++++++++++++----------------------- 1 file changed, 23 insertions(+), 45 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 3dbd0b8d4..0a5983181 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3367,24 +3367,19 @@ "type": "BuiltinCommonInstructions::ForEach", "object": "Gutter", "conditions": [], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "queueIndex", - "=", - "Gutter.ObjectStack::Height() - 1" - ] - } + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "queueIndex", + "=", + "Gutter.ObjectStack::Height() - 1" ] - }, + } + ], + "events": [ { "infiniteLoopWarning": true, "type": "BuiltinCommonInstructions::While", @@ -3424,23 +3419,18 @@ ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "areBubblesMatched", - "" - ] - } + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "areBubblesMatched", + "" ] - }, + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3635,13 +3625,7 @@ "SpeedPathMovement", "" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { "value": "Smoothy::BubbleQueueBehavior::SetBubblesSpeed" @@ -3684,13 +3668,7 @@ "=", "VariableString(Score)" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + }, { "type": { "value": "ModVarScene" From aeb032219f48b10ee4ebe5860b8b54fdf360b7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 19:16:41 +0200 Subject: [PATCH 112/114] Credit Metatempo. --- examples/smoothy/smoothy.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 0a5983181..5aa940d2a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -80,9 +80,13 @@ "showWatermark": true }, "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "1thy3mefIBWCy8u4h1ApC1PTF4F2" + ], + "authorUsernames": [ + "D8H", + "Metatempo" ], - "authorUsernames": [], "categories": [ "action", "puzzle" From 033c38c2db5a70f3a55514df10faf5af0da05699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sun, 9 Jul 2023 20:05:52 +0200 Subject: [PATCH 113/114] Add a todo about game over. --- examples/smoothy/smoothy.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index 5aa940d2a..a86b89f8a 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -3698,6 +3698,18 @@ ], "parameters": [] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Wait combo end before checking game over conditions." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ From 713522de9dd46e57d8ecf656a7bbd0e7667e2cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Fri, 14 Jul 2023 12:58:22 +0200 Subject: [PATCH 114/114] Increment extensions. --- examples/smoothy/smoothy.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/smoothy/smoothy.json b/examples/smoothy/smoothy.json index a86b89f8a..e4f5e7299 100644 --- a/examples/smoothy/smoothy.json +++ b/examples/smoothy/smoothy.json @@ -5795,7 +5795,7 @@ ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ], "expressionType": { @@ -9276,7 +9276,7 @@ ], "parameterObjects": "", "useStrict": false, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ], "expressionType": { @@ -20751,7 +20751,7 @@ "name": "ObjectStack", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_cards_game_solitaire_poker_blackjack_casino.svg", "shortDescription": "An ordered list of objects and a shuffle action.", - "version": "0.0.8", + "version": "0.1.0", "description": [ "It provides:", "* Actions to modify a stack of objects", @@ -21794,7 +21794,7 @@ "name": "CurvedMovement", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_bezier_curve.svg", "shortDescription": "Move objects on curved paths.", - "version": "1.0.3", + "version": "1.0.4", "description": [ "This extension allows to move objects on Bézier curve paths.", "- Paths can be built dynamically or from predetermined paths in SVG format.",