diff --git a/examples/ghost-racer/README.md b/examples/ghost-racer/README.md new file mode 100644 index 000000000..3f6df56d5 --- /dev/null +++ b/examples/ghost-racer/README.md @@ -0,0 +1,22 @@ +"Ghost Racer" is similar to a 2D Fall Guys game, with a completely rewritten RecordMovements extension that allows asynchronous multiplayer gameplay. This means you can play against the saved movements of yourself or others (powered by Google Firebase Firestore Database). + +When setting up Firebase, protect your data by only allowing users to add new documents. + +rules_version = '2'; +service cloud.firestore { + match /databases/{database}/documents { + + // Match any document in the database + match /{document=**} { + + // Allow all users to read any document + allow read: if true; + + // Allow all users (including unauthenticated) to create new documents + allow create: if true; + + // Disallow any user from updating or deleting documents + allow update, delete: if false; + } + } +} diff --git a/examples/ghost-racer/assets/A Button.png b/examples/ghost-racer/assets/A Button.png new file mode 100644 index 000000000..27dd79350 Binary files /dev/null and b/examples/ghost-racer/assets/A Button.png differ diff --git a/examples/ghost-racer/assets/ArchitectsDaughter.ttf b/examples/ghost-racer/assets/ArchitectsDaughter.ttf new file mode 100644 index 000000000..f4469b701 Binary files /dev/null and b/examples/ghost-racer/assets/ArchitectsDaughter.ttf differ diff --git a/examples/ghost-racer/assets/Black Decorated Button_Hovered.png b/examples/ghost-racer/assets/Black Decorated Button_Hovered.png new file mode 100644 index 000000000..d6888f614 Binary files /dev/null and b/examples/ghost-racer/assets/Black Decorated Button_Hovered.png differ diff --git a/examples/ghost-racer/assets/Black Decorated Button_Idle.png b/examples/ghost-racer/assets/Black Decorated Button_Idle.png new file mode 100644 index 000000000..c71d60a08 Binary files /dev/null and b/examples/ghost-racer/assets/Black Decorated Button_Idle.png differ diff --git a/examples/ghost-racer/assets/Black Decorated Button_Pressed.png b/examples/ghost-racer/assets/Black Decorated Button_Pressed.png new file mode 100644 index 000000000..913f532c4 Binary files /dev/null and b/examples/ghost-racer/assets/Black Decorated Button_Pressed.png differ diff --git a/examples/ghost-racer/assets/Black Square Decorated Button_Hovered.png b/examples/ghost-racer/assets/Black Square Decorated Button_Hovered.png new file mode 100644 index 000000000..2b2fe1e7b Binary files /dev/null and b/examples/ghost-racer/assets/Black Square Decorated Button_Hovered.png differ diff --git a/examples/ghost-racer/assets/Black Square Decorated Button_Idle.png b/examples/ghost-racer/assets/Black Square Decorated Button_Idle.png new file mode 100644 index 000000000..7057cb0ce Binary files /dev/null and b/examples/ghost-racer/assets/Black Square Decorated Button_Idle.png differ diff --git a/examples/ghost-racer/assets/Black Square Decorated Button_Pressed.png b/examples/ghost-racer/assets/Black Square Decorated Button_Pressed.png new file mode 100644 index 000000000..16875032a Binary files /dev/null and b/examples/ghost-racer/assets/Black Square Decorated Button_Pressed.png differ diff --git a/examples/ghost-racer/assets/Blue Button With Shadow_Hovered.png b/examples/ghost-racer/assets/Blue Button With Shadow_Hovered.png new file mode 100644 index 000000000..44852ada8 Binary files /dev/null and b/examples/ghost-racer/assets/Blue Button With Shadow_Hovered.png differ diff --git a/examples/ghost-racer/assets/Blue Button With Shadow_Idle.png b/examples/ghost-racer/assets/Blue Button With Shadow_Idle.png new file mode 100644 index 000000000..268cefb05 Binary files /dev/null and b/examples/ghost-racer/assets/Blue Button With Shadow_Idle.png differ diff --git a/examples/ghost-racer/assets/Blue Button With Shadow_Pressed.png b/examples/ghost-racer/assets/Blue Button With Shadow_Pressed.png new file mode 100644 index 000000000..5cf947c4e Binary files /dev/null and b/examples/ghost-racer/assets/Blue Button With Shadow_Pressed.png differ diff --git a/examples/ghost-racer/assets/CantoraOne-Regular.ttf b/examples/ghost-racer/assets/CantoraOne-Regular.ttf new file mode 100644 index 000000000..57446a27a Binary files /dev/null and b/examples/ghost-racer/assets/CantoraOne-Regular.ttf differ diff --git a/examples/ghost-racer/assets/Close button.png b/examples/ghost-racer/assets/Close button.png new file mode 100644 index 000000000..d58842d64 Binary files /dev/null and b/examples/ghost-racer/assets/Close button.png differ diff --git a/examples/ghost-racer/assets/GDevelop G logo white.png b/examples/ghost-racer/assets/GDevelop G logo white.png new file mode 100644 index 000000000..34d045e6f Binary files /dev/null and b/examples/ghost-racer/assets/GDevelop G logo white.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_1.png b/examples/ghost-racer/assets/GreenHero_Climb_1.png new file mode 100644 index 000000000..2f0f1e9aa Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_10.png b/examples/ghost-racer/assets/GreenHero_Climb_10.png new file mode 100644 index 000000000..c1a2e0376 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_11.png b/examples/ghost-racer/assets/GreenHero_Climb_11.png new file mode 100644 index 000000000..316376556 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_12.png b/examples/ghost-racer/assets/GreenHero_Climb_12.png new file mode 100644 index 000000000..316376556 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_13.png b/examples/ghost-racer/assets/GreenHero_Climb_13.png new file mode 100644 index 000000000..e4fe35b86 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_14.png b/examples/ghost-racer/assets/GreenHero_Climb_14.png new file mode 100644 index 000000000..e4fe35b86 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_14.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_15.png b/examples/ghost-racer/assets/GreenHero_Climb_15.png new file mode 100644 index 000000000..8873e4012 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_15.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_16.png b/examples/ghost-racer/assets/GreenHero_Climb_16.png new file mode 100644 index 000000000..8873e4012 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_16.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_2.png b/examples/ghost-racer/assets/GreenHero_Climb_2.png new file mode 100644 index 000000000..2f0f1e9aa Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_3.png b/examples/ghost-racer/assets/GreenHero_Climb_3.png new file mode 100644 index 000000000..8873e4012 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_4.png b/examples/ghost-racer/assets/GreenHero_Climb_4.png new file mode 100644 index 000000000..8873e4012 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_5.png b/examples/ghost-racer/assets/GreenHero_Climb_5.png new file mode 100644 index 000000000..e4fe35b86 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_6.png b/examples/ghost-racer/assets/GreenHero_Climb_6.png new file mode 100644 index 000000000..e4fe35b86 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_7.png b/examples/ghost-racer/assets/GreenHero_Climb_7.png new file mode 100644 index 000000000..316376556 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_8.png b/examples/ghost-racer/assets/GreenHero_Climb_8.png new file mode 100644 index 000000000..316376556 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Climb_9.png b/examples/ghost-racer/assets/GreenHero_Climb_9.png new file mode 100644 index 000000000..c1a2e0376 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Climb_9.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_1.png b/examples/ghost-racer/assets/GreenHero_Fire_1.png new file mode 100644 index 000000000..7f75b3476 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_10.png b/examples/ghost-racer/assets/GreenHero_Fire_10.png new file mode 100644 index 000000000..99a46d2f3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_11.png b/examples/ghost-racer/assets/GreenHero_Fire_11.png new file mode 100644 index 000000000..e9e7409c3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_12.png b/examples/ghost-racer/assets/GreenHero_Fire_12.png new file mode 100644 index 000000000..09940e39b Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_13.png b/examples/ghost-racer/assets/GreenHero_Fire_13.png new file mode 100644 index 000000000..28e98fb2c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_14.png b/examples/ghost-racer/assets/GreenHero_Fire_14.png new file mode 100644 index 000000000..28e98fb2c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_14.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_15.png b/examples/ghost-racer/assets/GreenHero_Fire_15.png new file mode 100644 index 000000000..1d86301b5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_15.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_16.png b/examples/ghost-racer/assets/GreenHero_Fire_16.png new file mode 100644 index 000000000..1d86301b5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_16.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_17.png b/examples/ghost-racer/assets/GreenHero_Fire_17.png new file mode 100644 index 000000000..a6f2cd64c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_17.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_18.png b/examples/ghost-racer/assets/GreenHero_Fire_18.png new file mode 100644 index 000000000..a6f2cd64c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_18.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_19.png b/examples/ghost-racer/assets/GreenHero_Fire_19.png new file mode 100644 index 000000000..44a2e9f6b Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_19.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_2.png b/examples/ghost-racer/assets/GreenHero_Fire_2.png new file mode 100644 index 000000000..9b6b490fc Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_20.png b/examples/ghost-racer/assets/GreenHero_Fire_20.png new file mode 100644 index 000000000..44a2e9f6b Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_20.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_3.png b/examples/ghost-racer/assets/GreenHero_Fire_3.png new file mode 100644 index 000000000..dd742fc78 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_4.png b/examples/ghost-racer/assets/GreenHero_Fire_4.png new file mode 100644 index 000000000..a25d13f02 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_5.png b/examples/ghost-racer/assets/GreenHero_Fire_5.png new file mode 100644 index 000000000..c6f991ea2 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_6.png b/examples/ghost-racer/assets/GreenHero_Fire_6.png new file mode 100644 index 000000000..52a4b8a73 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_7.png b/examples/ghost-racer/assets/GreenHero_Fire_7.png new file mode 100644 index 000000000..dac9338a2 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_8.png b/examples/ghost-racer/assets/GreenHero_Fire_8.png new file mode 100644 index 000000000..e3a685db1 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Fire_9.png b/examples/ghost-racer/assets/GreenHero_Fire_9.png new file mode 100644 index 000000000..99a46d2f3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Fire_9.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_1.png b/examples/ghost-racer/assets/GreenHero_Idle_1.png new file mode 100644 index 000000000..01fa1be19 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_10.png b/examples/ghost-racer/assets/GreenHero_Idle_10.png new file mode 100644 index 000000000..e89287f43 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_11.png b/examples/ghost-racer/assets/GreenHero_Idle_11.png new file mode 100644 index 000000000..4ccc010f3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_12.png b/examples/ghost-racer/assets/GreenHero_Idle_12.png new file mode 100644 index 000000000..4ccc010f3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_13.png b/examples/ghost-racer/assets/GreenHero_Idle_13.png new file mode 100644 index 000000000..6a6514f34 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_14.png b/examples/ghost-racer/assets/GreenHero_Idle_14.png new file mode 100644 index 000000000..6a6514f34 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_14.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_15.png b/examples/ghost-racer/assets/GreenHero_Idle_15.png new file mode 100644 index 000000000..60f4fe985 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_15.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_16.png b/examples/ghost-racer/assets/GreenHero_Idle_16.png new file mode 100644 index 000000000..60f4fe985 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_16.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_17.png b/examples/ghost-racer/assets/GreenHero_Idle_17.png new file mode 100644 index 000000000..60f4fe985 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_17.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_18.png b/examples/ghost-racer/assets/GreenHero_Idle_18.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_18.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_19.png b/examples/ghost-racer/assets/GreenHero_Idle_19.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_19.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_2.png b/examples/ghost-racer/assets/GreenHero_Idle_2.png new file mode 100644 index 000000000..01fa1be19 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_20.png b/examples/ghost-racer/assets/GreenHero_Idle_20.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_20.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_3.png b/examples/ghost-racer/assets/GreenHero_Idle_3.png new file mode 100644 index 000000000..01fa1be19 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_4.png b/examples/ghost-racer/assets/GreenHero_Idle_4.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_5.png b/examples/ghost-racer/assets/GreenHero_Idle_5.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_6.png b/examples/ghost-racer/assets/GreenHero_Idle_6.png new file mode 100644 index 000000000..ab70d204c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_7.png b/examples/ghost-racer/assets/GreenHero_Idle_7.png new file mode 100644 index 000000000..cfe86bc10 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_8.png b/examples/ghost-racer/assets/GreenHero_Idle_8.png new file mode 100644 index 000000000..cfe86bc10 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Idle_9.png b/examples/ghost-racer/assets/GreenHero_Idle_9.png new file mode 100644 index 000000000..e89287f43 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Idle_9.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_1.png b/examples/ghost-racer/assets/GreenHero_Jump_1.png new file mode 100644 index 000000000..97bfbb278 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_10.png b/examples/ghost-racer/assets/GreenHero_Jump_10.png new file mode 100644 index 000000000..18c49c38b Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_11.png b/examples/ghost-racer/assets/GreenHero_Jump_11.png new file mode 100644 index 000000000..602b8d310 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_12.png b/examples/ghost-racer/assets/GreenHero_Jump_12.png new file mode 100644 index 000000000..602b8d310 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_13.png b/examples/ghost-racer/assets/GreenHero_Jump_13.png new file mode 100644 index 000000000..c0845e474 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_14.png b/examples/ghost-racer/assets/GreenHero_Jump_14.png new file mode 100644 index 000000000..c0845e474 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_14.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_15.png b/examples/ghost-racer/assets/GreenHero_Jump_15.png new file mode 100644 index 000000000..c0845e474 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_15.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_16.png b/examples/ghost-racer/assets/GreenHero_Jump_16.png new file mode 100644 index 000000000..c0845e474 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_16.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_17.png b/examples/ghost-racer/assets/GreenHero_Jump_17.png new file mode 100644 index 000000000..c0845e474 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_17.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_2.png b/examples/ghost-racer/assets/GreenHero_Jump_2.png new file mode 100644 index 000000000..97bfbb278 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_3.png b/examples/ghost-racer/assets/GreenHero_Jump_3.png new file mode 100644 index 000000000..05aba1e33 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_4.png b/examples/ghost-racer/assets/GreenHero_Jump_4.png new file mode 100644 index 000000000..05aba1e33 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_5.png b/examples/ghost-racer/assets/GreenHero_Jump_5.png new file mode 100644 index 000000000..6f5dc8a63 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_6.png b/examples/ghost-racer/assets/GreenHero_Jump_6.png new file mode 100644 index 000000000..6f5dc8a63 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_7.png b/examples/ghost-racer/assets/GreenHero_Jump_7.png new file mode 100644 index 000000000..e8a9c66f4 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_8.png b/examples/ghost-racer/assets/GreenHero_Jump_8.png new file mode 100644 index 000000000..1214624fa Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Jump_9.png b/examples/ghost-racer/assets/GreenHero_Jump_9.png new file mode 100644 index 000000000..18c49c38b Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Jump_9.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Pose1.png b/examples/ghost-racer/assets/GreenHero_Pose1.png new file mode 100644 index 000000000..29eb95496 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Pose1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Pose2.png b/examples/ghost-racer/assets/GreenHero_Pose2.png new file mode 100644 index 000000000..4ccc010f3 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Pose2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_1.png b/examples/ghost-racer/assets/GreenHero_Punch_1.png new file mode 100644 index 000000000..54c4c6134 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_10.png b/examples/ghost-racer/assets/GreenHero_Punch_10.png new file mode 100644 index 000000000..701ef4009 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_11.png b/examples/ghost-racer/assets/GreenHero_Punch_11.png new file mode 100644 index 000000000..701ef4009 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_12.png b/examples/ghost-racer/assets/GreenHero_Punch_12.png new file mode 100644 index 000000000..701ef4009 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_13.png b/examples/ghost-racer/assets/GreenHero_Punch_13.png new file mode 100644 index 000000000..701ef4009 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_2.png b/examples/ghost-racer/assets/GreenHero_Punch_2.png new file mode 100644 index 000000000..0f4d0855c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_3.png b/examples/ghost-racer/assets/GreenHero_Punch_3.png new file mode 100644 index 000000000..0f4d0855c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_4.png b/examples/ghost-racer/assets/GreenHero_Punch_4.png new file mode 100644 index 000000000..29eb95496 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_5.png b/examples/ghost-racer/assets/GreenHero_Punch_5.png new file mode 100644 index 000000000..29eb95496 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_6.png b/examples/ghost-racer/assets/GreenHero_Punch_6.png new file mode 100644 index 000000000..29eb95496 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_7.png b/examples/ghost-racer/assets/GreenHero_Punch_7.png new file mode 100644 index 000000000..3bbaf1c4c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_8.png b/examples/ghost-racer/assets/GreenHero_Punch_8.png new file mode 100644 index 000000000..3bbaf1c4c Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Punch_9.png b/examples/ghost-racer/assets/GreenHero_Punch_9.png new file mode 100644 index 000000000..c92aa0970 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Punch_9.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_1.png b/examples/ghost-racer/assets/GreenHero_Run_1.png new file mode 100644 index 000000000..16e2517c5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_1.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_10.png b/examples/ghost-racer/assets/GreenHero_Run_10.png new file mode 100644 index 000000000..9e5a1cae5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_10.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_11.png b/examples/ghost-racer/assets/GreenHero_Run_11.png new file mode 100644 index 000000000..41bc9d2c5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_11.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_12.png b/examples/ghost-racer/assets/GreenHero_Run_12.png new file mode 100644 index 000000000..41bc9d2c5 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_12.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_13.png b/examples/ghost-racer/assets/GreenHero_Run_13.png new file mode 100644 index 000000000..1d3dae3c8 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_13.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_14.png b/examples/ghost-racer/assets/GreenHero_Run_14.png new file mode 100644 index 000000000..1d3dae3c8 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_14.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_2.png b/examples/ghost-racer/assets/GreenHero_Run_2.png new file mode 100644 index 000000000..a02401240 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_2.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_3.png b/examples/ghost-racer/assets/GreenHero_Run_3.png new file mode 100644 index 000000000..0380bb26f Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_3.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_4.png b/examples/ghost-racer/assets/GreenHero_Run_4.png new file mode 100644 index 000000000..be352f133 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_4.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_5.png b/examples/ghost-racer/assets/GreenHero_Run_5.png new file mode 100644 index 000000000..7d4031578 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_5.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_6.png b/examples/ghost-racer/assets/GreenHero_Run_6.png new file mode 100644 index 000000000..7d4031578 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_6.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_7.png b/examples/ghost-racer/assets/GreenHero_Run_7.png new file mode 100644 index 000000000..05a0fe7b7 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_7.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_8.png b/examples/ghost-racer/assets/GreenHero_Run_8.png new file mode 100644 index 000000000..e5b4fb9da Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_8.png differ diff --git a/examples/ghost-racer/assets/GreenHero_Run_9.png b/examples/ghost-racer/assets/GreenHero_Run_9.png new file mode 100644 index 000000000..02abd2e96 Binary files /dev/null and b/examples/ghost-racer/assets/GreenHero_Run_9.png differ diff --git a/examples/ghost-racer/assets/MPLUS1p-Regular.ttf b/examples/ghost-racer/assets/MPLUS1p-Regular.ttf new file mode 100644 index 000000000..85827c568 Binary files /dev/null and b/examples/ghost-racer/assets/MPLUS1p-Regular.ttf differ diff --git a/examples/ghost-racer/assets/Minus Key.png b/examples/ghost-racer/assets/Minus Key.png new file mode 100644 index 000000000..88515596b Binary files /dev/null and b/examples/ghost-racer/assets/Minus Key.png differ diff --git a/examples/ghost-racer/assets/Minus Key2.png b/examples/ghost-racer/assets/Minus Key2.png new file mode 100644 index 000000000..f370b5f5d Binary files /dev/null and b/examples/ghost-racer/assets/Minus Key2.png differ diff --git a/examples/ghost-racer/assets/New image.png b/examples/ghost-racer/assets/New image.png new file mode 100644 index 000000000..0e04f51f7 Binary files /dev/null and b/examples/ghost-racer/assets/New image.png differ diff --git a/examples/ghost-racer/assets/NewSprite.png b/examples/ghost-racer/assets/NewSprite.png new file mode 100644 index 000000000..1fedcd2a4 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite.png differ diff --git a/examples/ghost-racer/assets/NewSprite2.png b/examples/ghost-racer/assets/NewSprite2.png new file mode 100644 index 000000000..476baa960 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite2.png differ diff --git a/examples/ghost-racer/assets/NewSprite3.png b/examples/ghost-racer/assets/NewSprite3.png new file mode 100644 index 000000000..78606e647 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite3.png differ diff --git a/examples/ghost-racer/assets/NewSprite4.png b/examples/ghost-racer/assets/NewSprite4.png new file mode 100644 index 000000000..bd09920b1 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite4.png differ diff --git a/examples/ghost-racer/assets/NewSprite5.png b/examples/ghost-racer/assets/NewSprite5.png new file mode 100644 index 000000000..0ab08b692 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite5.png differ diff --git a/examples/ghost-racer/assets/NewSprite6.png b/examples/ghost-racer/assets/NewSprite6.png new file mode 100644 index 000000000..108b56fea Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite6.png differ diff --git a/examples/ghost-racer/assets/NewSprite7.png b/examples/ghost-racer/assets/NewSprite7.png new file mode 100644 index 000000000..c38cf72d1 Binary files /dev/null and b/examples/ghost-racer/assets/NewSprite7.png differ diff --git a/examples/ghost-racer/assets/Pause button.png b/examples/ghost-racer/assets/Pause button.png new file mode 100644 index 000000000..89dc55f09 Binary files /dev/null and b/examples/ghost-racer/assets/Pause button.png differ diff --git a/examples/ghost-racer/assets/Play button.png b/examples/ghost-racer/assets/Play button.png new file mode 100644 index 000000000..59273c158 Binary files /dev/null and b/examples/ghost-racer/assets/Play button.png differ diff --git a/examples/ghost-racer/assets/Play button2.png b/examples/ghost-racer/assets/Play button2.png new file mode 100644 index 000000000..b02f8abd5 Binary files /dev/null and b/examples/ghost-racer/assets/Play button2.png differ diff --git a/examples/ghost-racer/assets/Plus Key.png b/examples/ghost-racer/assets/Plus Key.png new file mode 100644 index 000000000..f4cc04cdc Binary files /dev/null and b/examples/ghost-racer/assets/Plus Key.png differ diff --git a/examples/ghost-racer/assets/Plus Key2.png b/examples/ghost-racer/assets/Plus Key2.png new file mode 100644 index 000000000..f42b957fb Binary files /dev/null and b/examples/ghost-racer/assets/Plus Key2.png differ diff --git a/examples/ghost-racer/assets/Rb.png b/examples/ghost-racer/assets/Rb.png new file mode 100644 index 000000000..1feea1f28 Binary files /dev/null and b/examples/ghost-racer/assets/Rb.png differ diff --git a/examples/ghost-racer/assets/Red Button With Shadow_Hovered.png b/examples/ghost-racer/assets/Red Button With Shadow_Hovered.png new file mode 100644 index 000000000..308ed0591 Binary files /dev/null and b/examples/ghost-racer/assets/Red Button With Shadow_Hovered.png differ diff --git a/examples/ghost-racer/assets/Red Button With Shadow_Idle.png b/examples/ghost-racer/assets/Red Button With Shadow_Idle.png new file mode 100644 index 000000000..6ec6b334c Binary files /dev/null and b/examples/ghost-racer/assets/Red Button With Shadow_Idle.png differ diff --git a/examples/ghost-racer/assets/Red Button With Shadow_Pressed.png b/examples/ghost-racer/assets/Red Button With Shadow_Pressed.png new file mode 100644 index 000000000..0a599e395 Binary files /dev/null and b/examples/ghost-racer/assets/Red Button With Shadow_Pressed.png differ diff --git a/examples/ghost-racer/assets/Square Blue Slider Border.png b/examples/ghost-racer/assets/Square Blue Slider Border.png new file mode 100644 index 000000000..e8f39e23d Binary files /dev/null and b/examples/ghost-racer/assets/Square Blue Slider Border.png differ diff --git a/examples/ghost-racer/assets/Square Blue Slider Fill Bar.png b/examples/ghost-racer/assets/Square Blue Slider Fill Bar.png new file mode 100644 index 000000000..416fcd626 Binary files /dev/null and b/examples/ghost-racer/assets/Square Blue Slider Fill Bar.png differ diff --git a/examples/ghost-racer/assets/Square Blue Slider Thumb.png b/examples/ghost-racer/assets/Square Blue Slider Thumb.png new file mode 100644 index 000000000..d30fd7719 Binary files /dev/null and b/examples/ghost-racer/assets/Square Blue Slider Thumb.png differ diff --git a/examples/ghost-racer/assets/Square Blue Toggle_Off.png b/examples/ghost-racer/assets/Square Blue Toggle_Off.png new file mode 100644 index 000000000..04cd0fc01 Binary files /dev/null and b/examples/ghost-racer/assets/Square Blue Toggle_Off.png differ diff --git a/examples/ghost-racer/assets/Square Blue Toggle_On.png b/examples/ghost-racer/assets/Square Blue Toggle_On.png new file mode 100644 index 000000000..b4b2f8fd4 Binary files /dev/null and b/examples/ghost-racer/assets/Square Blue Toggle_On.png differ diff --git a/examples/ghost-racer/assets/Square Green Toggle_Off.png b/examples/ghost-racer/assets/Square Green Toggle_Off.png new file mode 100644 index 000000000..d6ac6872b Binary files /dev/null and b/examples/ghost-racer/assets/Square Green Toggle_Off.png differ diff --git a/examples/ghost-racer/assets/Square Green Toggle_On.png b/examples/ghost-racer/assets/Square Green Toggle_On.png new file mode 100644 index 000000000..5332b9457 Binary files /dev/null and b/examples/ghost-racer/assets/Square Green Toggle_On.png differ diff --git a/examples/ghost-racer/assets/Square White Slider Border.png b/examples/ghost-racer/assets/Square White Slider Border.png new file mode 100644 index 000000000..804271b3c Binary files /dev/null and b/examples/ghost-racer/assets/Square White Slider Border.png differ diff --git a/examples/ghost-racer/assets/Square White Slider Fill Bar.png b/examples/ghost-racer/assets/Square White Slider Fill Bar.png new file mode 100644 index 000000000..c5ed08339 Binary files /dev/null and b/examples/ghost-racer/assets/Square White Slider Fill Bar.png differ diff --git a/examples/ghost-racer/assets/Square White Slider Thumb.png b/examples/ghost-racer/assets/Square White Slider Thumb.png new file mode 100644 index 000000000..5307d8c68 Binary files /dev/null and b/examples/ghost-racer/assets/Square White Slider Thumb.png differ diff --git a/examples/ghost-racer/assets/Transparent light joystick border.png b/examples/ghost-racer/assets/Transparent light joystick border.png new file mode 100644 index 000000000..17995d5aa Binary files /dev/null and b/examples/ghost-racer/assets/Transparent light joystick border.png differ diff --git a/examples/ghost-racer/assets/Transparent light joystick thumb.png b/examples/ghost-racer/assets/Transparent light joystick thumb.png new file mode 100644 index 000000000..7a2d5a008 Binary files /dev/null and b/examples/ghost-racer/assets/Transparent light joystick thumb.png differ diff --git a/examples/ghost-racer/assets/kenvector_future_thin.ttf b/examples/ghost-racer/assets/kenvector_future_thin.ttf new file mode 100644 index 000000000..9f4b4fa59 Binary files /dev/null and b/examples/ghost-racer/assets/kenvector_future_thin.ttf differ diff --git a/examples/ghost-racer/assets/mononoki-Regular.ttf b/examples/ghost-racer/assets/mononoki-Regular.ttf new file mode 100644 index 000000000..1f52dd2f7 Binary files /dev/null and b/examples/ghost-racer/assets/mononoki-Regular.ttf differ diff --git a/examples/ghost-racer/ghost-racer.json b/examples/ghost-racer/ghost-racer.json new file mode 100644 index 000000000..aec9d8ef7 --- /dev/null +++ b/examples/ghost-racer/ghost-racer.json @@ -0,0 +1,63656 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "antialiasingMode": "MSAA", + "antialisingEnabledOnMobile": false, + "folderProject": false, + "orientation": "default", + "packageName": "com.example.gamename", + "pixelsRounding": false, + "projectUuid": "baa3f6a4-8df9-4b8c-8bf6-6029436d7dc7", + "scaleMode": "linear", + "sizeOnStartupMode": "adaptWidth", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Ghost Racer", + "description": "\"Ghost Racer\" is similar to a 2D Fall Guys game, with a completely rewritten RecordMovements extension that allows asynchronous multiplayer gameplay. This means you can play against the saved movements of yourself or others (powered by Google Firebase Firestore Database).", + "author": "", + "windowWidth": 1920, + "windowHeight": 1080, + "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": "preview.png" + }, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0.2, + "minDuration": 1.5, + "progressBarColor": 16777215, + "progressBarHeight": 20, + "progressBarMaxWidth": 200, + "progressBarMinWidth": 40, + "progressBarWidthPercent": 30, + "showGDevelopSplash": true, + "showProgressBar": true + }, + "watermark": { + "placement": "top-right", + "showWatermark": true + }, + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [ + "platformer" + ], + "playableDevices": [ + "keyboard", + "gamepad", + "mobile" + ], + "extensionProperties": [ + { + "extension": "Firebase", + "property": "FirebaseConfig", + "value": "{\n \"apiKey\": \"AIzaSyCs7eQXGZTSRroHIVXsglotqzMGwrL7m2M\",\n \"authDomain\": \"ghost-racer-f79a3.firebaseapp.com\",\n \"projectId\": \"ghost-racer-f79a3\",\n \"storageBucket\": \"ghost-racer-f79a3.appspot.com\",\n \"messagingSenderId\": \"836192680263\",\n \"appId\": \"1:836192680263:web:ef424b6d8acb6dcaa53462\",\n \"measurementId\": \"G-GS3TNNC9GG\"\n}" + } + ], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/NewSprite.png", + "kind": "image", + "metadata": "{\"extension\":\".png\",\"localFilePath\":\"assets/NewSprite.png\"}", + "name": "NewSprite", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite2.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "NewSprite2", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/d5f91e16ffe6f2d4ee7e779dd23c3b460f4b32505da913e544235edc431e7061_GreenHero_Climb_1.png", + "name": "GreenHero_Climb_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/de997cb67b66b5ff23354cb1df015e326fd0c427176be2fd878fc3dbb19e0b92_GreenHero_Climb_10.png", + "name": "GreenHero_Climb_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/e88511e2e27e0c4cd12e6b081bbaaa3596fd7013ff04524298f04bda86a93b73_GreenHero_Climb_11.png", + "name": "GreenHero_Climb_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/7d94e8e7ee09c78103cefa3900b5563605dce99b84ce6de1826d26588ec8d8ed_GreenHero_Climb_12.png", + "name": "GreenHero_Climb_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/d297df401b6edeb8494ad1591599f647942fcef9bd67ba9f1410f7c951bb03f7_GreenHero_Climb_13.png", + "name": "GreenHero_Climb_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_14.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_14.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/ac5ae3f241c2e515856c61d56b1916d0e931151aa98534db818de25c5cbb420b_GreenHero_Climb_14.png", + "name": "GreenHero_Climb_14.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_15.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_15.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/b0c8213e5730300b87e921ecddd9c7d09c0b72e9451063072d13922b8b04dd9a_GreenHero_Climb_15.png", + "name": "GreenHero_Climb_15.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_16.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_16.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/7220791d2d026a62d7646813815fbc026f5bbf96a6d30ef521cacd39de5c3fce_GreenHero_Climb_16.png", + "name": "GreenHero_Climb_16.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/d5fcf7bc75450daf011e18383b479134afa45404e7198037322b1603bf7b8484_GreenHero_Climb_2.png", + "name": "GreenHero_Climb_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2c95afe967be2f1818820c1e713c45fb1c947b2a87c452f9069e9f24ca1f2191_GreenHero_Climb_3.png", + "name": "GreenHero_Climb_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/19a965da534a1816663c6a5cfb27915f99f676eebeac64e2838664519ae236a4_GreenHero_Climb_4.png", + "name": "GreenHero_Climb_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/bcf2286cd56dcf9753c9fafd858da04ca92212e079a109b0fc4dd01aa049a37e_GreenHero_Climb_5.png", + "name": "GreenHero_Climb_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/0a0158ae5293e5a26b870f9c36a574a49da9bdc8eb002d74693190ea752ecfdf_GreenHero_Climb_6.png", + "name": "GreenHero_Climb_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2c5df42b659d2b15bc39c5c4e82933bb98240009d181a713aa4addc16d613ea8_GreenHero_Climb_7.png", + "name": "GreenHero_Climb_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/b17a1200b7655316e23d354b5d47ab479f20a78ed345963ddcc2081127e24372_GreenHero_Climb_8.png", + "name": "GreenHero_Climb_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Climb_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Climb_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/bac31662f31e693d8b24d6e287cc814b9b0c91f42b0de5c950bd309052e87cab_GreenHero_Climb_9.png", + "name": "GreenHero_Climb_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/65b2cfa9970d66a692f148fcde1e5fc624d696702aa43592ff3c34c8fe23735e_GreenHero_Fire_1.png", + "name": "GreenHero_Fire_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/d1c9de8c13099719e43d6efd2490743324f4e7f0d27a0e7395d055a8449d1a6c_GreenHero_Fire_10.png", + "name": "GreenHero_Fire_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/dd15e1608ed4db8b823276b298a09019e3635a4f6961f07b83213b278d7b2b3a_GreenHero_Fire_11.png", + "name": "GreenHero_Fire_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/873f741d1a61d6ad57af684263817948baf9bb1a56d908bc90559a4322847abd_GreenHero_Fire_12.png", + "name": "GreenHero_Fire_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/7f1cf403cf89824003f5cab3a491314726b14984ab58ceb270c09c2d15d34d4b_GreenHero_Fire_13.png", + "name": "GreenHero_Fire_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_14.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_14.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/19d29b643585ff6f7cfdd87c9793ef456c6ebb2769a78a8e437543b49e71378d_GreenHero_Fire_14.png", + "name": "GreenHero_Fire_14.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_15.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_15.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/034f0cbca1171ef4f8cec9547dd6124139d5385b8bf48d539ee4511783c6f6bb_GreenHero_Fire_15.png", + "name": "GreenHero_Fire_15.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_16.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_16.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/bdec548b838ea6108bd7dcba813ad1ec03f5878cffd738a3e168ea3baf722533_GreenHero_Fire_16.png", + "name": "GreenHero_Fire_16.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_17.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_17.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/62a1f80a0fa0b919e1eb1a2e2f9c5b0df8f2e43b0385a09213f55d9dcf0ffff1_GreenHero_Fire_17.png", + "name": "GreenHero_Fire_17.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_18.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_18.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/542947b78ed335aee6ac8fe15b8bd5bdd0c23d16170a0f650f1e5088521b5127_GreenHero_Fire_18.png", + "name": "GreenHero_Fire_18.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_19.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_19.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2710186a66de79eccea514e0bcf08c2463f51f5a0bc8d95ee4b195dff00d46e5_GreenHero_Fire_19.png", + "name": "GreenHero_Fire_19.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/75e15fdc394ecc10655b4bb67d655c91d30b3be369da8f6ad088597e8debe7a8_GreenHero_Fire_2.png", + "name": "GreenHero_Fire_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_20.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_20.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/63049aa051e47b87a363e600d9b40408e57262363e1a007b248d0b8d17899569_GreenHero_Fire_20.png", + "name": "GreenHero_Fire_20.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/59a5d3bf82f7f86e95f8a25dc4ede7103fda8723346fed5b13073e476a2aefac_GreenHero_Fire_3.png", + "name": "GreenHero_Fire_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/b3dc5dae9fe80d2d2eb4b24dfff7015fff34f0a7c43c9de46dbbee8a7fd0e5fd_GreenHero_Fire_4.png", + "name": "GreenHero_Fire_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/bb773aba05cf081de6dabfa8ea203a98a744bfd46c5d11432fc95556461c2c08_GreenHero_Fire_5.png", + "name": "GreenHero_Fire_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/57447d93c49759e5ead5962a713713202b76cadbb21ce9adb10d134d1e07a77d_GreenHero_Fire_6.png", + "name": "GreenHero_Fire_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/8070cccb543b59c8e958302be287de09b75c429f58457c86c1433f873d93751a_GreenHero_Fire_7.png", + "name": "GreenHero_Fire_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6ead0710aa2f8a53dcb427e66487f992bfb68ecede65dff194c5146eafaa161e_GreenHero_Fire_8.png", + "name": "GreenHero_Fire_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Fire_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Fire_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/10b88d1b8fd04a13d5a7cb585a54566ebd6ce63b311927bb26092c5035c1dc8a_GreenHero_Fire_9.png", + "name": "GreenHero_Fire_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/511da4737e2ade4519ac17a1ca8e3d160dfc5d93b4a09290da8d2600a7329fa6_GreenHero_Idle_1.png", + "name": "GreenHero_Idle_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/3c3be543d0e1ba7d48f81f535d1579079989c4fac1305215fd47d3f9882f165d_GreenHero_Idle_10.png", + "name": "GreenHero_Idle_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/cdf66ccdbe724aff37ea545a489ce8f96162117a0c702ac8131e4bc608d3c5cb_GreenHero_Idle_11.png", + "name": "GreenHero_Idle_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2f4eac371daea1dfb03d15b93ec9656bc907b2900557559ae92a6171224e77ea_GreenHero_Idle_12.png", + "name": "GreenHero_Idle_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/79d09a2bf773d2f609a50301a6663b7d095d5b908d3935321b7273fb98eb501f_GreenHero_Idle_13.png", + "name": "GreenHero_Idle_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_14.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_14.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/9726144792f99a8ff0b8d10b6ec3a9211165038ffafe531b297b50c0ff25352d_GreenHero_Idle_14.png", + "name": "GreenHero_Idle_14.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_15.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_15.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/71f969cbc51aa33ca66f757467d459a9bf71e561ba0b78bf2e5eaa2a6dca7cfe_GreenHero_Idle_15.png", + "name": "GreenHero_Idle_15.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_16.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_16.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/e70ff9d8a0376b16da5cb30bd711ad0f66507af8fdc24ab585c1b0781fbaf12d_GreenHero_Idle_16.png", + "name": "GreenHero_Idle_16.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_17.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_17.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/af02215fa85ee9441a5cad93c8c3c35a53c3bed3588d20ed8c4bb8da0c790963_GreenHero_Idle_17.png", + "name": "GreenHero_Idle_17.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_18.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_18.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/b4cc48e06e861c5bdc362c20b942c12bb22329c7e5f5e3d5a764d47a75231e9c_GreenHero_Idle_18.png", + "name": "GreenHero_Idle_18.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_19.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_19.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/41731e3a04779edc5ebf0e73cc977264ab2c083cb5256d29453d68a9392d3d89_GreenHero_Idle_19.png", + "name": "GreenHero_Idle_19.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/deb76e6dc4456b5e27822aef3de5bf36041a36c81b3c65275707db8f0584eef4_GreenHero_Idle_2.png", + "name": "GreenHero_Idle_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_20.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_20.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/50ba56dec0d117b2a48c10c7db5867acd688bbb39eae7ba3a81875079f7e10ea_GreenHero_Idle_20.png", + "name": "GreenHero_Idle_20.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6085aae69583f2c9e624a040a520c7151850db35f864413ce6cd75cdeb8e1d68_GreenHero_Idle_3.png", + "name": "GreenHero_Idle_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/29054cd8dff1977facf1b8ac8365210b1a569fb20ac7db36a636920d819ccf34_GreenHero_Idle_4.png", + "name": "GreenHero_Idle_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/0f0eb33f3533fee33e3b8338d834ccb72be933e8ef35567900bc269cf97344b6_GreenHero_Idle_5.png", + "name": "GreenHero_Idle_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6aeca5b3df7cc2a4d2e26ae7849bd3420337f6675989d32176ded6e756a7385c_GreenHero_Idle_6.png", + "name": "GreenHero_Idle_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/77b1dc06946339f75cd52489550ff9034c7fb7336e98d66e4cae366c9f870162_GreenHero_Idle_7.png", + "name": "GreenHero_Idle_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/9334310a0a004fb5e1ddda4299552e61b4bdaaa584c5d1368a3d98cf46c261a2_GreenHero_Idle_8.png", + "name": "GreenHero_Idle_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Idle_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Idle_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/f1dee3465b2eb1313c79f58344a35121c01e74197dd4e4efc404d40cb9431b7e_GreenHero_Idle_9.png", + "name": "GreenHero_Idle_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/ff9c49172997b9b906046c6f6571d8afcd881156d0ba1070deb2247b5e86ba8e_GreenHero_Jump_1.png", + "name": "GreenHero_Jump_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/db810a7877ed7956800573937aecc6ff2f047fb87eb4e090c5cc483229503bc1_GreenHero_Jump_10.png", + "name": "GreenHero_Jump_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/81ad7b402b733440b400056a48ae22e126c9439b8efbdcbd12a952eb04dcf5a6_GreenHero_Jump_11.png", + "name": "GreenHero_Jump_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/01f87533f85b6a1a0d20f3a8f9c32299758661e63427e9a0d5ce4a2ff1dbeebb_GreenHero_Jump_12.png", + "name": "GreenHero_Jump_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/443fa7e98ca1c5f931174d732442e3ace2ec3f1002ff3f1eafe75f6809f84394_GreenHero_Jump_13.png", + "name": "GreenHero_Jump_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_14.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_14.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/05b7fe8a61713a4fe9beeaa6241c1393705b9fbfe03b220df2378310a81279e2_GreenHero_Jump_14.png", + "name": "GreenHero_Jump_14.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_15.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_15.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2ca83628fdd6bdd2f5a3a14710f6ec0d7b4d55ed2685f18ae6ef1063671c39d1_GreenHero_Jump_15.png", + "name": "GreenHero_Jump_15.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_16.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_16.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/4e8d594c6b02a1d4b1f96dd013e8d01bd59467ab222f21c780639d4986344f42_GreenHero_Jump_16.png", + "name": "GreenHero_Jump_16.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_17.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_17.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6a1ce83be03ebcc2a7bfc95dff9552869ec0e916a7f42002aa8253e1ecc65493_GreenHero_Jump_17.png", + "name": "GreenHero_Jump_17.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6c2296e7468ae864c146f06b0212f77d24cb0150abb7fb8a4af696197eeb8972_GreenHero_Jump_2.png", + "name": "GreenHero_Jump_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/ccacb24f24b6bf76092f233adc9dcd3c8998fc4db12d4b2cebc596b99f072361_GreenHero_Jump_3.png", + "name": "GreenHero_Jump_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/35ad342baf276aa4c4d551872efb758e1bf3e84ad320c8d9638a18ad749cbcb9_GreenHero_Jump_4.png", + "name": "GreenHero_Jump_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/077f0e255d791fa7ac7622f9a3ee096c7bb9d984f9bad0b630a51e75accad61f_GreenHero_Jump_5.png", + "name": "GreenHero_Jump_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/9bf6949f6a2698887c8c891e245b2f88360013ad78366429c579aafeb682265f_GreenHero_Jump_6.png", + "name": "GreenHero_Jump_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/52acdd12d816126398905dd60dd2d87a939d5cc516f51cf58f03d619a2a1386a_GreenHero_Jump_7.png", + "name": "GreenHero_Jump_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/d21a19b8b3d602f96683fdcb958c90ecca967b26b1c3ace5832027a24f5d729b_GreenHero_Jump_8.png", + "name": "GreenHero_Jump_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Jump_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Jump_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/5d1990dec656fad936261e12c197a0ff54408948ce5404d76576c1348ae2b749_GreenHero_Jump_9.png", + "name": "GreenHero_Jump_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Pose1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Pose1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/8d0a50d0a31f82b3135c087123cdcb3137fe9617df01678308d77fa9f019e187_GreenHero_Pose1.png", + "name": "GreenHero_Pose1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Pose2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Pose2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2f813300e060e89107ee5c86908702aef7ace3c49f0a989c8d7efe30dc3b6c54_GreenHero_Pose2.png", + "name": "GreenHero_Pose2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/ecfac69cb6466895f2a56d2575e0c6df59fe777cdd6bf1808380c59b1b4e6ffa_GreenHero_Punch_1.png", + "name": "GreenHero_Punch_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/26d0552c8043f88d8e5e313cda99f9f6e912eba438497921c39ef431fff6a5a1_GreenHero_Punch_10.png", + "name": "GreenHero_Punch_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/9af07e5edc96eeb542e97fa7ee958a850889f190f341df8c2a786e9f4c2da1c3_GreenHero_Punch_11.png", + "name": "GreenHero_Punch_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/062d9cbe7b6124c6c299d1d48c24253c5521ac5d7d30af548b575016ab4de526_GreenHero_Punch_12.png", + "name": "GreenHero_Punch_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/66743f789b32928ea9507144e2fc731bbf09718d53eac2668b6b7e01a7d0daf8_GreenHero_Punch_13.png", + "name": "GreenHero_Punch_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/daafc51337048b0420748a60914986224588bc3302733c7eb7defaf226e24bce_GreenHero_Punch_2.png", + "name": "GreenHero_Punch_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/572d642e26913a9f4877c239a23e0a111385118725d79d19118983924dc6f458_GreenHero_Punch_3.png", + "name": "GreenHero_Punch_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/618a9b72bbc9f4663385c9b1b27b254e770bc39aa89c7bf9050d1028698935a8_GreenHero_Punch_4.png", + "name": "GreenHero_Punch_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/feac50bd5bcb5c9a3aa148a9b0c01fcab964bf8c07a3f99202daeb231217d4fb_GreenHero_Punch_5.png", + "name": "GreenHero_Punch_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/cdec6eadabde3dd8b906bde4935ceeb105ab13b7f45a3690bace4a5a5a24e51d_GreenHero_Punch_6.png", + "name": "GreenHero_Punch_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/6e6aeb5ee7b1765ceb0655a3a76be5601f35a2ea7cb6e71debc951064bf41757_GreenHero_Punch_7.png", + "name": "GreenHero_Punch_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/b2ef854b74d176c44a63b9094be663436fe9427b3472bd6ae6561ad9fd1a0062_GreenHero_Punch_8.png", + "name": "GreenHero_Punch_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Punch_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Punch_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/940f1403f6c2d1daa05502a6d99382f7ae26b2db53c610d6242ac82166531430_GreenHero_Punch_9.png", + "name": "GreenHero_Punch_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_1.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/2818de1184ca1a898ab2486be268d24e1274ac86af5d54c30d5f7f8e6f70c15b_GreenHero_Run_1.png", + "name": "GreenHero_Run_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_10.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_10.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/843ae437882d499d0d818cdf3b2021a3352c8164a16316ea4f7c3beb089bda99_GreenHero_Run_10.png", + "name": "GreenHero_Run_10.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_11.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_11.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/79f73488ccef4d0a77b2b56dd656bb23aff249cbed17707e9a0a36b5846e1d36_GreenHero_Run_11.png", + "name": "GreenHero_Run_11.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_12.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_12.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/cb6a310f663a98491fa7bad93a6aa44fa1cd3d074a88fa46a66fdd2121a00517_GreenHero_Run_12.png", + "name": "GreenHero_Run_12.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_13.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_13.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/a2e769807b7cf36a0feafc547176572bf58fbe742a793e3c3fd955b55e296b1e_GreenHero_Run_13.png", + "name": "GreenHero_Run_13.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_14.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_14.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/17993162191b0ec784bbd858e8a7bcfdd261cba2bad866c02f905b7d67217380_GreenHero_Run_14.png", + "name": "GreenHero_Run_14.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_2.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/ffa849008c3fd1bc1aabaa205a86c1cd5f58bf3c244a08c3f11eab15d8611dea_GreenHero_Run_2.png", + "name": "GreenHero_Run_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_3.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/8bd5607b83e19613e7b7bd7607740605c407ffd4ab7c527e66649e4972ea4f12_GreenHero_Run_3.png", + "name": "GreenHero_Run_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_4.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/0609fcf1ae90d23b16133a22f931bd84e64d7f05743e7a88c493c5d2e705250e_GreenHero_Run_4.png", + "name": "GreenHero_Run_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_5.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/4035c7c65a4ccd5d5095da63ba3c3c50feaa318e82ca75d1a9ba5d97c173a0ee_GreenHero_Run_5.png", + "name": "GreenHero_Run_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_6.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_6.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/fbd29f9340550cd4f4b14c6fac66b623f2168418ea4f9080d6123656a17a9bff_GreenHero_Run_6.png", + "name": "GreenHero_Run_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_7.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_7.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/31d99e223d19d42a9caa91fe9bb160fe740874d0a29ef8e9762e4be93187353b_GreenHero_Run_7.png", + "name": "GreenHero_Run_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_8.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_8.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/da9e219e455d623ee1f46aa569cda927e4072e7e52912ca01da7e35e3ea16d6f_GreenHero_Run_8.png", + "name": "GreenHero_Run_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GreenHero_Run_9.png", + "kind": "image", + "metadata": "", + "name": "GreenHero_Run_9.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop examples/Platformer/Green Hero/9137cc8c908a6aedf706115aefe6826640b45471d57a87618ada27ee244527c3_GreenHero_Run_9.png", + "name": "GreenHero_Run_9.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite3.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "NewSprite3", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite4.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "NewSprite4", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite5.png", + "kind": "image", + "metadata": "{\"extension\":\".png\",\"localFilePath\":\"assets/NewSprite5.png\"}", + "name": "NewSprite5", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/New image.png", + "kind": "image", + "metadata": "{\"extension\":\".png\",\"pskl\":{}}", + "name": "New image", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite6.png", + "kind": "image", + "metadata": "{\"extension\":\".png\",\"localFilePath\":\"assets/NewSprite6.png\"}", + "name": "NewSprite6", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Transparent light joystick border.png", + "kind": "image", + "metadata": "", + "name": "Transparent light joystick border.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/10bb8307b196849eae402b1fbbbb71528828879912fad4836416d85d6d935e6d_Transparent light joystick border.png", + "name": "Transparent light joystick border.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Transparent light joystick thumb.png", + "kind": "image", + "metadata": "", + "name": "Transparent light joystick thumb.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/446729297d485b00428957eb0de56e66d3f5ddf8aa3092ad192f8dd670dd79f2_Transparent light joystick thumb.png", + "name": "Transparent light joystick thumb.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/A Button.png", + "kind": "image", + "metadata": "", + "name": "A Button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Controller And Input Icons/Button/Button/x128/Dark Color/5edfd21a505407d84390c547af07048e5ec00a57c1fcd57209e577b90744a4ba_A Button.png", + "name": "A Button.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Rb.png", + "kind": "image", + "metadata": "", + "name": "Rb.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Controller And Input Icons/Button/Dark/x128/404a40a0e88a5a9e430ef09173e0c800c7690ca6d739b2478e4a7005ea40aa2d_Rb.png", + "name": "Rb.png" + } + }, + { + "file": "assets/kenvector_future_thin.ttf", + "kind": "font", + "metadata": "", + "name": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Space Shooter/017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/NewSprite7.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "NewSprite7", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Red Button With Shadow_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", + "name": "Red Button With Shadow_Hovered.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Red Button With Shadow_Idle.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", + "name": "Red Button With Shadow_Idle.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Red Button With Shadow_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", + "name": "Red Button With Shadow_Pressed.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Play button.png", + "kind": "image", + "metadata": "", + "name": "Play button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/On-Screen Controls/Sprites/Flat Light/3d2442653d81f2be9d054977ff8c1e86b56f1c6388a4d133d1f6e9074988a4bd_Play button.png", + "name": "Play button.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Pause button.png", + "kind": "image", + "metadata": "", + "name": "Pause button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/On-Screen Controls/Sprites/Shaded Light/a94ca243972d43eda47eeee117973b9f0d13c77241d64e4abc5e957997423a24_Pause button.png", + "name": "Pause button.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Play button2.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Play button", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Plus Key2.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Plus Key", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Minus Key2.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Minus Key", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Square Blue Slider Border.png", + "kind": "image", + "metadata": "", + "name": "Square Blue Slider Border.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/4358a20ce4a1e83f8643b287f37cefadefc1941d23cfdc50a3836ecd0dd209f1_Square Blue Slider Border.png", + "name": "Square Blue Slider Border.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square Blue Slider Fill Bar.png", + "kind": "image", + "metadata": "", + "name": "Square Blue Slider Fill Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/71e7d4c8549a750e6e7b6bc6508a352176cb64a57129e96bdd8f2c5bbc187820_Square Blue Slider Fill Bar.png", + "name": "Square Blue Slider Fill Bar.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square Blue Slider Thumb.png", + "kind": "image", + "metadata": "", + "name": "Square Blue Slider Thumb.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/984a68a8bbb562d3f01a8a1993720778df07d37bb3314ed6f1aaf3d4f0edede3_Square Blue Slider Thumb.png", + "name": "Square Blue Slider Thumb.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Close button.png", + "kind": "image", + "metadata": "", + "name": "Close button.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/On-Screen Controls/Sprites/Flat Light/04e5d34e91f8334cad8f3408c0fbd2eda7f32d3833a35766559b7507bfacdcc3_Close button.png", + "name": "Close button.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/GDevelop G logo white.png", + "kind": "image", + "metadata": "", + "name": "GDevelop G logo white.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/GDevelop/5c00e6b81ae1b20854607273671258c57dfc8158100bd2400b3149148c02070d_GDevelop G logo white.png", + "name": "GDevelop G logo white.png" + } + }, + { + "file": "assets/MPLUS1p-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "72daf4dcb53d21803dfb807249302a05c8875978706bda48a6a9770a5cdaa608_MPLUS1p-Regular.ttf", + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Google Fonts/Japanese/72daf4dcb53d21803dfb807249302a05c8875978706bda48a6a9770a5cdaa608_MPLUS1p-Regular.ttf", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square White Slider Border.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Border.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/324e5f522f6242e9f93090e75ddc38427c3a6c42e8236dbf0ed541bd85cf7221_Square White Slider Border.png", + "name": "Square White Slider Border.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square White Slider Fill Bar.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Fill Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/47bc684198cd25b3ec74b0e72c2e2c7abb1b6736bd9f4b78a943c663e83118bf_Square White Slider Fill Bar.png", + "name": "Square White Slider Fill Bar.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square White Slider Thumb.png", + "kind": "image", + "metadata": "", + "name": "Square White Slider Thumb.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Slider/pixel art/848f861767e7ce4581dba9e122ee7bafeaca57987655cebe1f78ab31d1300f0f_Square White Slider Thumb.png", + "name": "Square White Slider Thumb.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square Blue Toggle_Off.png", + "kind": "image", + "metadata": "", + "name": "Square Blue Toggle_Off.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Toggle Switch/pixel art/14903c264ccc32143a5dea59a53e0a9fa7c055cdff1afb7ebc4ee624a783271e_Square Blue Toggle_Off.png", + "name": "Square Blue Toggle_Off.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Square Blue Toggle_On.png", + "kind": "image", + "metadata": "", + "name": "Square Blue Toggle_On.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Settings UI/Toggle Switch/pixel art/2dda7f1aa5cac6d167f2833febbe1982b833183664653e8fac352579113982df_Square Blue Toggle_On.png", + "name": "Square Blue Toggle_On.png" + } + }, + { + "alwaysLoaded": false, + "file": "preview.png", + "kind": "image", + "metadata": "", + "name": "preview.png", + "smoothed": true, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 15, + "disableInputWhenNotFocused": true, + "mangledName": "Game", + "name": "Game", + "r": 15, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 15, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.1, + "snap": true, + "zoomFactor": 0.31928945896901967, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "MovingPlatforms", + "objects": [ + { + "name": "VerticalMovingPlatform" + }, + { + "name": "HorizontalMovingPlatform" + }, + { + "name": "RectangularMovingPlatform" + }, + { + "name": "RectangularMovingPlatform_BottomRight" + } + ] + }, + { + "name": "MobileControls", + "objects": [ + { + "name": "A" + }, + { + "name": "Rb" + }, + { + "name": "Joystick" + } + ] + }, + { + "name": "AllPlatforms", + "objects": [ + { + "name": "VerticalMovingPlatform" + }, + { + "name": "HorizontalMovingPlatform" + }, + { + "name": "RectangularMovingPlatform" + }, + { + "name": "RectangularMovingPlatform_BottomRight" + }, + { + "name": "Ground" + } + ] + }, + { + "name": "PlaybackControls", + "objects": [ + { + "name": "Play_Button" + }, + { + "name": "PauseButton" + }, + { + "name": "PlusKey" + }, + { + "name": "PlayReverse_Button" + }, + { + "name": "MinusKey" + }, + { + "name": "GdevelopLogin_Button" + }, + { + "name": "Login_Text" + }, + { + "name": "PlaybackSpeed_Slider" + }, + { + "name": "PlaybackPosition_Slider" + }, + { + "name": "PlaybackPosition_Text" + }, + { + "name": "PlaybackSpeed_Text" + }, + { + "name": "TotalFrames_Text" + }, + { + "name": "PlaybackTime_Text" + }, + { + "name": "UseInterpolation_Toggle" + }, + { + "name": "UseInterpolation_Text" + } + ] + }, + { + "name": "PlaybackButtons", + "objects": [ + { + "name": "Play_Button" + }, + { + "name": "PauseButton" + }, + { + "name": "PlusKey" + }, + { + "name": "PlayReverse_Button" + }, + { + "name": "MinusKey" + }, + { + "name": "GdevelopLogin_Button" + } + ] + } + ], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "5a8fff38-ef02-4938-bff0-6223d62e6c83", + "width": 7936, + "x": 64, + "y": 1024, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 2880, + "layer": "Environment", + "locked": true, + "name": "Ground", + "persistentUuid": "d140611d-ac16-4a01-8b6e-57b44fe0567d", + "sealed": true, + "width": 1856, + "x": -1792, + "y": -1792, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "f1215cd9-2338-4b81-b9f9-f5d986588eef", + "width": 384, + "x": 2048, + "y": -64, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "d2ba414f-4843-4f22-a0ff-5a4aa5a6006d", + "width": 384, + "x": 1216, + "y": 704, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 768, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "61ea7e1e-a6bb-4ac7-b587-0f039d2caa71", + "width": 128, + "x": 5760, + "y": 256, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 960, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "0b2f3525-f2c0-4dbc-8bdc-55e5d3afa24e", + "width": 128, + "x": 2304, + "y": 64, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 1216, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "2cfe398f-d78f-4612-9464-2ac51e0bba96", + "width": 320, + "x": 2624, + "y": -384, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 832, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "e0f0a215-9f32-4f16-a2d3-16a2adf3c446", + "width": 192, + "x": 3264, + "y": 192, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "d7462147-4997-4fc7-bce0-45455284c02f", + "width": 128, + "x": 3136, + "y": 704, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "d9d91cf7-8e3b-497d-98d4-32d529de3c52", + "width": 128, + "x": 2944, + "y": 384, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "b264da00-6a2e-4d91-a9f7-66e7a36dcb4e", + "width": 0, + "x": 4288, + "y": 960, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 768, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "b9cf3676-f483-4030-ba1f-d53a9128d054", + "width": 64, + "x": 3584, + "y": 256, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 704, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "a3fb0af2-fa85-467c-b728-fff8faf1e5de", + "width": 64, + "x": 3648, + "y": 320, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 640, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "6294a708-ba58-4dc6-bc15-e212eb59fd19", + "width": 64, + "x": 3712, + "y": 384, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 576, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "ce2dc8e8-276a-48c0-9505-4aa65c3c11ee", + "width": 64, + "x": 3776, + "y": 448, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 512, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "09569e32-5535-473b-ace8-e016bf916536", + "width": 64, + "x": 3840, + "y": 512, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 448, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "b921995a-1904-44be-8a04-c7d6f4ea5aaa", + "width": 64, + "x": 3904, + "y": 576, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 384, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "cfd4a045-b539-465b-b3af-6478ab253490", + "width": 64, + "x": 3968, + "y": 640, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "34f556d9-6f1e-4eac-b55d-dc3e74d96841", + "width": 64, + "x": 4032, + "y": 704, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 256, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "c076325c-4fbd-4db0-a598-f24b19de1057", + "width": 64, + "x": 4096, + "y": 768, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "c6c8c5a7-fe55-4dcd-9f7d-ad81fd9dd00b", + "width": 64, + "x": 4160, + "y": 832, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "6ac195a9-6ebc-4e47-ac6b-9e11d1393d5c", + "width": 64, + "x": 4224, + "y": 896, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 832, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "acd52424-cc9a-4820-8a09-9307f4aeaee4", + "width": 64, + "x": 3456, + "y": 192, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 832, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "fcfc788f-a9aa-4df1-979a-9e5772681434", + "width": 64, + "x": 3520, + "y": 192, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "5b14dcd7-7c5f-416e-9a77-496f9eacab21", + "width": 896, + "x": 64, + "y": -63, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "4c5f4403-016a-4348-86be-f3feae212ef5", + "width": 64, + "x": 6976, + "y": 704, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 512, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "ccdb81c3-918a-4317-9107-3a8ad3eea325", + "width": 64, + "x": 6592, + "y": 512, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 640, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "67bf07dc-266d-4eda-83d7-d5edb3e8d015", + "width": 64, + "x": 6208, + "y": 384, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "", + "name": "GreenHero", + "persistentUuid": "034f0f27-db63-4777-b010-c8e40940ee8f", + "width": 128, + "x": 832, + "y": 916, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "d2b5ca5f-8831-4176-9f0c-c4192ccf55be", + "width": 320, + "x": 2112, + "y": -256, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "5937addd-0204-4395-9dfc-1fab80929288", + "width": 320, + "x": 5056, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "9e6dc0b6-96db-40de-aded-a0b7eae7b7c3", + "width": 320, + "x": 2112, + "y": -384, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "HorizontalMovingPlatform", + "persistentUuid": "095ed0cb-3b59-4c59-9bd8-70fef24fb4fb", + "width": 256, + "x": 4160, + "y": -64, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "folded": true, + "name": "HorizontalDuration", + "type": "string", + "value": "2" + } + ] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 65, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "867b46bf-1afe-4fd7-b79a-76f4e88751b9", + "width": 768, + "x": 3904, + "y": -64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 512, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "a91e6fdd-f852-4d73-95c1-407dc87d3503", + "width": 320, + "x": 6272, + "y": 512, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "ea2ef88b-e32d-4f37-bb31-7340b8af8edb", + "width": 320, + "x": 5888, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "79609f04-4335-468a-811f-aa196b814f18", + "width": 320, + "x": 6656, + "y": 704, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "7261ab13-759d-429b-aa30-66fe802dd1dc", + "width": 320, + "x": 6656, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 2624, + "layer": "Environment", + "name": "FinishLine", + "persistentUuid": "f0a9bcd1-6ca4-4454-9161-94640e6c3d4a", + "width": 64, + "x": 7296, + "y": -1600, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "2be5c1a1-98bb-4059-bd8c-e4eb89f8b430", + "width": 512, + "x": 1088, + "y": 384, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "1b8637bb-e70e-4d3b-987c-15f6ff2f5d9d", + "width": 128, + "x": 1344, + "y": 384, + "zOrder": 22, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ + { + "folded": true, + "name": "HorizontalDuration", + "type": "number", + "value": 2 + } + ] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "02a85315-4b3c-4540-9e5c-e7e86b32ddc0", + "width": 1088, + "x": 960, + "y": -64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "", + "name": "HorizontalMovingPlatform", + "persistentUuid": "d6a36d2d-689e-41a4-85ed-d079631a33e4", + "width": 928, + "x": 960, + "y": -63, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "c36bb96a-ba05-4457-9fa8-4eddb4099dfe", + "width": 448, + "x": 2560, + "y": -704, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "", + "name": "HorizontalMovingPlatform", + "persistentUuid": "585a94f4-62f3-436a-a098-6f8428f19a44", + "width": 192, + "x": 2624, + "y": -704, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 4864, + "layer": "Environment", + "name": "FinishLine", + "persistentUuid": "93970765-fb5b-4fb6-91f0-a1a85d4102dd", + "width": 64, + "x": 46976, + "y": -3840, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 256, + "layer": "UI", + "name": "Joystick", + "persistentUuid": "fb14a0e4-ae9c-4bc0-ac5d-6299e56c3bf4", + "width": 256, + "x": 288, + "y": 800, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "UI", + "name": "A", + "persistentUuid": "981989f1-81d6-45f2-bc40-c0c9867a20e9", + "width": 192, + "x": 1600, + "y": 768, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 171, + "layer": "UI", + "name": "Rb", + "persistentUuid": "f603c025-8697-42ca-a2d7-97d343e451d8", + "width": 256, + "x": 1600, + "y": 533, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "RecordingTime_Text", + "persistentUuid": "9c52f35a-894b-4495-bec2-74e57b7d2b20", + "width": 0, + "x": 1792, + "y": 961, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 32, + "layer": "UI", + "name": "FPS_Text", + "persistentUuid": "a10466f7-3c0e-4685-a594-b8fb5575ea63", + "width": 138, + "x": 0, + "y": 1056, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Spawner", + "persistentUuid": "70324f0a-7c16-4e65-9c18-3b3aa574876a", + "width": 128, + "x": 832, + "y": 896, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 640, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "e25e06b3-8d93-42e3-94d5-bee3ef09cdb2", + "width": 320, + "x": 5888, + "y": 384, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "3e584e0e-9e21-40b7-8ba7-8574d879c56e", + "width": 320, + "x": 5440, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 640, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "7c48c7f6-2b70-46d9-8018-d7aa001d861f", + "width": 64, + "x": 5376, + "y": 384, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 640, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "9da0d7cd-55f0-4036-aaa7-663d4f1f8060", + "width": 320, + "x": 5440, + "y": 384, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 512, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "66a8cef7-70a4-4b3d-810f-52ae279be075", + "width": 320, + "x": 5056, + "y": 512, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 512, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "522344af-d049-4222-80cb-21681685b312", + "width": 64, + "x": 4992, + "y": 512, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "MovingPlatformArea", + "persistentUuid": "830a6f8b-5143-4153-8d89-cfd610dab778", + "width": 320, + "x": 4672, + "y": 704, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "d29c5db4-6b0a-4538-94e7-554114961b28", + "width": 320, + "x": 4672, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "Environment", + "name": "VerticalMovingPlatform", + "persistentUuid": "f2f8f81b-9fdc-4432-8e62-4dd15f7da216", + "width": 320, + "x": 6272, + "y": 832, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 320, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "a8a4cdbb-e10a-493b-9583-b330f50c9923", + "width": 64, + "x": 4608, + "y": 704, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "19ec779f-2532-45a5-ae06-c0accb9c5410", + "width": 192, + "x": 3264, + "y": -256, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "53b50ecd-d1c6-40f6-8289-52c6e8c6268d", + "width": 0, + "x": 3264, + "y": -192, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "0845d706-35a6-44bc-a45d-c55c5df88768", + "width": 64, + "x": 3328, + "y": -192, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "07781985-175c-45e8-b1c5-60ab1057b65b", + "width": 0, + "x": 3392, + "y": -192, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "f71eb41c-0237-4871-a686-87eb7c5aa3c6", + "width": 192, + "x": 3264, + "y": -448, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "a25a0c1b-b35b-48c3-a04b-c5f14a3784ed", + "width": 0, + "x": 3264, + "y": -384, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "2d1d48a0-fab3-4245-ba48-a5117c472e7e", + "width": 64, + "x": 3328, + "y": -384, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "6629fec9-c4e8-47c4-9fdd-8ed08b9903c1", + "width": 0, + "x": 3392, + "y": -384, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "bf9bacc7-fb0f-402f-84c2-705bf23091c5", + "width": 192, + "x": 3264, + "y": -1600, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "84e5337b-bb26-4972-aef6-5bd91f7b92cf", + "width": 0, + "x": 3264, + "y": -1536, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "1b846c24-07ca-4376-a818-4f6de8102b15", + "width": 64, + "x": 3328, + "y": -1536, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "0dc6f5e6-5cfe-43c1-ae13-856bd13effcd", + "width": 0, + "x": 3392, + "y": -1536, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "e38434ce-65a5-470a-b465-1cede97096ea", + "width": 192, + "x": 3264, + "y": -832, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "c7c8fb1c-3b0f-4711-b8ac-4393dcbf67ba", + "width": 0, + "x": 3264, + "y": -768, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "cb82b0cc-d051-487a-8ba5-401794985dfe", + "width": 64, + "x": 3328, + "y": -768, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "37408343-e658-4026-9f77-e194e1dc6666", + "width": 0, + "x": 3392, + "y": -768, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "f647c50f-69da-488f-a596-ea893161377b", + "width": 192, + "x": 3264, + "y": -1024, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "72af3d19-eb7b-4d9e-953d-6633a077d4f1", + "width": 0, + "x": 3264, + "y": -960, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "78267ce8-7db0-4e88-9fbd-29de8f4eec01", + "width": 64, + "x": 3328, + "y": -960, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "aa446fe9-16a5-4c0c-a620-28bcf97f0d1c", + "width": 0, + "x": 3392, + "y": -960, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "053da252-6cbc-4b93-8c2c-f345455c5bcf", + "width": 192, + "x": 3264, + "y": -640, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "03428715-5af3-4649-b018-49f7f900db77", + "width": 0, + "x": 3264, + "y": -576, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "cd257062-2dc7-4d7c-8edd-2452a3ef4cf2", + "width": 64, + "x": 3328, + "y": -576, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "9bdddae1-dac9-4e92-a8c8-b884ec7a6eef", + "width": 0, + "x": 3392, + "y": -576, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "14b1db46-c4f6-4040-8298-db1a365843bf", + "width": 192, + "x": 3264, + "y": -1216, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "0aa4959f-d510-4176-8d2b-a327c0108d13", + "width": 0, + "x": 3264, + "y": -1152, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "3e154cd6-035d-46d3-89d3-25672c72e3f0", + "width": 64, + "x": 3328, + "y": -1152, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "5db1f1de-2ea3-42da-8172-fc8288eb3a73", + "width": 0, + "x": 3392, + "y": -1152, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 192, + "layer": "", + "name": "MovingPlatformArea", + "persistentUuid": "14d66955-8fa9-44fc-8447-d6f23c8cdc9b", + "width": 192, + "x": 3264, + "y": -1408, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform", + "persistentUuid": "bf9b2f35-8e38-4863-b369-55a812c0468b", + "width": 0, + "x": 3264, + "y": -1344, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 64, + "layer": "", + "name": "Ground", + "persistentUuid": "26dc1f77-b6ca-45e3-94a4-3cad8287dccd", + "width": 64, + "x": 3328, + "y": -1344, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RectangularMovingPlatform_BottomRight", + "persistentUuid": "6968975d-129c-4797-9fde-accc4686654a", + "width": 0, + "x": 3392, + "y": -1344, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Instructions_Text", + "persistentUuid": "e44a0fff-7263-40c5-b793-3ca7d0143602", + "width": 0, + "x": 96, + "y": 480, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "CenterMessage_Text", + "persistentUuid": "a15972fe-8166-4945-ab62-cc35bbb9c120", + "width": 0, + "x": 704, + "y": 384, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 128, + "layer": "UI", + "name": "Restart_Button", + "persistentUuid": "4227d07c-394e-4017-b291-f4b92ab8be39", + "width": 320, + "x": 832, + "y": 512, + "zOrder": 38, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 128, + "layer": "", + "name": "Start_Button", + "persistentUuid": "666c424e-7857-4910-b60b-5edb81e1a3a3", + "width": 320, + "x": 832, + "y": 512, + "zOrder": 39, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 96, + "layer": "UI", + "name": "PlayReverse_Button", + "persistentUuid": "5743051d-d395-4450-800c-78c03fb47fa2", + "width": 96, + "x": 704, + "y": 36, + "zOrder": 40, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 96, + "layer": "UI", + "name": "Play_Button", + "persistentUuid": "a3ea0d78-cb27-4800-a2ec-529787716e68", + "width": 96, + "x": 1024, + "y": 36, + "zOrder": 41, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 96, + "layer": "UI", + "name": "PauseButton", + "persistentUuid": "8d1473c4-6953-4cce-a5ed-fe37ac2b8b6b", + "width": 96, + "x": 864, + "y": 36, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 100, + "layer": "UI", + "name": "PlusKey", + "persistentUuid": "a1e9a50d-b96f-439f-8ccc-697560ae3170", + "width": 100, + "x": 1180, + "y": 32, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 96, + "layer": "UI", + "name": "MinusKey", + "persistentUuid": "adb3a51e-5552-4cc7-b08b-ae8f372ed70b", + "width": 96, + "x": 544, + "y": 36, + "zOrder": 44, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 32, + "layer": "UI", + "name": "PlaybackPosition_Slider", + "persistentUuid": "45188a23-526a-49a5-be2d-a145ab935c98", + "width": 384, + "x": 96, + "y": 64, + "zOrder": 45, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 78, + "layer": "UI", + "name": "GdevelopLogin_Button", + "persistentUuid": "2b102102-80de-4da1-ad31-e436cce0f2be", + "width": 98, + "x": 1792, + "y": 33, + "zOrder": 47, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Login_Text", + "persistentUuid": "bb567904-e7f0-4b3b-b856-19c4a2dfad3e", + "width": 0, + "x": 1797, + "y": 125, + "zOrder": 48, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "PlaybackPosition_Text", + "persistentUuid": "a12fe111-42b0-4f09-8880-e51798a320dd", + "width": 0, + "x": 128, + "y": 128, + "zOrder": 49, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 31, + "layer": "UI", + "name": "TotalFrames_Text", + "persistentUuid": "ae45d62c-5c76-4505-92ff-192f0b325a24", + "width": 256, + "x": 288, + "y": 129, + "zOrder": 50, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "f7beaac5-294b-43e7-af6f-38056cb4ebca", + "width": 512, + "x": 704, + "y": 256, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 128, + "layer": "Environment", + "name": "Ground", + "persistentUuid": "69372b0c-7ebc-4f49-9a13-2cb3f0e8aff5", + "width": 448, + "x": 1728, + "y": 256, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 32, + "layer": "UI", + "name": "PlaybackSpeed_Slider", + "persistentUuid": "c45c306e-1298-4662-8681-16c147362fb8", + "width": 384, + "x": 1344, + "y": 64, + "zOrder": 51, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "PlaybackSpeed_Text", + "persistentUuid": "1e0a3348-f450-456a-b0a7-da4b7763316f", + "width": 0, + "x": 1440, + "y": 128, + "zOrder": 52, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "PlaybackTime_Text", + "persistentUuid": "6c19afa6-350d-4f4e-ad01-8df94e4fc741", + "width": 0, + "x": 864, + "y": 160, + "zOrder": 53, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 67, + "layer": "UI", + "name": "UseInterpolation_Toggle", + "persistentUuid": "41d09315-6914-442b-aaed-4e2da9ca1642", + "width": 64, + "x": 96, + "y": 221, + "zOrder": 54, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "UseInterpolation_Text", + "persistentUuid": "ddf34b8b-0660-4394-904e-a07d35a68c7c", + "width": 0, + "x": 192, + "y": 225, + "zOrder": 55, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "DebugPainter", + "persistentUuid": "b69db727-d2a7-4e16-bc0a-f129e496548b", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 56, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Ground", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Goal", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite2", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "f2a545fe86b8cc1509591e310c5b6e497482b05fc54d5e770a57d57c167d45b0", + "name": "GreenHero", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "Score", + "type": "number", + "value": 42 + } + ], + "effects": [], + "behaviors": [ + { + "name": "AdvancedJump", + "type": "AdvancedJump::AdvancedJump", + "PlatformerBehavior": "PlatformerObject", + "CoyoteTimeFrameDuration": 0.25, + "CanCoyoteJump": false, + "WasInTheAir": false, + "AirJumpCountMaximum": 1, + "AreFloorJumpCountedAsAirJump": false, + "AirJumpCount": 0, + "WasJumpKeyReleased": false + }, + { + "name": "HorizontalDash", + "type": "AdvancedJump::HorizontalDash", + "PlatformerCharacter": "PlatformerObject", + "PlatformerConfigurationStack": "PlatformerConfigurationStack", + "DashInitialSpeed": 1000, + "DashSustainDurationMin": 0, + "DashSustainDurationMax": 0.25, + "DashSustainAcceleration": 0, + "DashSustainSpeedMax": 1000, + "DashSustainGravity": 0, + "DashDecceleration": 100000, + "DashGravity": 0, + "CoolDownDuration": 0.35, + "LastDirectionIsLeft": false, + "DashKeyIsPressed": false, + "IsSustainning": false, + "CanDash": true + }, + { + "name": "PlatformerCharacterAnimator", + "type": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "EnableAnimationChanges": true, + "EnableHorizontalFlipping": true, + "IdleAnimationName": "Idle", + "RunAnimationName": "Run", + "JumpAnimationName": "Jump", + "FallAnimationName": "Fall", + "ClimbAnimationName": "Climb", + "PlatformerBehavior": "PlatformerObject" + }, + { + "name": "PlatformerConfigurationStack", + "type": "AdvancedJump::PlatformerConfigurationStack", + "PlatformerCharacter": "PlatformerObject" + }, + { + "name": "PlatformerGamepadMapper", + "type": "Gamepads::PlatformerGamepadMapper", + "PlatformerCharacter": "PlatformerObject", + "GamepadIdentifier": 1, + "UseArrows": true, + "UseLeftStick": true, + "UseRightStick": false, + "JumpButton": "A or Cross" + }, + { + "name": "PlatformerMultitouchMapper", + "type": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "Property": "PlatformerObject", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "JumpButton": "A" + }, + { + "name": "PlatformerObject", + "type": "PlatformBehavior::PlatformerObjectBehavior", + "canGrabPlatforms": false, + "canGrabWithoutMoving": false, + "jumpSpeed": 800, + "maxFallingSpeed": 1200, + "gravity": 1200, + "maxSpeed": 500, + "acceleration": 1500, + "canGoDownFromJumpthru": true, + "deceleration": 1500, + "ignoreDefaultControls": false, + "jumpSustainTime": 0.3, + "ladderClimbingSpeed": 150, + "slopeMaxAngle": 60, + "useLegacyTrajectory": false, + "xGrabTolerance": 10, + "yGrabOffset": 0 + }, + { + "name": "RecordMovements", + "type": "RecordMovements::RecordMovements", + "SavedObjectVariable": "Score", + "CustomObjectVariable": "Score", + "RecordLayer": true, + "RecordOpacity": true, + "RecordSize": true, + "RecordVisibility": true, + "RecordZorder": true, + "RecordingFrequency": 20, + "MaxRecordingDuration": 60, + "RecordTint": true + }, + { + "name": "SmoothCamera", + "type": "SmoothCamera::SmoothCamera", + "LeftwardSpeed": 0.9, + "RightwardSpeed": 0.9, + "UpwardSpeed": 0.9, + "DownwardSpeed": 0.9, + "FollowOnX": true, + "FollowOnY": true, + "FollowFreeAreaLeft": 0, + "FollowFreeAreaRight": 0, + "FollowFreeAreaTop": 0, + "FollowFreeAreaBottom": 0, + "CameraOffsetX": 100, + "CameraOffsetY": 0, + "CameraDelay": 0, + "ForecastTime": 0, + "ForecastHistoryDuration": 0, + "LogLeftwardSpeed": 0, + "LogRightwardSpeed": 0, + "LogDownwardSpeed": 0, + "LogUpwardSpeed": 0, + "DelayedCenterX": 0, + "DelayedCenterY": 0, + "ForecastHistoryMeanX": 0, + "ForecastHistoryMeanY": 0, + "ForecastHistoryVarianceX": 0, + "ForecastHistoryCovariance": 0, + "ForecastHistoryLinearA": 0, + "ForecastHistoryLinearB": 0, + "ForecastedX": 0, + "ForecastedY": 0, + "ProjectedNewestX": 0, + "ProjectedNewestY": 0, + "ProjectedOldestX": 0, + "ProjectedOldestY": 0, + "ForecastHistoryVarianceY": 0, + "Index": 0, + "CameraDelayCatchUpSpeed": 0, + "CameraExtraDelay": 0, + "WaitingSpeedXMax": 0, + "WaitingSpeedYMax": 0, + "WaitingEnd": 0, + "CameraDelayCatchUpDuration": 0, + "LeftwardSpeedMax": 9000, + "RightwardSpeedMax": 9000, + "UpwardSpeedMax": 9000, + "DownwardSpeedMax": 9000, + "OldX": 9000, + "OldY": 9000, + "IsCalledManually": false + }, + { + "name": "SmoothPlatformerCamera", + "type": "SmoothCamera::SmoothPlatformerCamera", + "PlatformerCharacter": "PlatformerObject", + "SmoothCamera": "SmoothCamera", + "JumpOriginY": 0, + "AirFollowFreeAreaTop": 0, + "AirFollowFreeAreaBottom": 0, + "FloorFollowFreeAreaTop": 0, + "FloorFollowFreeAreaBottom": 0, + "AirUpwardSpeed": 0.95, + "AirDownwardSpeed": 0.95, + "FloorUpwardSpeed": 0.9, + "FloorDownwardSpeed": 0.9, + "AirUpwardSpeedMax": 9000, + "AirDownwardSpeedMax": 9000, + "FloorUpwardSpeedMax": 9000, + "FloorDownwardSpeedMax": 9000 + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_18.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_19.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_20.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Run", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Jump", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Punch", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Climb", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0625, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Fire", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.03, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_18.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_19.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_20.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Pose1", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Pose1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Pose2", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Pose2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "f2a545fe86b8cc1509591e310c5b6e497482b05fc54d5e770a57d57c167d45b0", + "name": "GreenHero_Ghost", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "BlackAndWhite", + "name": "Effect", + "doubleParameters": { + "opacity": 1 + }, + "stringParameters": {}, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "PlaybackMovements", + "type": "RecordMovements::PlaybackMovements", + "RecordingPeriod": 0, + "RecordingState": "Idle", + "RecordPosition": true, + "RecordAngle": true, + "RecordHorizontalFlip": true, + "RecordVerticalFlip": true, + "RecordHeight": false, + "RecordWidth": false, + "RecordOpacity": false, + "RecordZorder": false, + "RecordVisibility": false, + "RecordLayer": false, + "PlaybackWidth": true, + "PlaybackHeight": true, + "PlaybackLayer": true, + "PlaybackOpacity": false, + "PlaybackVisibility": true, + "PlaybackZorder": false, + "PlaybackTint": true + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_18.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_19.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Idle_20.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Run", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Run_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Jump", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Jump_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Punch", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Punch_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Climb", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.0625, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Climb_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Fire", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_9.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_10.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_11.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_12.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_13.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_14.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_15.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_16.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_17.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_18.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_19.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Fire_20.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Pose1", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Pose1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Pose2", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GreenHero_Pose2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 25, + "y": 20 + }, + { + "x": 74, + "y": 20 + }, + { + "x": 74, + "y": 85 + }, + { + "x": 25, + "y": 85 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "VerticalMovingPlatform", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "VerticalDuration", + "type": "number", + "value": 2 + } + ], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "platformType": "NormalPlatform", + "canBeGrabbed": false, + "yGrabOffset": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 0, + "Height": 200, + "Clockwise": true, + "HorizontalEdgeDuration": 0, + "VerticalEdgeDuration": 2, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite3", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "HorizontalMovingPlatform", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "HorizontalDuration", + "type": "number", + "value": 2 + } + ], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 0, + "Height": 200, + "Clockwise": true, + "HorizontalEdgeDuration": 4, + "VerticalEdgeDuration": 0, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite5", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "RectangularMovingPlatform", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "HorizontalDuration", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "VerticalDuration", + "type": "number", + "value": 1 + } + ], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 0, + "Height": 200, + "Clockwise": true, + "HorizontalEdgeDuration": 2, + "VerticalEdgeDuration": 2, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite6", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "RectangularMovingPlatform_BottomRight", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "HorizontalDuration", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "VerticalDuration", + "type": "number", + "value": 1 + } + ], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 0, + "Height": 200, + "Clockwise": true, + "HorizontalEdgeDuration": 2, + "VerticalEdgeDuration": 2, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Bottom-right corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite6", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "MovingPlatformArea", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite4", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "height": 32, + "name": "FinishLine", + "texture": "New image", + "type": "TiledSpriteObject::TiledSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "14597a6b9020c730f9fd07fdf2b0deaba2505f0c33fd78ccd2e982b5ecee350b", + "name": "Joystick", + "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "Primary", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false + } + ], + "content": {}, + "childrenContent": { + "Border": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Transparent light joystick border.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + "Thumb": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Transparent light joystick thumb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "6f67f352f93424b0db45120a44d7f870b51ec1cbd070579a087dc2c68fc11aad", + "name": "A", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "A", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "A Button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 128, + "y": 0 + }, + { + "x": 128, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "b28b9c65f767925163b1cbd5243184d635156ec6e2e04bf96023e8e96294d14a", + "name": "Rb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "relativeToOriginalWindowSize": true, + "bottomEdgeAnchor": 2, + "rightEdgeAnchor": 2, + "leftEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton", + "ControllerIdentifier": 1, + "ButtonIdentifier": "RB", + "TouchId": 0, + "TouchIndex": 0, + "IsReleased": false + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Rb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 192, + "y": 0 + }, + { + "x": 192, + "y": 128 + }, + { + "x": 0, + "y": 128 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "RecordingTime_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "0.0", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "left", + "characterSize": 60, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "PlaybackTime_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "0.0", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "left", + "characterSize": 60, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "FPS_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "FPSDisplayer", + "type": "FPS::FPSDisplayer", + "prefix": "FPS: ", + "DecimalDigits": 0 + } + ], + "string": "FPS: 123", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "TotalFrames_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "FPSDisplayer", + "type": "FPS::FPSDisplayer", + "prefix": "FPS: ", + "DecimalDigits": 0 + } + ], + "string": "12345", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Instructions_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Jump\n\nKeyboard: Space or Shift\nController: A\n\n\nDash\n\nKeyboard: Z\nController: LB or RB\n\n\nRestart\n\nKeyboard: Escape\nController: Start\n", + "font": "72daf4dcb53d21803dfb807249302a05c8875978706bda48a6a9770a5cdaa608_MPLUS1p-Regular.ttf", + "textAlignment": "left", + "characterSize": 25, + "color": { + "b": 155, + "g": 155, + "r": 155 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "CenterMessage_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Loading...", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "left", + "characterSize": 100, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Login_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "string": "Login", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "PlaybackPosition_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "string": "Playback\nPosition", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "PlaybackSpeed_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "string": "Playback\nSpeed", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "UseInterpolation_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "string": "Use \nInterpolation", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "GhostTime_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 0, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": true + } + ], + "string": "12.3", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 85, + "emitterForceMin": 45, + "flow": 10000, + "jumpForwardInTimeOnCreation": 0, + "maxParticleNb": 300, + "name": "GreenDeathCloud", + "particleAlpha1": 255, + "particleAlpha2": 255, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 26, + "particleBlue2": 26, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 233, + "particleGreen2": 233, + "particleLifeTimeMax": 0.5, + "particleLifeTimeMin": 0.25, + "particleRed1": 84, + "particleRed2": 84, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 48, + "rendererParam2": 1, + "rendererType": "Point", + "tank": 50, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Spawner", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "NewSprite", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "NewSprite7", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 64, + "y": 0 + }, + { + "x": 64, + "y": 64 + }, + { + "x": 0, + "y": 64 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "name": "Restart_Button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 3, + "BottomPadding": 32, + "TopPadding": 32, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 192 + }, + "Idle": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 192 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart Level", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": true, + "topMargin": 16, + "width": 192 + } + } + }, + { + "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "name": "Start_Button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 3, + "BottomPadding": 32, + "TopPadding": 32, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 192 + }, + "Idle": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 192 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Start Game", + "font": "017232541c561313892baaf3c91d69acae462dbd99f9d519bdee22ae597b41b8_kenvector_future_thin.ttf", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": true, + "topMargin": 16, + "width": 192 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "fe001d242ad6c24a2b0ada706a9c4b424d628763f17b83aaa3701a1596a6bd3c", + "name": "Play_Button", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Play button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 48, + "y": 0 + }, + { + "x": 48, + "y": 48 + }, + { + "x": 0, + "y": 48 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "d83498247c04f8ab98f07c182f71fd8f25cbcf7fd332b52414a29da3867d0959", + "name": "PauseButton", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Pause button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 50, + "y": 0 + }, + { + "x": 50, + "y": 48 + }, + { + "x": 0, + "y": 48 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "b771350c4604db20b8e179681f01d9a8f9540063afb7f04f575e2e5ea63ef310", + "name": "PlusKey", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "Plus Key", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Plus Key", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 1, + "y": 0 + }, + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 72 + }, + { + "x": 1, + "y": 72 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "a441dca9d7adb5d9ce23feaa7a6fcc69a1ba08e8d8e76cdf795af6531b6bd1fe", + "name": "MinusKey", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "Minus Key", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Minus Key", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 1, + "y": 0 + }, + { + "x": 75, + "y": 0 + }, + { + "x": 75, + "y": 72 + }, + { + "x": 1, + "y": 72 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "fe001d242ad6c24a2b0ada706a9c4b424d628763f17b83aaa3701a1596a6bd3c", + "name": "PlayReverse_Button", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "Play button", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Play button", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 48, + "y": 0 + }, + { + "x": 48, + "y": 48 + }, + { + "x": 0, + "y": 48 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "f8c51ebe488945c68b6217c5b639b76b6407236507a117c2be5a16d18238c03a", + "name": "Stop_Button", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Close button.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 48, + "y": 0 + }, + { + "x": 48, + "y": 48 + }, + { + "x": 0, + "y": 48 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "04a44486ef2b754667bac8dc9733d9ed735968080172f5abc6292791beedafdd", + "name": "GdevelopLogin_Button", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 4, + "thickness": 4 + }, + "stringParameters": { + "color": "144;19;254" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "GDevelop G logo white.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 354, + "y": 0 + }, + { + "x": 354, + "y": 282 + }, + { + "x": 0, + "y": 282 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "d32eb2703c5acb4488d36fef28164ddf46d8f5b2f3f7a97fa11640cf8d1d91e9", + "name": "PlaybackPosition_Slider", + "type": "PanelSpriteSlider::PanelSpriteSlider", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "BarTopPadding": 3, + "BarLeftPadding": 3, + "BarRightPadding": 3, + "BarBottomPadding": 4, + "LabelMargin": 4, + "InitialValue": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 0.01 + }, + "childrenContent": { + "Background": { + "bottomMargin": 4, + "height": 18, + "leftMargin": 2, + "rightMargin": 2, + "texture": "Square Blue Slider Border.png", + "tiled": false, + "topMargin": 4, + "width": 215 + }, + "FillBar": { + "bottomMargin": 1, + "height": 11, + "leftMargin": 1, + "rightMargin": 1, + "texture": "Square Blue Slider Fill Bar.png", + "tiled": false, + "topMargin": 1, + "width": 11 + }, + "Label": { + "bold": true, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 32, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Thumb": { + "bottomMargin": 3, + "height": 64, + "leftMargin": 3, + "rightMargin": 3, + "texture": "Square Blue Slider Thumb.png", + "tiled": false, + "topMargin": 3, + "width": 32 + } + } + }, + { + "assetStoreId": "bfeeb465a4a164b560a2215e3ff9e78e66123af43cbf7ef1f22d56fca4271c80", + "name": "PlaybackSpeed_Slider", + "type": "PanelSpriteSlider::PanelSpriteSlider", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "BarTopPadding": 6, + "BarLeftPadding": 6, + "BarRightPadding": 6, + "BarBottomPadding": 6, + "LabelMargin": 6, + "InitialValue": 1, + "StepSize": 0.01, + "MinValue": 0, + "MaxValue": 2 + }, + "childrenContent": { + "Background": { + "bottomMargin": 4, + "height": 28, + "leftMargin": 2, + "rightMargin": 2, + "texture": "Square White Slider Border.png", + "tiled": false, + "topMargin": 4, + "width": 265 + }, + "FillBar": { + "bottomMargin": 2, + "height": 16, + "leftMargin": 0, + "rightMargin": 0, + "texture": "Square White Slider Fill Bar.png", + "tiled": false, + "topMargin": 0, + "width": 16 + }, + "Label": { + "bold": true, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 32, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + "Thumb": { + "bottomMargin": 2, + "height": 64, + "leftMargin": 1, + "rightMargin": 1, + "texture": "Square White Slider Thumb.png", + "tiled": false, + "topMargin": 2, + "width": 32 + } + } + }, + { + "assetStoreId": "f11fadb1e240832514853591d6cc0b2acb655ff9421422b1b28e658ace1f0845", + "name": "UseInterpolation_Toggle", + "type": "SpriteToggleSwitch::SpriteToggleSwitch", + "variables": [], + "effects": [], + "behaviors": [], + "content": {}, + "childrenContent": { + "State": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Square Blue Toggle_On.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + }, + { + "assetStoreId": "", + "name": "DebugPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 128, + "outlineSize": 4, + "outlineOpacity": 128, + "fillColor": { + "b": 28, + "g": 231, + "r": 248 + }, + "outlineColor": { + "b": 28, + "g": 231, + "r": 248 + }, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none" + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Ground" + }, + { + "objectName": "Goal" + }, + { + "objectName": "GreenHero" + }, + { + "objectName": "GreenHero_Ghost" + }, + { + "objectName": "VerticalMovingPlatform" + }, + { + "objectName": "HorizontalMovingPlatform" + }, + { + "objectName": "RectangularMovingPlatform" + }, + { + "objectName": "RectangularMovingPlatform_BottomRight" + }, + { + "objectName": "MovingPlatformArea" + }, + { + "objectName": "FinishLine" + }, + { + "objectName": "Joystick" + }, + { + "objectName": "A" + }, + { + "objectName": "Rb" + }, + { + "objectName": "RecordingTime_Text" + }, + { + "objectName": "PlaybackTime_Text" + }, + { + "objectName": "FPS_Text" + }, + { + "objectName": "TotalFrames_Text" + }, + { + "objectName": "Instructions_Text" + }, + { + "objectName": "CenterMessage_Text" + }, + { + "objectName": "Login_Text" + }, + { + "objectName": "PlaybackPosition_Text" + }, + { + "objectName": "PlaybackSpeed_Text" + }, + { + "objectName": "UseInterpolation_Text" + }, + { + "objectName": "GhostTime_Text" + }, + { + "objectName": "GreenDeathCloud" + }, + { + "objectName": "Spawner" + }, + { + "objectName": "Restart_Button" + }, + { + "objectName": "Start_Button" + }, + { + "objectName": "Play_Button" + }, + { + "objectName": "PauseButton" + }, + { + "objectName": "PlusKey" + }, + { + "objectName": "MinusKey" + }, + { + "objectName": "PlayReverse_Button" + }, + { + "objectName": "Stop_Button" + }, + { + "objectName": "GdevelopLogin_Button" + }, + { + "objectName": "PlaybackPosition_Slider" + }, + { + "objectName": "PlaybackSpeed_Slider" + }, + { + "objectName": "UseInterpolation_Toggle" + }, + { + "objectName": "DebugPainter" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Setup", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::MoveAlongBorderOfObject" + }, + "parameters": [ + "", + "MovingPlatforms", + "RectangleMovement", + "MovingPlatformArea", + "\"Inside\"", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetVerticalEdgeDuration" + }, + "parameters": [ + "MovingPlatforms", + "RectangleMovement", + "MovingPlatforms.Variable(VerticalDuration)", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetHorizontalEdgeDuration" + }, + "parameters": [ + "MovingPlatforms", + "RectangleMovement", + "MovingPlatforms.Variable(HorizontalDuration)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "MovingPlatformArea" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Spawner" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Loading\"" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "", + "0" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "\"Environment\"", + "0" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "\"UI\"", + "0" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "MovingPlatforms", + "RectangleMovement", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Restart_Button" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Start_Button" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Restart_Button", + "no", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Start_Button", + "no", + "" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Restart_Button", + "=", + "CameraCenterX(\"UI\")" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "CenterMessage_Text", + "=", + "CameraCenterX(\"UI\")" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "PlaybackControls" + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Loading\"" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Playback", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::LocalStorageHasData" + }, + "parameters": [ + "", + "\"GreenHero\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::LoadRecording_LocalStorage" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "\"GreenHero\"", + "" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::StartPlayback" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::CreateObjectsFromShortestRecordingsFirebase" + }, + "parameters": [ + "", + "GreenHero_Ghost", + "PlaybackMovements", + "10", + "\"RecordedMovementSessions\"", + "\"shortest\"" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Start_Button", + "yes", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Start_Button", + "" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CenterMessage_Text", + "=", + "\"\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsActivated" + }, + "parameters": [ + "Start_Button", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Start_Button", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Any_Button_pressed" + }, + "parameters": [ + "", + "1", + "" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::StartPlayback" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + }, + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Playing\"" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "", + "1" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "\"Environment\"", + "1" + ] + }, + { + "type": { + "value": "ChangeLayerTimeScale" + }, + "parameters": [ + "", + "\"UI\"", + "1" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "MovingPlatforms", + "RectangleMovement", + "yes" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "GreenHero_Ghost", + "=", + "200" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "GreenHero_Ghost", + "=", + "GreenHero.ZOrder() - 1" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "GreenHero", + "\"GameDuration\"" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Start_Button" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Start_Button", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GreenHero_Ghost", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GhostTime_Text", + "" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "PlaybackControls", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "GreenHero_Ghost", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "GhostTime_Text", + "GreenHero_Ghost.X() - 16", + "GreenHero_Ghost.Y() - 96", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "GhostTime_Text", + "=", + "GreenHero_Ghost.ZOrder()" + ] + }, + { + "type": { + "value": "TextObject::Opacity" + }, + "parameters": [ + "GhostTime_Text", + "=", + "GreenHero_Ghost.Opacity()" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "GhostTime_Text", + "Sticker", + "GreenHero_Ghost", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlayerName" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "=", + "\"0\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "GhostTime_Text", + "=", + "ToString(GreenHero_Ghost.Variable(__PlaybackMovements.PlaybackSession.Rank)) + NewLine() + NewLine() + GreenHero_Ghost.PlaybackMovements::ObjectName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlayerName" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "!=", + "\"0\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "GhostTime_Text", + "=", + "ToString(GreenHero_Ghost.Variable(__PlaybackMovements.PlaybackSession.Rank)) + NewLine() + NewLine() + GreenHero_Ghost.PlaybackMovements::PlayerName()" + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Playing\"" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Recording", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::StartRecording" + }, + "parameters": [ + "GreenHero", + "RecordMovements", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Timer text", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "GameState", + "!=", + "\"GameOver\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "RecordingTime_Text", + "=", + "ToString(roundTo(TimerElapsedTime(\"GameDuration\"),1))" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "StrFind(RecordingTime_Text.String(), \".\")", + "=", + "-1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "RecordingTime_Text", + "+", + "\".\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "1", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "RecordingTime_Text", + "+", + "\"0\"" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Death by squish", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "GreenHero" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "AllPlatforms", + "GreenHero.BoundingBoxCenterX()", + "GreenHero.BoundingBoxCenterY()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "GreenHero" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "GreenDeathCloud", + "GreenHero.BoundingBoxCenterX()", + "GreenHero.BoundingBoxCenterY()", + "" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "GreenHero", + "=", + "Spawner.X()", + "=", + "Spawner.Y()" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "yes" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GreenHero", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Game Over", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "GreenHero", + ">", + "FinishLine.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "SmoothCamera", + "" + ] + }, + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "GreenHero" + ] + }, + { + "type": { + "value": "Tween::StopTween" + }, + "parameters": [ + "GreenHero", + "Tween", + "\"DashSpin\"", + "" + ] + }, + { + "type": { + "value": "PauseTimer" + }, + "parameters": [ + "GreenHero", + "\"GameDuration\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Saving\"" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::SaveRecordingLocalStorage" + }, + "parameters": [ + "GreenHero", + "RecordMovements", + "\"GreenHero\"", + "" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::SaveRecordingFirebase" + }, + "parameters": [ + "GreenHero", + "RecordMovements", + "yes", + "\"RecordedMovementSessions\"", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "f" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::SaveRecordingFirebase" + }, + "parameters": [ + "GreenHero", + "RecordMovements", + "yes", + "\"RecordedMovementSessions\"", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Saving", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"Saving\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CenterMessage_Text", + "=", + "\"Saving...\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "2" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "CenterMessage_Text", + "=", + "\"Game Saved!\"" + ] + }, + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "GameState", + "=", + "\"GameOver\"" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Restart_Button", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "Restart_Button", + "yes", + "" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "CenterMessage_Text", + "=", + "CameraCenterX(\"UI\")" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Always", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "GreenHero_Ghost", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::UseReverseDirection" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlaybackHasFinished" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + }, + { + "type": { + "value": "Sticker::IsStuck" + }, + "parameters": [ + "", + "GhostTime_Text", + "Sticker", + "GreenHero_Ghost", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Sticker::Sticker::Unstick" + }, + "parameters": [ + "GhostTime_Text", + "Sticker", + "" + ] + }, + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "GhostTime_Text", + "=", + "GreenHero_Ghost.BoundingBoxRight() + 64", + "=", + "GreenHero_Ghost.BoundingBoxTop()" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Player Controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Restart level", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyReleased" + }, + "parameters": [ + "", + "Escape" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"START\"", + "" + ] + }, + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Restart_Button", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "CurrentSceneName()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "UI elements", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "MobileControls", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Instructions_Text", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::HasTouchScreen" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "A", + "MultitouchButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "A", + "=", + "128" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Rb", + "MultitouchButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Rb", + "=", + "128" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + }, + "parameters": [ + "A", + "MultitouchButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "A", + "=", + "255" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + }, + "parameters": [ + "Rb", + "MultitouchButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Rb", + "=", + "255" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Dashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::IsDashing" + }, + "parameters": [ + "GreenHero", + "HorizontalDash", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlippedX" + }, + "parameters": [ + "GreenHero" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectAngleTween" + }, + "parameters": [ + "GreenHero", + "Tween", + "\"DashSpin\"", + "GreenHero.Angle() - 360", + "\"easeOutQuad\"", + "500", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FlippedX" + }, + "parameters": [ + "GreenHero" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectAngleTween" + }, + "parameters": [ + "GreenHero", + "Tween", + "\"DashSpin\"", + "GreenHero.Angle() + 360", + "\"easeOutQuad\"", + "500", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::EnableChangingAnimations" + }, + "parameters": [ + "GreenHero", + "PlatformerCharacterAnimator", + "no", + "" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "GreenHero", + "\"Fire\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.5" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "GreenHero", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::EnableChangingAnimations" + }, + "parameters": [ + "GreenHero", + "PlatformerCharacterAnimator", + "yes", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "GreenHero", + "CanDash", + "True" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"LB\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"RB\"", + "" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "1", + "\"B\"", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Rb", + "MultitouchButton", + "" + ] + }, + { + "type": { + "value": "KeyPressed" + }, + "parameters": [ + "", + "z" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SimulateDashKey" + }, + "parameters": [ + "GreenHero", + "HorizontalDash", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Dashing cooldown", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::IsDashing" + }, + "parameters": [ + "GreenHero", + "HorizontalDash", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "GreenHero", + "CanDash", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "GreenHero", + "PlatformerObject" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "GreenHero", + "CanDash", + "True" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Playback controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "GdevelopLogin_Button", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Login_Text", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::OpenAuthenticationWindow" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "PlaybackButtons", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PlaybackButtons", + "\"74;74;74\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "PlaybackButtons", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PlaybackButtons", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "PauseButton", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PausePlayback" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "PlusKey", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::ChangePlaybackPositionRelative" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "MinusKey", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::ChangePlaybackPositionRelative" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "-1", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Play_Button", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetUseReverseDirection" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "no", + "" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::StartPlayback" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "PlayReverse_Button", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetUseReverseDirection" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "", + "" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::StartPlayback" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "TotalFrames_Text", + "=", + "ToString(round(GreenHero_Ghost.PlaybackMovements::PlaybackFrameNumber())) + \" / \" + ToString(GreenHero_Ghost.PlaybackMovements::TotalFramesInRecording())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::IsHovered" + }, + "parameters": [ + "PlaybackControls", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "PlaybackControls", + "\"Effect\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsHovered" + }, + "parameters": [ + "PlaybackControls", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "PlaybackControls", + "\"Effect\"", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlaybackIsActive" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::UseReverseDirection" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Play_Button", + "\"80;227;194\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PauseButton", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PlayReverse_Button", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::UseReverseDirection" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Play_Button", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PauseButton", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PlayReverse_Button", + "\"80;227;194\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlaybackIsPaused" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Play_Button", + "\"255;255;255\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PauseButton", + "\"80;227;194\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "PlayReverse_Button", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "PlaybackPosition_Slider", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::ChangePlaybackPositionAbsolute" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "round(GreenHero_Ghost.PlaybackMovements::TotalFramesInRecording() * PlaybackPosition_Slider.Value())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "PlaybackPosition_Slider", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "PlaybackPosition_Slider", + "=", + "GreenHero_Ghost.PlaybackMovements::PlaybackFrameNumber() / GreenHero_Ghost.PlaybackMovements::TotalFramesInRecording()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::IsBeingDragged" + }, + "parameters": [ + "PlaybackSpeed_Slider", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPlaybackSpeedMultiplier" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "=", + "PlaybackSpeed_Slider.Value()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "PlaybackTime_Text", + "=", + "ToString(roundTo(GreenHero_Ghost.PlaybackMovements::PlaybackTime(),2))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenChecked" + }, + "parameters": [ + "UseInterpolation_Toggle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetUseInterpolation" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::HasJustBeenUnchecked" + }, + "parameters": [ + "UseInterpolation_Toggle", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetUseInterpolation" + }, + "parameters": [ + "GreenHero_Ghost", + "PlaybackMovements", + "no", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Camera", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ClampCamera" + }, + "parameters": [ + "", + "-1792", + "-999999", + "FinishLine.X() + 0.25 * CameraWidth()", + "1080", + "", + "" + ] + }, + { + "type": { + "value": "CopyCameraSettings::CopyCameraSettings" + }, + "parameters": [ + "", + "", + "0", + "\"Environment\"", + "0", + "", + "", + "", + "", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "Environment", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "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": [] + }, + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "UI", + "renderingType": "", + "visibility": true, + "cameras": [], + "effects": [] + } + ], + "behaviorsSharedData": [ + { + "name": "AdvancedJump", + "type": "AdvancedJump::AdvancedJump" + }, + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior" + }, + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "FPSDisplayer", + "type": "FPS::FPSDisplayer" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "HorizontalDash", + "type": "AdvancedJump::HorizontalDash" + }, + { + "name": "MultitouchButton", + "type": "SpriteMultitouchJoystick::MultitouchButton" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior" + }, + { + "name": "PlatformerCharacterAnimator", + "type": "PlatformerCharacterAnimator::PlatformerCharacterAnimator" + }, + { + "name": "PlatformerConfigurationStack", + "type": "AdvancedJump::PlatformerConfigurationStack" + }, + { + "name": "PlatformerGamepadMapper", + "type": "Gamepads::PlatformerGamepadMapper" + }, + { + "name": "PlatformerMultitouchMapper", + "type": "SpriteMultitouchJoystick::PlatformerMultitouchMapper" + }, + { + "name": "PlatformerObject", + "type": "PlatformBehavior::PlatformerObjectBehavior" + }, + { + "name": "PlaybackMovements", + "type": "RecordMovements::PlaybackMovements" + }, + { + "name": "RecordMovements", + "type": "RecordMovements::RecordMovements" + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "SmoothCamera", + "type": "SmoothCamera::SmoothCamera" + }, + { + "name": "SmoothPlatformerCamera", + "type": "SmoothCamera::SmoothPlatformerCamera" + }, + { + "name": "Sticker", + "type": "Sticker::Sticker" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ] + }, + { + "b": 209, + "disableInputWhenNotFocused": true, + "mangledName": "Testing", + "name": "Testing", + "r": 209, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 209, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.3645833333333333, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Uncompressed_Text", + "persistentUuid": "c1a04680-4246-4402-bb6d-58f55d19501c", + "width": 0, + "x": 28, + "y": 25, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Compressed_Text", + "persistentUuid": "5cdf960c-6358-4690-ba49-09476f40e9e4", + "width": 0, + "x": 940, + "y": 27, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "DeCompressed_Text", + "persistentUuid": "d29a41a9-234e-44c7-a520-f7a2ef970ebd", + "width": 0, + "x": 940, + "y": 526, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Uncompressed_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Deep into that darkness peering,\nLong I stood there, wondering, fearing,\nDoubting, dreaming dreams no mortals\nEver dared to dream before;\nBut the silence was unbroken,\nAnd the stillness gave no token,\nAnd the only word there spoken\nWas the whispered word, \"Lenore!\"\nThis I whispered, and an echo\nMurmured back the word, \"Lenore!\"\nMerely this, and nothing more.", + "font": "", + "textAlignment": "left", + "characterSize": 40, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Compressed_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "", + "font": "", + "textAlignment": "left", + "characterSize": 40, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "DeCompressed_Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "", + "font": "", + "textAlignment": "left", + "characterSize": 40, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Uncompressed_Text" + }, + { + "objectName": "Compressed_Text" + }, + { + "objectName": "DeCompressed_Text" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "Compressed", + "=", + "Compressor::Compress(Uncompressed_Text.String())" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Compressed_Text", + "=", + "VariableString(Compressed)" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "DeCompressed_Text", + "=", + "Compressor::Decompress(VariableString(Compressed))" + ] + } + ] + } + ] + } + ], + "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": [] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "@4ian, Entropy, VegeTato", + "category": "", + "extensionNamespace": "", + "fullName": "Flash object", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZsYXNoLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNywySDE3TDEzLjUsOUgxN0wxMCwyMlYxNEg3VjJNOSw0VjEySDEyVjE0LjY2TDE0LDExSDEwLjI0TDEzLjc2LDRIOVoiIC8+PC9zdmc+", + "name": "Flash", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/flash-outline.svg", + "shortDescription": "Make an object flash visibility (blink), color tint, object effect, or opacity (fade).", + "version": "1.1.1", + "description": [ + "Make an object flash for a period of time so that it alternates between two different states.", + "Includes the ability to flash visibility (blink), color tint, object effect, or opacity (fade).", + "", + "After adding a behavior to an object, you **trigger the effect** by using the **Flash action**.", + "", + "This can be used to:", + "- Let players know they are invincible after being hit", + "- Catch player attention on the interface (for instance a \"press start\" text)", + "" + ], + "origin": { + "identifier": "Flash", + "name": "gdevelop-extension-store" + }, + "tags": [ + "tween", + "flash", + "blink", + "visible", + "invisible", + "hit", + "damage", + "fade", + "effect", + "color", + "tint" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "q8ubdigLvIRXLxsJDDTaokO41mc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Color tint applied to an object.", + "fullName": "Color tint applied to an object", + "functionType": "ExpressionAndCondition", + "name": "ColorTint", + "sentence": "Color tint applied to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Return the color string for the tint applied to the object" + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.SpriteRuntimeObject} */\r", + "const tintedObject = objects[0];\r", + "const tint = tintedObject.getColor();\r", + "eventsFunctionContext.returnValue = tint;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a color tint is applied to an object.", + "fullName": "Is a color tint applied to an object", + "functionType": "StringExpression", + "name": "IsTinted", + "sentence": "_PARAM1_ is color tinted", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::ColorTint" + }, + "parameters": [ + "", + "=", + "\"255;255;255\"", + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle an object effect.", + "fullName": "Toggle an object effect", + "functionType": "Action", + "name": "ToggleEffect", + "sentence": "Toggle effect _PARAM2_ on _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")", + "" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_EffectToggled", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + }, + { + "description": "Effect name to toggle", + "name": "EffectName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle color tint between the starting tint and a given value.", + "fullName": "Toggle a color tint", + "functionType": "Action", + "name": "ToggleColorTint", + "private": true, + "sentence": "Toggle color tint _PARAM2_ on _PARAM1_", + "events": [ + { + "colorB": 35, + "colorG": 166, + "colorR": 245, + "creationTime": 0, + "name": "Note: This function cannot be \"public\" until it properly handles objects without a starting color tint variable (NULL)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Swap between the starting tint and the given value", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_ColorTintToggled", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::ColorTint" + }, + "parameters": [ + "", + "=", + "Object.VariableString(__FlashColor_StartingTint)", + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"ColorTint\")" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_ColorTintToggled", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_ColorTintToggled", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "Flash::ColorTint" + }, + "parameters": [ + "", + "=", + "Object.VariableString(__FlashColor_StartingTint)", + "Object", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "Object.VariableString(__FlashColor_StartingTint)" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Color tint", + "name": "ColorTint", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Toggle object visibility.", + "fullName": "Toggle object visibility", + "functionType": "Action", + "name": "ToggleVisibility", + "sentence": "Toggle visibility of _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__Flash_VisibilityToggled", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Make the object flash (blink) for a period of time so it alternates between visible and invisible.", + "fullName": "Flash visibility (blink)", + "name": "Flash", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"", + ">", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::ToggleVisibility" + }, + "parameters": [ + "", + "Object", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash (blink) visibility for a period of time.", + "fullName": "Flash visibility (blink)", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash (blink) for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::Flash::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::ToggleVisibility" + }, + "parameters": [ + "", + "Object", + "" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing visibility.", + "fullName": "Is object flashing visibility", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::Flash::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing visibility (blink) of an object.", + "fullName": "Stop flashing visibility (blink)", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing visibility of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::Flash::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "Flash::Flash::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Visibility_Duration_Timer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::Flash", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time during which object is invisible)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make an object flash a color tint for a period of time.", + "fullName": "Flash color tint", + "name": "FlashColor", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"", + ">", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"" + ] + }, + { + "type": { + "value": "Flash::ToggleColorTint" + }, + "parameters": [ + "", + "Object", + "Object.Behavior::PropertyTintColor()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashColor::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash a color tint for a period of time.", + "fullName": "Flash color tint", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash the color tint _PARAM3_ for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__FlashColor_StartingTint", + "=", + "Flash::ColorTint(Object)" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"" + ] + }, + { + "type": { + "value": "Flash::ToggleColorTint" + }, + "parameters": [ + "", + "Object", + "GetArgumentAsString(\"ColorTint\")", + "" + ] + }, + { + "type": { + "value": "Flash::FlashColor::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashColor::SetPropertyTintColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"ColorTint\")" + ] + }, + { + "type": { + "value": "Flash::FlashColor::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Color tint", + "name": "ColorTint", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing a color tint.", + "fullName": "Is object flashing a color tint", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing a color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashColor::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing a color tint on an object.", + "fullName": "Stop flashing color tint", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing color tint _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashColor::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "Object.VariableString(__FlashColor_StartingTint)" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashColor", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "\"255;255;255\"", + "type": "String", + "label": "Tint color", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TintColor" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Flash opacity smoothly (fade) in a repeating loop.", + "fullName": "Flash opacity smothly (fade)", + "name": "FlashOpacity", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashOpacity::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"", + "Object.Behavior::PropertyStartingOpacity()", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"", + "Object.Behavior::PropertyTargetOpacity()", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashOpacity::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Opacity_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash opacity smoothly (fade) in a repeating loop.", + "fullName": "Flash opacity (fade)", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash opacity smoothly to _PARAM4_ in a loop for _PARAM3_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashOpacity::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyStartingOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Opacity()" + ] + }, + { + "type": { + "value": "Tween::AddObjectOpacityTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"", + "GetArgumentAsNumber(\"TargetOpacity\")", + "\"easeInOutCubic\"", + "1000 * Object.Behavior::PropertyHalfPeriodTime()", + "" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Opacity_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + }, + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyTargetOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TargetOpacity\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + }, + { + "description": "Tween behavior (required)", + "name": "TweenBehavior", + "supplementaryInformation": "Tween::TweenBehavior", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Target opacity", + "name": "TargetOpacity", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing opacity.", + "fullName": "Is object flashing opacity", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing opacity", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing opacity of an object.", + "fullName": "Stop flashing opacity", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing opacity of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashOpacity::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashOpacity::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Color_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToTargetOpacity\"" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "TweenBehavior", + "\"__Flash.ToStartingOpacity\"" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyStartingOpacity()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashOpacity", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Tween Behavior (required)", + "description": "", + "group": "", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "hidden": false, + "name": "TweenBehavior" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes), in seconds", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Target opacity (Range: 0 - 255)", + "description": "Opacity will fade between the starting value and a target value", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetOpacity" + }, + { + "value": "", + "type": "Number", + "unit": "Dimensionless", + "label": "Starting opacity", + "description": "Opacity will fade between the starting value and a target value", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "StartingOpacity" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make the object flash an effect for a period of time.", + "fullName": "Flash effect", + "name": "FlashEffect", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Alternate states", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"", + ">", + "Object.Behavior::PropertyHalfPeriodTime()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "Flash::ToggleEffect" + }, + "parameters": [ + "", + "Object", + "Object.Behavior::PropertyEffectName()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop flashing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::PropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"", + ">", + "Object.Behavior::PropertyFlashDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Make an object flash an effect for a period of time.", + "fullName": "Flash effect", + "functionType": "Action", + "name": "Flash", + "sentence": "Make _PARAM0_ flash the effect _PARAM3_ for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop flashing existing effects if the effect name changed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::PropertyEffectName" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Flash::FlashEffect::IsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashColor_StartingState", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "IsEffectEnabled" + }, + "parameters": [ + "Object", + "GetArgumentAsString(\"EffectName\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashColor_StartingState", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::ToggleEffect" + }, + "parameters": [ + "", + "Object", + "GetArgumentAsString(\"EffectName\")", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyFlashDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"FlashDuration\")" + ] + }, + { + "type": { + "value": "Flash::FlashEffect::SetPropertyEffectName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"EffectName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + }, + { + "description": "Duration of the flashing, in seconds", + "longDescription": "Use \"0\" to keep flashing until stopped.", + "name": "FlashDuration", + "type": "expression" + }, + { + "description": "Name of effect", + "name": "EffectName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is flashing an effect.", + "fullName": "Is object flashing an effect", + "functionType": "Condition", + "name": "IsFlashing", + "sentence": "_PARAM0_ is flashing an effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashEffect::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::Stop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop flashing an effect of an object.", + "fullName": "Stop flashing an effect", + "functionType": "Action", + "name": "Stop", + "sentence": "Stop flashing an effect on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Flash::FlashColor::PropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Flash::FlashEffect::SetPropertyIsFlashing" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Timer\"" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"Flash_Effect_Duration_Timer\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashEffect_StartingState", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyEffectName()", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__FlashEffect_StartingState", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EnableEffect" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyEffectName()", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Flash::FlashEffect", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Half period (time between flashes), in seconds", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HalfPeriodTime" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsFlashing" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Flash duration", + "description": "Use \"0\" to keep flashing until stopped", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "FlashDuration" + }, + { + "value": "", + "type": "String", + "label": "Name of effect", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "EffectName" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Toggle switch", + "helpPath": "/objects/toggle-switch", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIzLDIzSDljLTMuOSwwLTctMy4xLTctN3YwYzAtMy45LDMuMS03LDctN2gxNGMzLjksMCw3LDMuMSw3LDd2MEMzMCwxOS45LDI2LjksMjMsMjMsMjN6Ii8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iMTYiIHI9IjQiLz4NCjwvc3ZnPg0K", + "name": "SpriteToggleSwitch", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Interface Elements/8d0cd8cd0c9318f4f6efde6ee6b4c192bd19306467f80c9970387a259300f895_Interface Elements_interface_ui_toggle_switch_on_off.svg", + "shortDescription": "Toggle switch that users can click or touch.", + "version": "1.3.0", + "description": [ + "Toggle switch that users can click or touch. The switch can be customized with sprites.", + "", + "There are ready-to-use toggle switches in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + ], + "origin": { + "identifier": "SpriteToggleSwitch", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "widget", + "toggle", + "switch", + "check box" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "The finite state machine used internally by the switch object.", + "fullName": "Switch finite state machine", + "name": "SwitchFSM", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyWasChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::TogglePropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch is checked.", + "fullName": "Is checked", + "functionType": "Condition", + "name": "IsChecked", + "sentence": "_PARAM0_ is checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::PropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::PropertyWasChecked" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", + "functionType": "Action", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid a started touch to interfere with a state change from events." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetPropertyIsChecked" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::SwitchFSM", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button finite state machine", + "description": "", + "group": "", + "extraInformation": [ + "SpriteToggleSwitch::ButtonFSM" + ], + "hidden": false, + "name": "ButtonFSM" + }, + { + "value": "false", + "type": "Boolean", + "label": "Is checked", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WasChecked" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::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": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::ResetState" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "sentence": "Reset the button state of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteToggleSwitch::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": "SpriteToggleSwitch::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": "ToggleSwitch", + "description": "A toggle switch that users can click or touch.", + "fullName": "Toggle switch", + "name": "SpriteToggleSwitch", + "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." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "State", + "0", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass the configuration to the behavior.\nThe PreviousIsChecked property allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "", + "" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "ChangeSprite" + }, + "parameters": [ + "State", + "=", + "State.AnimationFrameCount() - 1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [ + { + "name": "Background", + "objects": [ + { + "name": "Idle" + }, + { + "name": "Hovered" + }, + { + "name": "Pressed" + } + ] + } + ] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + }, + "parameters": [ + "Object", + "yes", + "no" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyIsChecked" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::PropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetChecked" + }, + "parameters": [ + "Object", + "SwitchFSM", + "no" + ] + }, + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::SetPropertyPreviousIsChecked" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::UpdateStateAnimation" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch is checked.", + "fullName": "Is checked", + "functionType": "Condition", + "name": "IsChecked", + "sentence": "_PARAM0_ is checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::IsChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was checked in the current frame.", + "fullName": "Has just been checked", + "functionType": "Condition", + "name": "HasJustBeenChecked", + "sentence": "_PARAM0_ has just been checked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the toggle switch was unchecked in the current frame.", + "fullName": "Has just been unchecked", + "functionType": "Condition", + "name": "HasJustBeenUnchecked", + "sentence": "_PARAM0_ has just been unchecked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::HasJustBeenUnchecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check (or uncheck) the toggle switch.", + "fullName": "Check (or uncheck)", + "functionType": "Action", + "name": "SetChecked", + "sentence": "Check _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "no", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteToggleSwitch::SwitchFSM::SetChecked" + }, + "parameters": [ + "State", + "SwitchFSM", + "yes", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "IsChecked", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "private": true, + "sentence": "_PARAM0_ is idle", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsIdle" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "private": true, + "sentence": "_PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsClicked" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "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": "SpriteToggleSwitch::ButtonFSM::IsHovered" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "private": true, + "sentence": "_PARAM0_ is focused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsFocused" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "private": true, + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::ButtonFSM::IsPressed" + }, + "parameters": [ + "State", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update the state animation.", + "fullName": "Update state animation", + "functionType": "Action", + "name": "UpdateStateAnimation", + "private": true, + "sentence": "Update the state animation of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "State", + "\"Unchecked\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "State", + "\"Checked\"" + ] + }, + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "State" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteToggleSwitch::SpriteToggleSwitch::IsChecked" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "AnimationName" + }, + "parameters": [ + "State", + "\"Checked\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "State", + "\"Unchecked\"" + ] + }, + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "State" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "State", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "State", + "ButtonFSM", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "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": [ + "State", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Is checked", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "IsChecked" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "It's used to detect a change at hot reload.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousIsChecked" + } + ], + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "State", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "SpriteToggleSwitch::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + }, + { + "name": "SwitchFSM", + "type": "SpriteToggleSwitch::SwitchFSM", + "ButtonFSM": "ButtonFSM", + "IsChecked": false, + "WasChecked": false + } + ], + "animations": [ + { + "name": "Unchecked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + }, + { + "name": "Checked", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "State" + } + ] + } + } + ] + }, + { + "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": "User interface", + "extensionNamespace": "", + "fullName": "Slider", + "helpPath": "/objects/slider", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", + "name": "PanelSpriteSlider", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/UI Essentials/1678c39a3b2bd3df4f82a8a293770db4986a6bcfd3f78e738ddfc86e39176423_UI Essentials_sliders_options.svg", + "shortDescription": "A draggable slider that users can move to select a numerical value.", + "version": "1.4.2", + "description": [ + "A draggable slider that users can move to select a numerical value. The slider can be customized with sprites.", + "", + "There are ready-to-use sliders in the asset-store [settings UI pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=settings-ui-settings-ui)." + ], + "origin": { + "identifier": "PanelSpriteSlider", + "name": "gdevelop-extension-store" + }, + "tags": [ + "draggable", + "slider", + "ui", + "widget" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Represent a value on a slider.", + "fullName": "Slider", + "name": "Slider", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "description": "the value of the object.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::PropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::PropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyStepSize()) * Object.Behavior::PropertyStepSize(), Object.Behavior::PropertyMinValue(), Object.Behavior::PropertyMaxValue())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum value of the object.", + "fullName": "Minimum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MinValue", + "sentence": "the minimum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MinValue", + "name": "SetMinValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyMinValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the object.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyMaxValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the bar value bounds size.", + "fullName": "Size", + "functionType": "ExpressionAndCondition", + "name": "Size", + "sentence": "the bar value bounds size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::MaxValue() - Object.Behavior::MinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the step size of the object.", + "fullName": "Step size", + "functionType": "ExpressionAndCondition", + "group": "Resource bar configuration", + "name": "StepSize", + "sentence": "the step size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyStepSize()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StepSize", + "name": "SetStepSize", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetPropertyStepSize" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Value" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MinValue" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "0", + "type": "Number", + "label": "Step size", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "StepSize" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::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": "PanelSpriteSlider::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": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::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": "PanelSpriteSlider::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": "Slider", + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Slider", + "name": "PanelSpriteSlider", + "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": "This allows to detect a change of \"intial value\" on hot reload." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the child-object instances." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Background", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "FillBar", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Background", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "FillBar", + "=", + "2" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Thumb", + "=", + "3" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create the label that is displayed over the thumb." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Label", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Label", + "=", + "4" + ] + }, + { + "type": { + "value": "TextObject::SetWrapping" + }, + "parameters": [ + "Label", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass the configuration to the behavior." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "FillBar", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateSliderConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyInitialValue" + }, + "parameters": [ + "Object", + "!=", + "Object.PropertyPreviousInitialValue()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyPreviousInitialValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyInitialValue()", + "Object.PropertyInitialValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "inverted": true, + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (TouchX(Background.ButtonFSM::TouchId(), Object.Layer()) - Object.FullBarLeft()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (MouseX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetValue" + }, + "parameters": [ + "Object", + "=", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()", + "FillBar.Slider::MinValue() + FillBar.Slider::Size() * (Thumb.CenterX() - Object.FullBarLeft()) / Object.FullBarWidth()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableBehavior::Dropped" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Thumb", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Thumb.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"", + ">", + "0.5" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Label", + "\"HideBack\"" + ] + } + ] + } + ] + } + ], + "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 parent size change:\n- background is resized to take the full dimensions of the parent\n- the label is put back at the center of the bar\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(Background.BoundingBoxRight(), max(Label.BoundingBoxRight(), Thumb.BoundingBoxRight())) - min(Background.BoundingBoxLeft(), min(Label.BoundingBoxLeft(), Thumb.BoundingBoxLeft()))" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Height()", + "!=", + "max(Background.BoundingBoxBottom(), max(Label.BoundingBoxBottom(), Thumb.BoundingBoxBottom())) - min(Background.BoundingBoxTop(), min(Label.BoundingBoxTop(), Thumb.BoundingBoxTop()))" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Width", + "=", + "Object.Width()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Background", + "Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::Scale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Width)" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "Background", + "=", + "Background.Variable(Height)" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The parent size is not defined in onCreate so it needs to be done here." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider is being dragged.", + "fullName": "Being dragged", + "functionType": "Condition", + "group": "Slider", + "name": "IsBeingDragged", + "sentence": "_PARAM0_ is being dragged", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "DraggableBehavior::Dragged" + }, + "parameters": [ + "Thumb", + "Draggable" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressed" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::ButtonFSM::IsPressedOutside" + }, + "parameters": [ + "Background", + "ButtonFSM", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the value of the slider.", + "fullName": "Value", + "functionType": "ExpressionAndCondition", + "name": "Value", + "sentence": "the value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Value", + "name": "SetValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the minimum value of the slider.", + "fullName": "Minimum value", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "MinValue", + "sentence": "the minimum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::MinValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MinValue", + "name": "SetMinValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetMinValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the maximum value of the slider.", + "fullName": "Maximum value", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "MaxValue", + "sentence": "the maximum value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::MaxValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "MaxValue", + "name": "SetMaxValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetMaxValue" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateLayout" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::UpdateThumbPosition" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the step size of the slider.", + "fullName": "Step size", + "functionType": "ExpressionAndCondition", + "group": "Slider configuration", + "name": "StepSize", + "sentence": "the step size", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FillBar.Slider::StepSize()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "StepSize", + "name": "SetStepSize", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::SetStepSize" + }, + "parameters": [ + "FillBar", + "Slider", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PanelSpriteSlider::Slider", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the label is shown.", + "fullName": "Label is shown", + "functionType": "Condition", + "group": "Slider configuration", + "name": "IsLabelShown", + "sentence": "_PARAM0_ label is shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::PropertyShowLabelAtChanges" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Show (or hide) the label on the bar.", + "fullName": "Show label", + "functionType": "Action", + "group": "Slider configuration", + "name": "SetLabelShown", + "sentence": "Show the label of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + }, + "parameters": [ + "Object", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetPropertyShowLabelAtChanges" + }, + "parameters": [ + "Object", + "yes" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Label", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Show the label", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Center the bar according to the button configuration. This is used in doStepPostEvents when the button is resized.", + "fullName": "Update layout", + "functionType": "Action", + "name": "UpdateLayout", + "private": true, + "sentence": "Update layout of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "FillBar", + "=", + "Object.PropertyBarLeftPadding()", + "=", + "Object.PropertyBarTopPadding()" + ] + }, + { + "type": { + "value": "PanelSpriteObject::Height" + }, + "parameters": [ + "FillBar", + "=", + "round(Background.Height() - Object.PropertyBarTopPadding() - Object.PropertyBarBottomPadding())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update the thumb position according to the slider value.", + "fullName": "Update thumb position", + "functionType": "Action", + "name": "UpdateThumbPosition", + "private": true, + "sentence": "Update the thumb position of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteSlider::Slider::Size" + }, + "parameters": [ + "FillBar", + "Slider", + ">", + "0", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteObject::Width" + }, + "parameters": [ + "FillBar", + "=", + "Object.FullBarWidth() * (FillBar.Slider::Value() - FillBar.Slider::MinValue()) / FillBar.Slider::Size()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Thumb", + "=", + "Object.FullBarLeft() + FillBar.Width()" + ] + }, + { + "type": { + "value": "SetCenterY" + }, + "parameters": [ + "Thumb", + "=", + "FillBar.CenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Label", + "=", + "ToString(Object.Value())" + ] + }, + { + "type": { + "value": "SetCenterX" + }, + "parameters": [ + "Label", + "=", + "Thumb.CenterX()" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Label", + "=", + "Thumb.Y() - Label.Height() - Object.PropertyLabelMargin()" + ] + }, + { + "type": { + "value": "TextObject::Angle" + }, + "parameters": [ + "Label", + "=", + "-Object.Angle()" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarLeft", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.PropertyBarLeftPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarRight", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Background.Width() - Object.PropertyBarRightPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Expression", + "name": "FullBarWidth", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Background.Width() - Object.PropertyBarLeftPadding() - Object.PropertyBarRightPadding()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Update the slider configuration.", + "fullName": "Update slider configuration", + "functionType": "Action", + "name": "UpdateSliderConfiguration", + "private": true, + "sentence": "Update the slider configuration of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass configuration to the behavior and update children." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetMinValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMinValue()", + "Object.PropertyMaxValue()", + "" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetMaxValue" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyMaxValue()", + "Object.PropertyMaxValue()" + ] + }, + { + "type": { + "value": "PanelSpriteSlider::PanelSpriteSlider::SetStepSize" + }, + "parameters": [ + "Object", + "=", + "Object.PropertyStepSize()", + "Object.PropertyMaxValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate interactions with the button.", + "fullName": "De/activate interactions", + "functionType": "Action", + "name": "Activate", + "sentence": "Activate interactions with _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "yes" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Background", + "ButtonFSM", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Thumb", + "Draggable", + "no" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Background", + "ButtonFSM", + "no" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Label" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider allows interactions.", + "fullName": "Interactions activated", + "functionType": "Condition", + "name": "IsActivated", + "sentence": "Interactions on _PARAM0_ are activated", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BehaviorActivated" + }, + "parameters": [ + "Background", + "ButtonFSM" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PanelSpriteSlider::PanelSpriteSlider", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Bar left margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarLeftPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar top margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarTopPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar right margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarRightPadding" + }, + { + "value": "0", + "type": "Number", + "label": "Bar bottom margin", + "description": "", + "group": "Bar", + "extraInformation": [ + "Label", + "FillBar" + ], + "hidden": false, + "name": "BarBottomPadding" + }, + { + "value": "true", + "type": "Boolean", + "label": "Show the label when the value is changed", + "description": "", + "group": "Label", + "extraInformation": [], + "hidden": false, + "name": "ShowLabelAtChanges" + }, + { + "value": "8", + "type": "Number", + "label": "Label margin", + "description": "", + "group": "Label", + "extraInformation": [], + "hidden": false, + "name": "LabelMargin" + }, + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "MinValue" + }, + { + "value": "100", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "MaxValue" + }, + { + "value": "1", + "type": "Number", + "label": "Step size", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "StepSize" + }, + { + "value": "50", + "type": "Number", + "label": "Initial value", + "description": "", + "group": "Value", + "extraInformation": [], + "hidden": false, + "name": "InitialValue" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "It's used to detect a change at hot reload.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousInitialValue" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbAnchorOrigin" + }, + { + "value": "Center-right", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "FillBar" + ], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Label" + ], + "hidden": true, + "name": "ShowLabel" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Label", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "It displays the value when it changes.", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": { + "b": 0, + "g": 0, + "r": 0 + } + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Thumb", + "rightMargin": 0, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Draggable", + "type": "DraggableBehavior::Draggable", + "checkCollisionMask": false + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "FillBar", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Slider", + "type": "PanelSpriteSlider::Slider", + "Value": 0, + "MinValue": 0, + "MaxValue": 1, + "StepSize": 1 + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 0, + "height": 32, + "leftMargin": 0, + "name": "Background", + "rightMargin": 0, + "texture": "", + "tiled": true, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "PanelSpriteSlider::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 0 + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Thumb" + }, + { + "objectName": "FillBar" + }, + { + "objectName": "Background" + } + ] + } + } + ] + }, + { + "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, + "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, + "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, + "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, + "texture": "", + "tiled": false, + "topMargin": 0, + "type": "PanelSpriteObject::PanelSprite", + "width": 32, + "variables": [], + "effects": [], + "behaviors": [] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Label" + }, + { + "objectName": "Idle" + }, + { + "objectName": "Hovered" + }, + { + "objectName": "Pressed" + } + ] + } + } + ] + }, + { + "author": "D8H", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Stick objects to others", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN0aWNrZXItb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik01LjUgMkMzLjYgMiAyIDMuNiAyIDUuNVYxOC41QzIgMjAuNCAzLjYgMjIgNS41IDIySDE2TDIyIDE2VjUuNUMyMiAzLjYgMjAuNCAyIDE4LjUgMkg1LjVNNS44IDRIMTguM0MxOS4zIDQgMjAuMSA0LjggMjAuMSA1LjhWMTVIMTguNkMxNi43IDE1IDE1LjEgMTYuNiAxNS4xIDE4LjVWMjBINS44QzQuOCAyMCA0IDE5LjIgNCAxOC4yVjUuOEM0IDQuOCA0LjggNCA1LjggNCIgLz48L3N2Zz4=", + "name": "Sticker", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sticker-outline.svg", + "shortDescription": "Make objects follow the position and rotation of the object they are stuck to.", + "version": "0.3.5", + "description": [ + "This extension can be useful to:", + "* Stick accessories to moving objects,", + "* Animate a skeleton.", + "", + "An example allows to check it out ([open the project online](https://editor.gdevelop.io/?project=example://stick-objects))." + ], + "origin": { + "identifier": "Sticker", + "name": "gdevelop-extension-store" + }, + "tags": [ + "sticker", + "stick", + "follow", + "skeleton", + "joint", + "pin", + "bind", + "glue", + "tie", + "attach", + "hold", + "paste", + "wear" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if the object is stuck to another object.", + "fullName": "Is stuck to another object", + "functionType": "Condition", + "name": "IsStuck", + "sentence": "_PARAM1_ is stuck to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const stickerBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "/** @type {Hashtable} */", + "const stickerObjectsLists = eventsFunctionContext.getObjectsLists(\"Object\");", + "/** @type {Hashtable} */", + "const basisObjectsLists = eventsFunctionContext.getObjectsLists(\"BasisObject\");", + "", + "eventsFunctionContext.returnValue = gdjs.evtTools.object.twoListsTest(", + " (stickerObject, basisObject, stickerBehaviorName) => {", + " const behavior = stickerObject.getBehavior(stickerBehaviorName);", + " return behavior.basisObject === basisObject;", + " },", + " stickerObjectsLists,", + " basisObjectsLists,", + " false,", + " stickerBehaviorName", + ");" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Sticker", + "name": "Object", + "type": "objectList" + }, + { + "description": "Sticker behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + }, + { + "description": "Basis", + "name": "BasisObject", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Stick the object to another. Use the action to stick the object, or unstick it later.", + "fullName": "Sticker", + "name": "Sticker", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "", + "// Set up the scene sticker objects list - if not done already.", + "if (!runtimeScene.__allStickers)", + " runtimeScene.__allStickers = new Set();", + "", + "// Set up the behavior extra methods - if not done already.", + "const prototype = Object.getPrototypeOf(behavior);", + "if (!prototype.updateRelativeCoordinates) {", + " // Unstick from deleted objects.", + " gdjs.registerObjectDeletedFromSceneCallback(function (runtimeScene, deletedObject) {", + " if (!runtimeScene.__allStickers) return;", + "", + " for (const sticker of runtimeScene.__allStickers) {", + " if (sticker.basisObject === deletedObject) {", + " sticker.basisObject = null;", + " }", + " }", + " });", + "", + " /**", + " * Update the coordinates in the basisObject basis.", + " * ", + " * It uses the basisObject coordinates from the previous frame.", + " * This way, the sticker can move relatively to it and still", + " * follow basisObject.", + " * ", + " * @param {gdjs.RuntimeObject} basisObject", + " */", + " prototype.updateRelativeCoordinates = function (basisObject) {", + " const object = this.owner;", + "", + " // Update relative coordinates", + " this.relativeX = object.getX() - this.basisOldX;", + " this.relativeY = object.getY() - this.basisOldY;", + " if (!this._getOnlyFollowPosition()) {", + " this.relativeAngle = object.getAngle() - this.basisOldAngle;", + " this.relativeWidth = object.getWidth() / this.basisOldWidth;", + " this.relativeHeight = object.getHeight() / this.basisOldHeight;", + " const deltaX = object.getCenterXInScene() - this.basisOldCenterXInScene;", + " const deltaY = object.getCenterYInScene() - this.basisOldCenterYInScene;", + " const angle = this.basisOldAngle * Math.PI / 180;", + " this.relativeRotatedX = (deltaX * Math.cos(angle) + deltaY * Math.sin(angle)) / this.basisOldWidth;", + " this.relativeRotatedY = (-deltaX * Math.sin(angle) + deltaY * Math.cos(angle)) / this.basisOldHeight;", + "", + " // Save initial values to avoid calculus and rounding errors", + " this.basisOriginalWidth = basisObject.getWidth();", + " this.basisOriginalHeight = basisObject.getHeight();", + " this.basisOriginalAngle = basisObject.getAngle();", + " }", + " }", + "", + " /**", + " * Copy the coordinates to use it the next frame.", + " * @param basisObject {gdjs.RuntimeObject}", + " */", + " prototype.updateOldCoordinates = function (basisObject) {", + " const object = this.owner;", + "", + " this.ownerOldX = object.getX();", + " this.ownerOldY = object.getY();", + "", + " this.basisOldX = basisObject.getX();", + " this.basisOldY = basisObject.getY();", + "", + " if (!this._getOnlyFollowPosition()) {", + " this.ownerOldAngle = object.getAngle();", + " this.ownerOldWidth = object.getWidth();", + " this.ownerOldHeight = object.getHeight();", + "", + " this.basisOldAngle = basisObject.getAngle();", + " this.basisOldWidth = basisObject.getWidth();", + " this.basisOldHeight = basisObject.getHeight();", + " this.basisOldCenterXInScene = basisObject.getCenterXInScene();", + " this.basisOldCenterYInScene = basisObject.getCenterYInScene();", + " }", + " }", + " /**", + " * Follow the basisObject (called in doStepPostEvents).", + " * ", + " * This method is also called by children to ensure", + " * parents are updated first.", + " */", + " prototype.followBasisObject = function () {", + " if (this.followingDoneThisFrame) {", + " return;", + " }", + " this.followingDoneThisFrame = true;", + " /** @type {gdjs.RuntimeObject} */", + " const basisObject = this.basisObject;", + " if (basisObject) {", + " // If the behavior on the basis object has a different name,", + " // the objects will still follow their basis objects", + " // but frame delays could happen.", + " if (basisObject.hasBehavior(behaviorName)) {", + " const basisBehavior = basisObject.getBehavior(behaviorName);", + " if (basisBehavior.type === this.type) {", + " // Follow parents 1st to avoid frame delays", + " basisBehavior.followBasisObject();", + " }", + " }", + "", + " const object = this.owner;", + "", + " if (this._getOnlyFollowPosition()) {", + " if (object.getX() !== this.ownerOldX", + " || object.getY() !== this.ownerOldY) {", + " this.updateRelativeCoordinates(basisObject);", + " }", + "", + " if (this.basisOldX !== basisObject.getX() ||", + " this.basisOldY !== basisObject.getY()) {", + " object.setPosition(", + " basisObject.getX() + this.relativeX,", + " basisObject.getY() + this.relativeY);", + " }", + " } else {", + " if (object.getX() !== this.ownerOldX", + " || object.getY() !== this.ownerOldY", + " || object.getAngle() !== this.ownerOldAngle", + " || object.getWidth() !== this.ownerOldWidth", + " || object.getHeight() !== this.ownerOldHeight) {", + " this.updateRelativeCoordinates(basisObject);", + " }", + "", + " // Follow basisObject", + " if (basisObject.getAngle() === this.basisOriginalAngle && this.basisOriginalAngle === 0) {", + " if (basisObject.getWidth() === this.basisOriginalWidth ||", + " basisObject.getHeight() === this.basisOriginalHeight) {", + " if (this.basisOldX !== basisObject.getX() ||", + " this.basisOldY !== basisObject.getY()) {", + " object.setPosition(", + " basisObject.getX() + this.relativeX,", + " basisObject.getY() + this.relativeY);", + " }", + " } else {", + " object.setPosition(", + " basisObject.getX() + this.relativeRotatedX * basisObject.getWidth(),", + " basisObject.getY() + this.relativeRotatedY * basisObject.getHeight());", + " }", + " } else {", + " object.setAngle(basisObject.getAngle() + this.relativeAngle);", + "", + " const deltaX = this.relativeRotatedX * basisObject.getWidth();", + " const deltaY = this.relativeRotatedY * basisObject.getHeight();", + " const angle = -basisObject.getAngle() * Math.PI / 180;", + " object.setX(basisObject.getCenterXInScene() + object.getX() - object.getCenterXInScene() + deltaX * Math.cos(angle) + deltaY * Math.sin(angle));", + " object.setY(basisObject.getCenterYInScene() + object.getY() - object.getCenterYInScene() - deltaX * Math.sin(angle) + deltaY * Math.cos(angle));", + " }", + " // Unproportional dimensions changes won't work as expected", + " // if the object angle is not null but nothing more can be done", + " // because there is no full affine transformation on objects.", + " if (basisObject.getWidth() !== this.basisOriginalWidth) {", + " object.setWidth(this.relativeWidth * basisObject.getWidth());", + " }", + " if (basisObject.getHeight() !== this.basisOriginalHeight) {", + " object.setHeight(this.relativeHeight * basisObject.getHeight());", + " }", + " }", + "", + " this.updateOldCoordinates(basisObject);", + " }", + " }", + "}", + "", + "// Register this object as a sticker.", + "runtimeScene.__allStickers.add(behavior);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "", + "behavior.followingDoneThisFrame = false;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "", + "behavior.followBasisObject();" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stick on another object.", + "fullName": "Stick", + "functionType": "Action", + "name": "Stick", + "sentence": "Stick _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const basisObjects = eventsFunctionContext.getObjects(\"BasisObject\");", + "", + "if (basisObjects.length === 0) return;", + "const basisObject = basisObjects[0];", + "", + "const behavior = object.getBehavior(behaviorName);", + "", + "behavior.basisObject = basisObject;", + "behavior.updateOldCoordinates(basisObject);", + "behavior.updateRelativeCoordinates(basisObject);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + }, + { + "description": "Object to stick to", + "name": "BasisObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Unstick from the object it was stuck to.", + "fullName": "Unstick", + "functionType": "Action", + "name": "Unstick", + "sentence": "Unstick _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const object = objects[0];", + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const behavior = object.getBehavior(behaviorName);", + "", + "behavior.basisObject = null;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDestroy", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "", + "if (runtimeScene.__allStickers)", + " runtimeScene.__allStickers.delete(behavior);", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Sticker::Sticker", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "Only follow the position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "OnlyFollowPosition" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Ahnaf30e", + "category": "Advanced", + "extensionNamespace": "", + "fullName": "Frames per second (FPS)", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMzAsM2gtMkg0SDJDMS40LDMsMSwzLjQsMSw0czAuNCwxLDEsMWgxdjE2YzAsMC42LDAuNCwxLDEsMWg5LjhsLTUuNSw2LjNjLTAuNCwwLjQtMC4zLDEsMC4xLDEuNEM4LjUsMjkuOSw4LjgsMzAsOSwzMA0KCWMwLjMsMCwwLjYtMC4xLDAuOC0wLjNsNS4yLTZWMjhjMCwwLjYsMC40LDEsMSwxczEtMC40LDEtMXYtNC4zbDUuMiw2YzAuMiwwLjIsMC41LDAuMywwLjgsMC4zYzAuMiwwLDAuNS0wLjEsMC43LTAuMg0KCWMwLjQtMC40LDAuNS0xLDAuMS0xLjRMMTguMiwyMkgyOGMwLjYsMCwxLTAuNCwxLTFWNWgxYzAuNiwwLDEtMC40LDEtMVMzMC42LDMsMzAsM3ogTTI0LjgsOC42bC00LDZjLTAuMywwLjQtMC44LDAuNi0xLjMsMC4zDQoJTDE1LjgsMTNoLTMuNGwtMy43LDMuN0M4LjUsMTYuOSw4LjMsMTcsOCwxN3MtMC41LTAuMS0wLjctMC4zYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNGMwLjItMC4yLDAuNC0wLjMsMC43LTAuM2g0DQoJYzAuMiwwLDAuMywwLDAuNCwwLjFsMy4yLDEuNmwzLjUtNS4zYzAuMy0wLjUsMC45LTAuNiwxLjQtMC4zQzI1LDcuNSwyNS4xLDguMSwyNC44LDguNnoiLz4NCjwvc3ZnPg0K", + "name": "FPS", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/SEO/SEO_board_performance_profit.svg", + "shortDescription": "Calculate and display the frames per second (FPS) of the game.", + "version": "1.1.0", + "description": [ + "Provides an expression to get the current FPS and a text object behavior to display the current FPS.", + "", + "Frames Per Second (FPS) describes how many times in the last second your game logic was executed. ", + "This includes running behaviors and events, and then rendering the new game state into the game window. The higher the FPS, the more fluid and performant your game looks.", + "", + "Note: Use the Performance Profiler (inside in the Debugger) for detailed performance information about your game." + ], + "origin": { + "identifier": "FPS", + "name": "gdevelop-extension-store" + }, + "tags": [ + "fps", + "frames", + "per", + "second", + "performance", + "speed" + ], + "authorIds": [ + "onPsboRtDkUHNOsx7OPr8R8G1oj2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SceneVariablePushNumber" + }, + "parameters": [ + "__FPS.FrameTimestamps", + "Time(\"timestamp\")" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Keep timestamps for every frame inside the lookback period", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record how much time has elapsed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__FPS.TimeElapsed", + "=", + "Time(\"timestamp\") - Variable(__FPS.FrameTimestamps[0])" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remove any data before the last second from the beginning of the array" + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "SceneVariableChildCount" + }, + "parameters": [ + "__FPS.FrameTimestamps", + ">", + "0" + ] + }, + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "__FPS.FrameTimestamps[0]", + "<", + "Time(\"timestamp\") - 1000" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "SceneVariableRemoveAt" + }, + "parameters": [ + "__FPS.FrameTimestamps", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the current timestamp to the end of the array" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SceneVariablePushNumber" + }, + "parameters": [ + "__FPS.FrameTimestamps", + "Time(\"timestamp\")" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Frames per second (FPS) during the last second.", + "fullName": "Frames Per Second (FPS)", + "functionType": "Expression", + "name": "FPS", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "VariableChildCount(__FPS.FrameTimestamps) / (Variable(__FPS.TimeElapsed) / 1000)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Frames per second (FPS) during the last second. [Deprecated]", + "fullName": "Frames Per Second (FPS) [Deprecated]", + "functionType": "Expression", + "name": "PreciseFPS", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "FPS::FPS()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The accuracy of the FPS", + "longDescription": "This tells how many numbers after the period should be shown.", + "name": "accuracy", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Makes a text object display the current FPS.", + "fullName": "FPS Displayer", + "name": "FPSDisplayer", + "objectType": "TextObject::Text", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Generate the raw FPS text" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__FPS.UnformattedFPS", + "=", + "ToString(roundTo(FPS::FPS(), Object.Behavior::PropertyDecimalDigits()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add trailing zeroes, if needed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::PropertyDecimalDigits()", + ">", + "0" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "StrFind(VariableString(__FPS.UnformattedFPS),\".\")", + "=", + "-1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__FPS.UnformattedFPS", + "+", + "\".\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.Behavior::PropertyDecimalDigits()", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__FPS.UnformattedFPS", + "+", + "\"0\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show the formatted FPS text including the prefix" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::Propertyprefix() + VariableString(__FPS.UnformattedFPS)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "FPS::FPSDisplayer", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "FPS: ", + "type": "String", + "label": "The prefix before the FPS count", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "prefix" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Number of decimal digits to display", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DecimalDigits" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Behavior Remapper", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFscGhhLXctYm94LW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxN0EyLDIgMCAwLDEgNywxNVY3SDlWMTVIMTFWOEgxM1YxNUgxNVY3SDE3VjE1QTIsMiAwIDAsMSAxNSwxN0g5TTUsM0gxOUEyLDIgMCAwLDEgMjEsNVYxOUEyLDIgMCAwLDEgMTksMjFINUEyLDIgMCAwLDEgMywxOVY1QTIsMiAwIDAsMSA1LDNNNSw1VjE5SDE5VjVINVoiIC8+PC9zdmc+", + "name": "BehaviorRemapper", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/alpha-w-box-outline.svg", + "shortDescription": "Quickly remap Behavior controls to different keys. ", + "version": "1.0.0", + "description": [ + "Make sure to disable default controls unless you want two keys to do the same action.", + "", + "Actions have two versions. `custom` allow the movement keys to be changed to what ever you would like. `presets` provide a common key-bindings that can be selected from a list.", + "", + "### Available Presets:", + "", + "##### `WASD`", + "-\tW: Up", + "-\tA: Left", + "-\tS: Down", + "-\tD: Right", + "-\tSpace: Jump", + "", + "##### `ZQSD`", + "-\tZ: Up", + "-\tQ: Left", + "-\tS: Down", + "-\tD: Right", + "-\tSpace: Jump", + "", + "##### `Numpad` (Num lock must be disabled)", + "-\tNumpad Up: Up", + "-\tNumpad Left: Left", + "-\tNumpad Down: Down", + "-\tNumpad Right: Right", + "-\tNumpad Return/Enter: Jump", + "", + "##### `IJKL`", + "-\tI: Up", + "-\tJ: Left", + "-\tK: Down", + "-\tL: Right", + "-\tReturn/Enter: Jump", + "" + ], + "origin": { + "identifier": "BehaviorRemapper", + "name": "gdevelop-extension-store" + }, + "tags": [ + "remapper", + "key", + "bindings", + "presets", + "platformer", + "top-down" + ], + "authorIds": [ + "AlZ3D1xkH0QDao7T37VZZUeYNpn1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Allows for the controls of a Top-Down behavior to be re-mapped via a single action.", + "fullName": "Remap Top-down", + "name": "RemapForTopdown", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyUp()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyLeft()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyRight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyDown()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Top-Down behavior controls to a custom control scheme.", + "fullName": "Remap Top-Down controls to a custom scheme", + "functionType": "Action", + "name": "SetCustom", + "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"up\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"left\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"right\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"down\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + }, + { + "description": "Up key", + "name": "up", + "type": "key" + }, + { + "description": "Left key", + "name": "left", + "type": "key" + }, + { + "description": "Down key", + "name": "down", + "type": "key" + }, + { + "description": "Right key", + "name": "right", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Top-Down behavior controls to a preset control scheme.", + "fullName": "Remap Top-Down controls to a preset", + "functionType": "Action", + "name": "SetPreset", + "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"WASD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"w\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"a\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AZERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"ZQSD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"z\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"q\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Numpad bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"Numpad\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadUp\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadLeft\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadDown\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadRight\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY player 2 bindings " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"IJKL\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"i\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"j\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"k\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"l\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + }, + { + "description": "Preset name", + "name": "options", + "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "w", + "type": "String", + "label": "Up key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Up" + }, + { + "value": "a", + "type": "String", + "label": "Left key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Left" + }, + { + "value": "d", + "type": "String", + "label": "Right key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Right" + }, + { + "value": "s", + "type": "String", + "label": "Down key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Down" + }, + { + "value": "", + "type": "Behavior", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "hidden": false, + "name": "Topdown" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Allows for the controls of a platformer behavior to be re-mapped via a single action.", + "fullName": "Remap Platformer controls", + "name": "RemapForPlatformer", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyUp()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyLeft()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyRight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyDown()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateReleaseLadderKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyJump()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Platformer behavior controls to a custom control scheme.", + "fullName": "Remap Platformer controls to a custom scheme", + "functionType": "Action", + "name": "SetCustom", + "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_, Jump: _PARAM6_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"up\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"left\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"right\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"down\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"jump\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + }, + { + "description": "Up key", + "name": "up", + "type": "key" + }, + { + "description": "Left key", + "name": "left", + "type": "key" + }, + { + "description": "Down key", + "name": "down", + "type": "key" + }, + { + "description": "Right key", + "name": "right", + "type": "key" + }, + { + "description": "Jump key", + "name": "jump", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Platformer behavior controls to a preset control scheme.", + "fullName": "Remap Platformer controls to a preset", + "functionType": "Action", + "name": "SetPreset", + "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"WASD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"w\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"a\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Space\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AZERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"ZQSD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"z\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"q\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Space\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Numpad bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"Numpad\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadUp\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadLeft\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadDown\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadRight\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadReturn\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY player 2 bindings " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"IJKL\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"i\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"j\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"k\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"l\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Return\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + }, + { + "description": "Preset name", + "name": "options", + "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Up key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Up" + }, + { + "value": "", + "type": "String", + "label": "Left key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Left" + }, + { + "value": "", + "type": "String", + "label": "Down key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Down" + }, + { + "value": "", + "type": "String", + "label": "Right key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Right" + }, + { + "value": "", + "type": "String", + "label": "Jump key", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Jump" + }, + { + "value": "", + "type": "Behavior", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "Platformer" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Multitouch joystick and buttons (sprite)", + "helpPath": "/objects/multitouch-joystick", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxNiIgcj0iMTMiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjI4LjQsMTIgMjAsMTIgMjAsMy42ICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMjAsMjguNCAyMCwyMCAyOC40LDIwICIvPg0KPHBvbHlsaW5lIGNsYXNzPSJzdDAiIHBvaW50cz0iMy42LDIwIDEyLDIwIDEyLDI4LjQgIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxMiwzLjYgMTIsMTIgMy42LDEyICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxNiw2IDE2LjcsNyAxNS4zLDcgIi8+DQo8cG9seWdvbiBjbGFzcz0ic3QwIiBwb2ludHM9IjE2LDI2IDE1LjMsMjUgMTYuNywyNSAiLz4NCjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iNiwxNiA3LDE1LjMgNywxNi43ICIvPg0KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIyNiwxNiAyNSwxNi43IDI1LDE1LjMgIi8+DQo8L3N2Zz4NCg==", + "name": "SpriteMultitouchJoystick", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Videogames/Videogames_controller_joystick_arrows_direction.svg", + "shortDescription": "Joysticks or buttons for touchscreens.", + "version": "1.2.2", + "description": [ + "Multitouch joysticks can be used the same way as physical gamepads:", + "- 4 or 8 directions", + "- Analogus pads", + "- Player selection", + "- Controls mapping for top-down movement and platformer characters", + "", + "There are ready-to-use joysticks in the asset-store [multitouch joysticks pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=multitouch-joysticks-multitouch-joysticks)." + ], + "origin": { + "identifier": "SpriteMultitouchJoystick", + "name": "gdevelop-extension-store" + }, + "tags": [ + "multitouch", + "joystick", + "thumbstick", + "controller", + "touchscreen", + "twin stick", + "shooter", + "virtual" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3", + "v0YRpdAnIucZFgiRCCecqVnGKno2", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Check if a button is pressed on a gamepad.", + "fullName": "Multitouch controller button pressed", + "functionType": "Condition", + "name": "IsButtonPressed", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a button is released on a gamepad.", + "fullName": "Multitouch controller button released", + "functionType": "Condition", + "name": "IsButtonReleased", + "sentence": "Button _PARAM2_ of multitouch controller _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "\"Released\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "supplementaryInformation": "[\"A\",\"CROSS\",\"B\",\"CIRCLE\",\"X\",\"SQUARE\",\"Y\",\"TRIANGLE\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"UP\",\"DOWN\",\"LEFT\",\"RIGHT\",\"BACK\",\"SHARE\",\"START\",\"OPTIONS\",\"CLICK_STICK_LEFT\",\"CLICK_STICK_RIGHT\",\"PS_BUTTON\",\"CLICK_TOUCHPAD\"]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change a button state for a multitouch controller.", + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark _PARAM2_ button as _PARAM3_ for multitouch controller _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Buttons[GetArgumentAsString(\"Button\")].State", + "=", + "GetArgumentAsString(\"ButtonState\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Button name", + "name": "Button", + "type": "string" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Action", + "name": "SetDeadZone", + "private": true, + "sentence": "Change the dead zone of multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone", + "=", + "GetArgumentAsNumber(\"DeadZoneRadius\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Dead zone radius", + "name": "DeadZoneRadius", + "supplementaryInformation": "[]", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the dead zone radius of a joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "Expression", + "name": "DeadZone", + "private": true, + "sentence": "Change multitouch joystick _PARAM2_ of multitouch controller _PARAM1_ dead zone to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].DeadZone)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom = 1, right = 2, top = 3) for an angle (in degrees).", + "fullName": "Angle to 4-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo4Way", + "private": true, + "sentence": "The angle _PARAM1_ 4-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(GetArgumentAsNumber(\"Angle\") * 4 / 360), 4)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the direction index (left = 1, bottom-left = 1... top-left = 7) for an angle (in degrees).", + "fullName": "Angle to 8-way index", + "functionType": "ExpressionAndCondition", + "name": "AngleTo8Way", + "private": true, + "sentence": "The angle _PARAM1_ 8-way index", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(round(GetArgumentAsNumber(\"Angle\") * 8 / 360), 8)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 4-way direction", + "functionType": "Condition", + "name": "IsAngleIn4WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 4-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "0", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "1", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "2", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo4Way" + }, + "parameters": [ + "", + "=", + "3", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if angle is in a given direction.", + "fullName": "Angle 8-way direction", + "functionType": "Condition", + "name": "IsAngleIn8WayDirection", + "private": true, + "sentence": "The angle _PARAM1_ is the 8-way direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "0", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"DownRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "1", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Down\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "2", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"DownLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "3", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "4", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"UpLeft\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "5", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"Up\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "6", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Direction\")", + "=", + "\"UpRight\"" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::AngleTo8Way" + }, + "parameters": [ + "", + "=", + "7", + "GetArgumentAsNumber(\"Angle\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Angle", + "name": "Angle", + "type": "expression" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsNumber(\"ControllerIdentifier\")", + "GetArgumentAsString(\"JoystickIdentifier\")", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the joystick has moved from center" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::JoystickForce" + }, + "parameters": [ + "", + ">", + "SpriteMultitouchJoystick::DeadZone(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsNumber(\"ControllerIdentifier\")", + "GetArgumentAsString(\"JoystickIdentifier\")", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "Joystick _PARAM2_ of multitouch controller _PARAM1_ force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the force of multitouch contoller stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "multitouch controller _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Stick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the percentage the thumb has been pulled away from the joystick center (Range: 0 to 1).", + "fullName": "Joystick force", + "functionType": "Action", + "name": "SetJoystickForce", + "private": true, + "sentence": "Change the force of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Force", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::StickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the multitouch controller stick is pointing towards (Range: -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the angle of the joystick _PARAM2_ of multitouch controller _PARAM1_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__MultitouchJoystick.Controllers[GetArgumentAsNumber(\"ControllerIdentifier\")].Joystick[GetArgumentAsString(\"JoystickIdentifier\")].Angle", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * cos(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the multitouch contoller stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "SpriteMultitouchJoystick::JoystickForce(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\")) * sin(ToRad(SpriteMultitouchJoystick::JoystickAngle(GetArgumentAsNumber(\"ControllerIdentifier\"), GetArgumentAsString(\"JoystickIdentifier\"))))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Multitouch controller identifier (1, 2, 3, 4...)", + "name": "ControllerIdentifier", + "type": "expression" + }, + { + "description": "Joystick name", + "name": "JoystickIdentifier", + "supplementaryInformation": "[\"Primary\",\"Secondary\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Joystick that can be controlled by interacting with a touchscreen.", + "fullName": "Multitouch Joystick", + "name": "MultitouchJoystick", + "objectType": "", + "private": true, + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetDeadZone" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyDeadZoneRadius()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasGameJustResumed" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Manage touches", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::Reset" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update joystick position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))", + "AngleBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(2 * DistanceBetweenPositions(Object.CenterX(), Object.CenterY(), TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0), TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)) / Object.Width(), 0, 1)", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickForce", + "name": "SetJoystickForce", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyJoystickForce()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Expression", + "name": "JoystickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the angle the joystick is pointing towards (Range: -180 to 180).", + "fullName": "Joystick angle", + "functionType": "Action", + "name": "SetJoystickAngle", + "private": true, + "sentence": "Change the joystick angle of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SetJoystickAngle" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "Object.Behavior::PropertyJoystickAngle()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * cos(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::JoystickForce() * sin(ToRad(Object.Behavior::JoystickAngle()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyDeadZoneRadius()" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn4WayDirection" + }, + "parameters": [ + "", + "Object.Behavior::JoystickAngle()", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyDeadZoneRadius()" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::IsAngleIn8WayDirection" + }, + "parameters": [ + "", + "Object.Behavior::JoystickAngle()", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a joystick is pressed.", + "fullName": "Joystick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Joystick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the joystick values (except for angle, which stays the same)", + "fullName": "Reset", + "functionType": "Action", + "name": "Reset", + "private": true, + "sentence": "Reset the joystick of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickForce" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier.", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyControllerIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyControllerIdentifier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyJoystickIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyJoystickIdentifier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius (range: 0 to 1) of the joystick. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyDeadZoneRadius()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetPropertyDeadZoneRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchJoystick", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "String", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DeadZoneRadius" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick angle (range: -180 to 180)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JoystickAngle" + }, + { + "value": "0", + "type": "Number", + "label": "Joystick force (range: 0 to 1)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JoystickForce" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIndex" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Detect button presses made on a touchscreen.", + "fullName": "Multitouch button", + "name": "MultitouchButton", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Idle\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyTouchIndex())" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Pressed\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::IsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetButtonState" + }, + "parameters": [ + "Object", + "Behavior", + "\"Released\"", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if button is released.", + "fullName": "Button released", + "functionType": "Condition", + "name": "IsReleased", + "sentence": "Button _PARAM0_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyIsReleased" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if button is pressed.", + "fullName": "Button pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Button _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchButton::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Button state", + "functionType": "Action", + "name": "SetButtonState", + "private": true, + "sentence": "Mark the button _PARAM0_ as _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SetButtonState" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyButtonIdentifier()", + "GetArgumentAsString(\"ButtonState\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::MultitouchButton", + "type": "behavior" + }, + { + "description": "Button state", + "name": "ButtonState", + "supplementaryInformation": "[\"Idle\",\"Pressed\",\"Released\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Button identifier", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ButtonIdentifier" + }, + { + "value": "0", + "type": "Number", + "label": "TouchID", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIndex" + }, + { + "value": "", + "type": "Boolean", + "label": "Button released", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsReleased" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a platformer character with a multitouch controller.", + "fullName": "Platformer multitouch controller mapper", + "name": "PlatformerMultitouchMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Property" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsButtonPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJumpButton()", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "Property" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::PlatformerMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platform character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "Property" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "Controls", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "A", + "type": "String", + "label": "Jump button name", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a multitouch controller.", + "fullName": "Top-down multitouch controller mapper", + "name": "TopDownMultitouchMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "SpriteMultitouchJoystick::StickAngle(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier())", + "sign(SpriteMultitouchJoystick::StickForce(Object.Behavior::PropertyControllerIdentifier(), Object.Behavior::PropertyJoystickIdentifier()))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::TopDownMultitouchMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"UpLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"UpRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"DownLeft\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControllerIdentifier()", + "Object.Behavior::PropertyJoystickIdentifier()", + "\"DownRight\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + }, + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SpriteMultitouchJoystick::TopDownMultitouchMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Top-down movement behavior", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "hidden": false, + "name": "TopDownMovement" + }, + { + "value": "1", + "type": "Number", + "label": "Controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "Analog", + "type": "Choice", + "label": "Stick mode", + "description": "", + "group": "Controls", + "extraInformation": [ + "Analog", + "360°", + "8 Directions" + ], + "hidden": false, + "name": "StickMode" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [ + { + "defaultName": "Joystick", + "description": "Joystick for touchscreens.", + "fullName": "Multitouch Joystick", + "name": "SpriteMultitouchJoystick", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Border", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Thumb", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Border", + "=", + "1" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Thumb", + "=", + "2" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Border", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "Thumb", + "=", + "0", + "=", + "0" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + }, + { + "type": { + "value": "SetIncludedInParentCollisionMask" + }, + "parameters": [ + "Thumb", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreAutour" + }, + "parameters": [ + "Thumb", + "Border", + "Border.MultitouchJoystick::JoystickForce() * Border.Width() / 2", + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onHotReloading", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::SpriteMultitouchJoystick::UpdateConfiguration" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Pass the object property values to the behavior.", + "fullName": "Update configuration", + "functionType": "Action", + "name": "UpdateConfiguration", + "private": true, + "sentence": "Update the configuration of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyControllerIdentifier()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyJoystickIdentifier()", + "" + ] + }, + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "Object.PropertyDeadZoneRadius()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "De/activate control of the joystick.", + "fullName": "De/activate control", + "functionType": "Action", + "name": "ActivateControl", + "sentence": "Activate control of _PARAM0_: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShouldActivate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Activate", + "name": "ShouldActivate", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a stick is pressed.", + "fullName": "Stick pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "Stick _PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsPressed" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "!=" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick force (from 0 to 1).", + "fullName": "Joystick force (deprecated)", + "functionType": "ExpressionAndCondition", + "name": "JoystickForce", + "private": true, + "sentence": "the joystick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the strick force (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickForce()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "ExpressionAndCondition", + "name": "StickForceX", + "sentence": "the stick X force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "ExpressionAndCondition", + "name": "StickForceY", + "sentence": "the stick Y force", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::StickForceY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the joystick is pointing towards (from -180 to 180).", + "fullName": "Joystick angle (deprecated)", + "functionType": "Expression", + "name": "JoystickAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle the stick is pointing towards (from -180 to 180).", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::JoystickAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (4-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed4Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed4Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if joystick is pushed in a given direction.", + "fullName": "Joystick pushed in a direction (8-way movement)", + "functionType": "Condition", + "name": "IsDirectionPushed8Way", + "sentence": "_PARAM0_ is pushed in direction _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::IsDirectionPushed8Way" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "GetArgumentAsString(\"Direction\")", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + }, + { + "description": "Direction", + "name": "Direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"UpLeft\",\"UpRight\",\"DownLeft\",\"DownRight\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the multitouch controller identifier (1, 2, 3, 4...).", + "fullName": "Multitouch controller identifier", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "ControllerIdentifier", + "sentence": "the multitouch controller identifier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyControllerIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "ControllerIdentifier", + "name": "SetControllerIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetControllerIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the joystick name of the object.", + "fullName": "Joystick name", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "JoystickIdentifier", + "sentence": "the joystick name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyJoystickIdentifier()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "JoystickIdentifier", + "name": "SetJoystickIdentifier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetJoystickIdentifier" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsString(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the dead zone radius of the joystick (range: 0 to 1). The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved).", + "fullName": "Dead zone radius", + "functionType": "ExpressionAndCondition", + "group": "Multitouch Joystick configuration", + "name": "DeadZoneRadius", + "sentence": "the dead zone radius", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Border.MultitouchJoystick::PropertyDeadZoneRadius()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DeadZoneRadius", + "name": "SetDeadZoneRadius", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SpriteMultitouchJoystick::MultitouchJoystick::SetDeadZoneRadius" + }, + "parameters": [ + "Border", + "MultitouchJoystick", + "=", + "GetArgumentAsNumber(\"Value\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Multitouch controller identifier (1, 2, 3, 4...)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControllerIdentifier" + }, + { + "value": "Primary", + "type": "Choice", + "label": "Joystick name", + "description": "", + "group": "", + "extraInformation": [ + "Primary", + "Secondary" + ], + "hidden": false, + "name": "JoystickIdentifier" + }, + { + "value": "0.4", + "type": "Number", + "label": "Dead zone radius (range: 0 to 1)", + "description": "The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved)", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DeadZoneRadius" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbAnchorOrigin" + }, + { + "value": "Center-center", + "type": "Number", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ThumbAnchorTarget" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [ + "Thumb" + ], + "hidden": true, + "name": "ThumbIsScaledProportionally" + }, + { + "value": "Center-center", + "type": "String", + "label": "", + "description": "Only used by the scene editor.", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ParentOrigin" + } + ], + "objects": [ + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Thumb", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "Border", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "MultitouchJoystick", + "type": "SpriteMultitouchJoystick::MultitouchJoystick", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "FloatingEnabled": false, + "DeadZoneRadius": 0.4, + "JoystickAngle": 0, + "JoystickForce": 0, + "TouchId": 0, + "TouchIndex": 0 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Thumb" + }, + { + "objectName": "Border" + } + ] + } + } + ] + }, + { + "author": "", + "category": "Camera", + "extensionNamespace": "", + "fullName": "Copy camera settings", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWxheWVycy10cmlwbGUtb3V0bGluZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiAxNi41NEwxOS4zNyAxMC44TDIxIDEyLjA3TDEyIDE5LjA3TDMgMTIuMDdMNC42MiAxMC44MUwxMiAxNi41NE0xMiAxNEwzIDdMMTIgMEwyMSA3TDEyIDE0TTEyIDIuNTNMNi4yNiA3TDEyIDExLjQ3TDE3Ljc0IDdMMTIgMi41M00xMiAyMS40N0wxOS4zNyAxNS43M0wyMSAxN0wxMiAyNEwzIDE3TDQuNjIgMTUuNzRMMTIgMjEuNDciIC8+PC9zdmc+", + "name": "CopyCameraSettings", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/layers-triple-outline.svg", + "shortDescription": "Copy the camera settings of a layer and apply them to another layer.", + "version": "1.0.0", + "description": [ + "Useful when multiple layers need to use the same camera values.", + "", + "How to use:", + "- Run the \"Copy camera settings\" action after all other camera actions have been performed", + "", + "Tips:", + "- Do not use on layers that implement a parallax effect" + ], + "origin": { + "identifier": "CopyCameraSettings", + "name": "gdevelop-extension-store" + }, + "tags": [ + "camera", + "clone", + "zoom", + "position", + "layer", + "angle", + "copy" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Copy camera settings of a layer and apply them to another layer.", + "fullName": "Copy camera settings", + "functionType": "Action", + "name": "CopyCameraSettings", + "sentence": "Copy camera settings of _PARAM1_ layer and apply them to _PARAM3_ layer (X position: _PARAM5_, Y position: _PARAM6_, Zoom: _PARAM7_, Angle: _PARAM8_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"CloneX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "CameraX(GetArgumentAsString(\"SourceLayer\"),GetArgumentAsNumber(\"SourceCamera\"))", + "GetArgumentAsString(\"DestinationLayer\")", + "GetArgumentAsNumber(\"DestinationCamera\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"CloneY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "CameraY(GetArgumentAsString(\"SourceLayer\"),GetArgumentAsNumber(\"SourceCamera\"))", + "GetArgumentAsString(\"DestinationLayer\")", + "GetArgumentAsNumber(\"DestinationCamera\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"CloneZoom\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "CameraZoom(GetArgumentAsString(\"SourceLayer\"),GetArgumentAsNumber(\"SourceCamera\"))", + "GetArgumentAsString(\"DestinationLayer\")", + "GetArgumentAsNumber(\"DestinationCamera\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"CloneAngle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraAngle" + }, + "parameters": [ + "", + "=", + "CameraAngle(GetArgumentAsString(\"SourceLayer\"),GetArgumentAsNumber(\"SourceCamera\"))", + "GetArgumentAsString(\"DestinationLayer\")", + "GetArgumentAsNumber(\"DestinationCamera\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Source layer", + "name": "SourceLayer", + "type": "layer" + }, + { + "description": "Source camera", + "name": "SourceCamera", + "type": "expression" + }, + { + "description": "Destination layer", + "name": "DestinationLayer", + "type": "layer" + }, + { + "description": "Destination camera", + "name": "DestinationCamera", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Clone X position", + "name": "CloneX", + "optional": true, + "type": "yesorno" + }, + { + "defaultValue": "yes", + "description": "Clone Y position", + "name": "CloneY", + "optional": true, + "type": "yesorno" + }, + { + "defaultValue": "yes", + "description": "Clone zoom", + "name": "CloneZoom", + "optional": true, + "type": "yesorno" + }, + { + "defaultValue": "yes", + "description": "Clone angle", + "name": "CloneAngle", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "Entropy", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Advanced platformer movements", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNOCwxMGwyLjgtMi44QzEyLDYsMTQsNiwxNS4yLDcuMmw3LjksNy45YzEuMSwxLjEsMi44LDEuMiw0LjEsMC4yTDMwLDEzIi8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTcsMTBsLTQuNyw0LjdjLTEuNSwxLjUtMSw0LjIsMSw1bDMuOSwxLjVjMS4xLDAuNCwxLjksMS41LDEuOSwyLjd2NiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE0LDIwbC0yLjYsMi42Yy0wLjgsMC44LTIuMSwwLjgtMi44LDBMNSwxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjE2IiB5MT0iMTgiIHgyPSIyMSIgeTI9IjEzIi8+DQo8L3N2Zz4NCg==", + "name": "AdvancedJump", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Sports and Fitness/Sports and Fitness_training_running_run.svg", + "shortDescription": "Let platformer characters: air jump, wall jump wall sliding, coyote time and dashing.", + "version": "0.1.2", + "description": [ + "This extension provides behaviors to:", + "", + "* Jump in mid-air", + "* Jump and slide against walls", + "* Dash horizontally", + "* Dash toward the floor", + "* Do coyote time, also known as \"ledge tolerance\". It lets players jumping even after their character is no longer touching the ground for a given amount of time. It aims to give players a feeling of control and reduce frustration.", + "", + "An example allows to check it out ([open the project online](https://editor.gdevelop.io/?project=example://platformer-moves))." + ], + "origin": { + "identifier": "AdvancedJump", + "name": "gdevelop-extension-store" + }, + "tags": [ + "platformer", + "platform", + "jump", + "ledge tolerance", + "coyote time", + "air jump", + "wall jump", + "wall sliding", + "dash", + "dive" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "JD2xwvKWgodlqsGiL1GCH3tDEwq1", + "q8ubdigLvIRXLxsJDDTaokO41mc2", + "UMcf9dzu8pVV84ZSLaGAtUB8PyF2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Let platformer characters jump shortly after leaving a platform and also jump in mid-air.", + "fullName": "Coyote time and air jump", + "name": "AdvancedJump", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Coyote time", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid any side effect if the feature is not used." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyCoyoteTimeFrameDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The timeframe is starting." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::AdvancedJump::PropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__CoyoteTime_CoyoteJump\"" + ] + }, + { + "type": { + "value": "PlatformBehavior::SetCanJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyCanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Start\"", + "\"info\"", + "\"CoyoteTime\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyCanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The timeframe is missed." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__CoyoteTime_CoyoteJump\"", + ">=", + "Object.Behavior::PropertyCoyoteTimeFrameDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCanNotAirJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyCanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"End\"", + "\"info\"", + "\"CoyoteTime\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Coyote jump" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyCanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Coyote jump\"", + "\"info\"", + "\"CoyoteTime\"" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The new value will be used next frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::UpdateWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Air Jump", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "While in the coyote jump frame, the Object is treated as being on the floor. No air jump can happen." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "inverted": true, + "value": "AdvancedJump::AdvancedJump::CanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyAreFloorJumpCountedAsAirJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Floor jump: \" + ToString(Object.Behavior::PropertyAirJumpCountMaximum() - Object.Behavior::PropertyAirJumpCount()) + \" + 0\"", + "\"info\"", + "\"AirJump\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the object fall, it doesn't jump but air jumps must be allowed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Falling\"", + "\"info\"", + "\"AirJump\"" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The order of these events is important because the idle state is:\non the floor and jump key released but the 1st jump must not count." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Jump\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Jump released: \" + ToString(Object.Behavior::PropertyAirJumpCountMaximum() - Object.Behavior::PropertyAirJumpCount()) + \" + 0\"", + "\"info\"", + "\"AirJump\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset air jump counter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Reset air jump counter\"", + "\"info\"", + "\"AirJump\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow air jumps." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::CanJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyAirJumpCountMaximum()" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SetCanJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Jump allowed: \" + ToString(Object.Behavior::PropertyAirJumpCountMaximum() - Object.Behavior::PropertyAirJumpCount()) + \" + 1\"", + "\"info\"", + "\"AirJump\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::UpdateWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__CoyoteTime_CoyoteJump\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Coyote time was disabled, so WasInTheAir may not have been updated for a long time." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::UpdateWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the coyote time duration of an object (in seconds).", + "fullName": "Coyote timeframe", + "functionType": "Action", + "group": "Coyote time", + "name": "SetCoyoteTime", + "sentence": "Change coyote time of _PARAM0_: _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Coyote time was disabled, so WasInTheAir may not have been updated for a long time." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyCoyoteTimeFrameDuration" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::UpdateWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyCoyoteTimeFrameDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CoyoteTime\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + }, + { + "description": "Duration", + "longDescription": "Coyote time duration in seconds.", + "name": "CoyoteTime", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a coyote jump can currently happen.", + "fullName": "Can coyote jump", + "functionType": "Condition", + "group": "Coyote time", + "name": "CanCoyoteJump", + "sentence": "_PARAM0_ can coyote jump", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyCanCoyoteJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Update WasInTheAir", + "functionType": "Action", + "group": "Coyote time", + "name": "UpdateWasInTheAir", + "private": true, + "sentence": "Update WasInTheAir property of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsGrabbingPlatform" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Number of jumps in mid-air that are allowed.", + "fullName": "Maximal jump number", + "functionType": "Expression", + "group": "Air jump", + "name": "AirJumpsMax", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyAirJumpCountMaximum()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Number of jumps in mid-air that are still allowed.", + "fullName": "Remaining jump", + "functionType": "Expression", + "group": "Air jump", + "name": "RemainingAirJumps", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::CanJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "max(0, Object.Behavior::PropertyAirJumpCountMaximum() - Object.Behavior::PropertyAirJumpCount())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the jump is allowed but not yet done, it must not be counted." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CanJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "clamp(1 + Object.Behavior::PropertyAirJumpCountMaximum() - Object.Behavior::PropertyAirJumpCount(), 0, Object.Behavior::PropertyAirJumpCountMaximum())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the number of times the character can jump in mid-air.", + "fullName": "Air jumps", + "functionType": "Action", + "group": "Air jump", + "name": "SetAirJumpCountMaximum", + "sentence": "Change the number of times _PARAM0_ can jump in mid-air: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCountMaximum" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"AirJumpCountMaximum\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + }, + { + "description": "Number of air jumps", + "name": "AirJumpCountMaximum", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remove one of the remaining air jumps of a character.", + "fullName": "Remove a remaining air jump", + "functionType": "Action", + "group": "Air jump", + "name": "RemoveOneRemainingAirJump", + "sentence": "Remove one of the remaining air jumps of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid to jump again before the current jump input ends." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Jump\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Allow back all air jumps of a character.", + "fullName": "Reset air jumps", + "functionType": "Action", + "group": "Air jump", + "name": "ResetAirJumpCounter", + "sentence": "Allow back all air jumps of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyAirJumpCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This avoid to give an extra jump if the character was already allowed to jump in mid-air." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCanNotAirJump" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid to jump again before the current jump input ends." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Jump\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::SetPropertyWasJumpKeyReleased" + }, + "parameters": [ + "Object", + "Behavior", + "False" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if floor jumps are counted as air jumps for an object.", + "fullName": "Floor jumps count as air jumps", + "functionType": "Condition", + "group": "Air jump", + "name": "AreFloorJumpCountedAsAirJump", + "sentence": "Floor jumps count as air jumps for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::AdvancedJump::PropertyAreFloorJumpCountedAsAirJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::AdvancedJump", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerBehavior" + }, + { + "value": "0.25", + "type": "Number", + "unit": "Second", + "label": "Coyote time duration", + "description": "", + "group": "Coyote time", + "extraInformation": [], + "hidden": false, + "name": "CoyoteTimeFrameDuration" + }, + { + "value": "", + "type": "Boolean", + "label": "Can coyote jump", + "description": "", + "group": "Coyote time", + "extraInformation": [], + "hidden": true, + "name": "CanCoyoteJump" + }, + { + "value": "", + "type": "Boolean", + "label": "Was in the air", + "description": "", + "group": "Coyote time", + "extraInformation": [], + "hidden": true, + "name": "WasInTheAir" + }, + { + "value": "1", + "type": "Number", + "label": "Number of air jumps", + "description": "", + "group": "Air jump", + "extraInformation": [], + "hidden": false, + "name": "AirJumpCountMaximum" + }, + { + "value": "", + "type": "Boolean", + "label": "Floor jumps count as air jumps", + "description": "", + "group": "Air jump", + "extraInformation": [], + "hidden": false, + "name": "AreFloorJumpCountedAsAirJump" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "Air jump", + "extraInformation": [], + "hidden": true, + "name": "AirJumpCount" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "Air jump", + "extraInformation": [], + "hidden": true, + "name": "WasJumpKeyReleased" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Let platformer characters jump and slide against walls.", + "fullName": "Wall jump", + "name": "WallJump", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Jump\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Avoid a jump from the floor to do a wall jump because of the allowed timeframe." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::RememberJumpKeyPressed" + }, + "parameters": [ + "Object", + "Behavior", + "\"Jump\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset default character configuration when a jump that is not a wall jump happens (for instance an air jump)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyHasJustWallJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::ToggleSideSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "To know when jumping from the floor or not." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWasInTheAir" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wall jump end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset default character configuration when the character change of direction or start to fall." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::ToggleSideSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wall detection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the character tries to move but can't actually move, it's against a wall." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyPreviousX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::RememberIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the previous position for the wall detection." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyPreviousX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wall jump", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyHasJustWallJump" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::WasAgainstWall" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyJumpTimeFrame()", + "" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "To be permissive, when the jump key was pressed right before the character touch the wall,\nit is still detected as a wall jump which reset the air jump counter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::WasJumpKeyPressed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyJumpTimeFrame()", + "\"Jump\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::ForgetJumpKeyPressed" + }, + "parameters": [ + "Object", + "Behavior", + "\"Jump\"", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::SetCanJump" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::ToggleSideSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::ForgetIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyHasJustWallJump" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_TimeFromJumpStart\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "-Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Wall jump\"", + "\"info\"", + "\"WallJump\"" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Sustain jump speed", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_TimeFromJumpStart\"", + "<=", + "Object.Behavior::PropertySideSpeedSustainTime()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "-Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsJumpingLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Wall sliding", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyMovedAwayFromTheWall" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyMovedAwayFromTheWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::AbsorbFallingSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyWallSlidingSpeedAbsorption()", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyMovedAwayFromTheWall" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Absob speed\"", + "\"info\"", + "\"WallJump\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SlideOnWall" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyAutomaticSliding" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::WallJump::PropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SlideOnWall" + }, + "parameters": [ + "Object", + "Behavior", + "no", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object has just wall jumped.", + "fullName": "Has just wall jumped", + "functionType": "Condition", + "name": "HasJustWallJumped", + "sentence": "_PARAM0_ has just jumped from a wall", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyHasJustWallJump" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is wall jumping.", + "fullName": "Is wall jumping", + "functionType": "Condition", + "name": "IsWallJumping", + "sentence": "_PARAM0_ jumped from a wall", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsWallJumping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is against a wall.", + "fullName": "Against a wall", + "functionType": "Condition", + "name": "IsAgaintWall", + "sentence": "_PARAM0_ is against a wall", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::WallJump::PropertyIsAgainstWall" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remember that the character was against a wall.", + "fullName": "Remember is against wall", + "functionType": "Action", + "group": "Private", + "name": "RememberIsAgainstWall", + "private": true, + "sentence": "_PARAM0_ remembers having been against a wall", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_IsAgainstWall\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Forget that the character was against a wall.", + "fullName": "Forget is against wall", + "functionType": "Action", + "group": "Private", + "name": "ForgetIsAgainstWall", + "private": true, + "sentence": "_PARAM0_ forgets to had been against a wall", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_IsAgainstWall\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remember that the character was against a wall within the time frame.", + "fullName": "Was against wall", + "functionType": "Condition", + "group": "Private", + "name": "WasAgainstWall", + "private": true, + "sentence": "_PARAM0_ remembers to had been against a wall within _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_IsAgainstWall\"", + "<=", + "GetArgumentAsNumber(\"TimeFrame\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Time frame", + "longDescription": "The time frame in seconds.", + "name": "TimeFrame", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remember that the jump key was pressed.", + "fullName": "Remember key pressed", + "functionType": "Action", + "group": "Private", + "name": "RememberJumpKeyPressed", + "private": true, + "sentence": "_PARAM0_ remembers the _PARAM2_ key was pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_KeyPressed_\" + GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Key", + "name": "Key", + "supplementaryInformation": "[\"Jump\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Forget that the jump key was pressed.", + "fullName": "Forget key pressed", + "functionType": "Action", + "group": "Private", + "name": "ForgetJumpKeyPressed", + "private": true, + "sentence": "_PARAM0_ forgets the _PARAM2_ key was pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_KeyPressed_\" + GetArgumentAsString(\"Key\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "", + "name": "Key", + "supplementaryInformation": "[\"Jump\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the key was pressed within the time frame.", + "fullName": "Remember key pressed", + "functionType": "Condition", + "group": "Private", + "name": "WasJumpKeyPressed", + "private": true, + "sentence": "_PARAM0_ remembers _PARAM3_ key was pressed within _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__WallJump_KeyPressed_\" + GetArgumentAsString(\"Key\")", + "<=", + "GetArgumentAsNumber(\"TimeFrame\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Time frame", + "longDescription": "The time frame in seconds.", + "name": "TimeFrame", + "type": "expression" + }, + { + "description": "", + "name": "Key", + "supplementaryInformation": "[\"Jump\",\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Enable side speed.", + "fullName": "Toggle side speed", + "functionType": "Action", + "group": "Private", + "name": "ToggleSideSpeed", + "private": true, + "sentence": "Enable side speed for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't save the wrong acceleration and speed if the action is called 2 times with true." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableSideSpeed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureAcceleration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyWallJumpAccelerationX()", + "\"WallJumpLeap\"", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::MaxSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "<", + "Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureMaxSpeed" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyWallJumpSpeedX()", + "\"WallJumpLeap\"", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't do it if speed wasn't saved by the previous event at some point." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableSideSpeed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"WallJumpLeap\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Enable side speed", + "name": "EnableSideSpeed", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable wall sliding.", + "fullName": "Slide on wall", + "functionType": "Action", + "group": "Private", + "name": "SlideOnWall", + "private": true, + "sentence": "Enable wall sliding for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't save the wrong gravity and maximum speed if the action is called 2 times with true." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableWallSliding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureGravity" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyWallSlidingGravity()", + "\"WallJumpSliding\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureMaxFallSpeed" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyWallSlidingMaxFallingSpeed()", + "\"WallJumpSliding\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't do it if gravity wasn't saved by the previous event at some point." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableWallSliding\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"WallJumpSliding\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Enable wall sliding", + "name": "EnableWallSliding", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Absorb falling speed of an object.", + "fullName": "Absorb falling speed", + "functionType": "Action", + "group": "Private", + "name": "AbsorbFallingSpeed", + "private": true, + "sentence": "Absorb falling speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::AbortJump" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentFallSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "max(Object.Behavior::PropertyWallSlidingFallingSpeedMin(), Object.PlatformerCharacter::CurrentFallSpeed() - Object.PlatformerCharacter::CurrentJumpSpeed() - GetArgumentAsNumber(\"SpeedAbsorption\")) + Object.PlatformerCharacter::CurrentJumpSpeed()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Speed absorption (in pixels per second)", + "name": "SpeedAbsorption", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The wall jump detection time frame of an object (in seconds).", + "fullName": "Jump time frame", + "functionType": "Expression", + "group": "Wall jump configuration", + "name": "JumpTimeFrame", + "sentence": "Change the wall jump detection time frame of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyJumpTimeFrame()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the wall jump detection time frame of an object (in seconds).", + "fullName": "Jump time frame", + "functionType": "Action", + "group": "Wall jump configuration", + "name": "SetJumpTimeFrame", + "sentence": "Change the wall jump detection time frame of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyJumpTimeFrame" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"JumpTimeFrame\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Jump detection time frame (in seconds)", + "name": "JumpTimeFrame", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "The side speed of wall jumps of an object (in pixels per second).", + "fullName": "Side speed", + "functionType": "Expression", + "group": "Wall jump configuration", + "name": "WallJumpSpeedX", + "sentence": "Change the side speed of wall jumps of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWallJumpSpeedX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the side speed of wall jumps of an object (in pixels per second).", + "fullName": "Side speed", + "functionType": "Action", + "group": "Wall jump configuration", + "name": "SetWallJumpSpeedX", + "sentence": "Change the side speed of wall jumps of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWallJumpSpeedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WallJumpSpeedX\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Side speed", + "name": "WallJumpSpeedX", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The side acceleration of wall jumps of an object (in pixels per second per second).", + "fullName": "Side acceleration", + "functionType": "Expression", + "group": "Wall jump configuration", + "name": "WallJumpAccelerationX", + "sentence": "Change the side acceleration of wall jumps of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWallJumpAccelerationX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the side acceleration of wall jumps of an object (in pixels per second per second).", + "fullName": "Side acceleration", + "functionType": "Action", + "group": "Wall jump configuration", + "name": "SetWallJumpAccelerationX", + "sentence": "Change the side acceleration of wall jumps of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWallJumpAccelerationX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WallJumpAccelerationX\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Side acceleration", + "name": "WallJumpAccelerationX", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The wall sliding gravity of an object (in pixels per second per second).", + "fullName": "Gravity", + "functionType": "Expression", + "group": "Wall sliding configuration", + "name": "WallSlidingGravity", + "sentence": "Change the wall sliding gravity of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWallSlidingGravity()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the wall sliding gravity of an object (in pixels per second per second).", + "fullName": "Gravity", + "functionType": "Action", + "group": "Wall sliding configuration", + "name": "SetWallSlidingGravity", + "sentence": "Change the wall sliding gravity of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWallSlidingGravity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WallSlidingGravity\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Gravity", + "name": "WallSlidingGravity", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The wall sliding maximum falling speed of an object (in pixels per second).", + "fullName": "Maximum falling speed", + "functionType": "Expression", + "group": "Wall sliding configuration", + "name": "WallSlidingMaxFallingSpeed", + "sentence": "Change the wall sliding maximum falling speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWallSlidingMaxFallingSpeed()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the wall sliding maximum falling speed of an object (in pixels per second).", + "fullName": "Maximum falling speed", + "functionType": "Action", + "group": "Wall sliding configuration", + "name": "SetWallSlidingMaxFallingSpeed", + "sentence": "Change the wall sliding maximum falling speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWallSlidingGravity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WallSlidingMaxFallingSpeed\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Maximum falling speed", + "name": "WallSlidingMaxFallingSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the impact speed absorption of an object.", + "fullName": "Impact speed absorption", + "functionType": "Expression", + "group": "Wall sliding configuration", + "name": "WallSlidingSpeedAbsorption", + "sentence": "Change the impact speed absorption of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWallSlidingSpeedAbsorption()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the impact speed absorption of an object.", + "fullName": "Impact speed absorption", + "functionType": "Action", + "group": "Wall sliding configuration", + "name": "SetWallSlidingSpeedAbsorption", + "sentence": "Change the impact speed absorption of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::WallJump::SetPropertyWallSlidingSpeedAbsorption" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Firebase::GetRemoteConfigNumber(\"WallSlidingSpeedAbsorption\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::WallJump", + "type": "behavior" + }, + { + "description": "Impact speed absorption", + "name": "WallSlidingSpeedAbsorption", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "", + "type": "Behavior", + "label": "Platformer character configuration stack", + "description": "", + "group": "", + "extraInformation": [ + "AdvancedJump::PlatformerConfigurationStack" + ], + "hidden": false, + "name": "PlatformerConfigurationStack" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Jump detection time frame", + "description": "", + "group": "Wall jump", + "extraInformation": [], + "hidden": false, + "name": "JumpTimeFrame" + }, + { + "value": "250", + "type": "Number", + "unit": "PixelSpeed", + "label": "Side speed", + "description": "", + "group": "Wall jump", + "extraInformation": [], + "hidden": false, + "name": "WallJumpSpeedX" + }, + { + "value": "1500", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Side acceleration", + "description": "", + "group": "Wall jump", + "extraInformation": [], + "hidden": false, + "name": "WallJumpAccelerationX" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Side speed sustain time", + "description": "", + "group": "Wall jump", + "extraInformation": [], + "hidden": false, + "name": "SideSpeedSustainTime" + }, + { + "value": "500", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Gravity", + "description": "", + "group": "Wall sliding", + "extraInformation": [], + "hidden": false, + "name": "WallSlidingGravity" + }, + { + "value": "350", + "type": "Number", + "unit": "PixelSpeed", + "label": "Maximum falling speed", + "description": "", + "group": "Wall sliding", + "extraInformation": [], + "hidden": false, + "name": "WallSlidingMaxFallingSpeed" + }, + { + "value": "350", + "type": "Number", + "unit": "PixelSpeed", + "label": "Impact speed absorption", + "description": "", + "group": "Wall sliding", + "extraInformation": [], + "hidden": false, + "name": "WallSlidingSpeedAbsorption" + }, + { + "value": "50", + "type": "Number", + "unit": "PixelSpeed", + "label": "Minimal falling speed", + "description": "", + "group": "Wall sliding", + "extraInformation": [], + "hidden": false, + "name": "WallSlidingFallingSpeedMin" + }, + { + "value": "", + "type": "Boolean", + "label": "Keep sliding without holding a key", + "description": "", + "group": "Wall sliding", + "extraInformation": [], + "hidden": false, + "name": "AutomaticSliding" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "PreviousX" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsAgainstWall" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WasLeftOrRightPressed" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsWallJumping" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsJumpingLeft" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WasInTheAir" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HasJustWallJump" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MovedAwayFromTheWall" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make platformer characters dash toward the floor.", + "fullName": "Dive dash", + "name": "DiveDash", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Revert default configuration" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "AdvancedJump::DiveDash::PropertyIsDiving" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"DiveDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::DiveDash::SetPropertyIsDiving" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::DiveDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of dive key to make the object dives to the floor if it can dive.", + "fullName": "Simulate dive key", + "functionType": "Action", + "name": "SimulateDiveKey", + "sentence": "Simulate pressing dive key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Vertical dash to smash the ground" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::DiveDash::CanDive" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::AbortJump" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureMaxFallSpeed" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDiveMaxFallingSpeed()", + "\"DiveDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureGravity" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDiveGravity()", + "\"DiveDash\"", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentFallSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "Object.Behavior::PropertyDiveInitialFallingSpeed()" + ] + }, + { + "type": { + "value": "AdvancedJump::DiveDash::SetPropertyIsDiving" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::DiveDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object can dive.", + "fullName": "Can dive", + "functionType": "Condition", + "name": "CanDive", + "sentence": "_PARAM0_ can dive", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": { + "inverted": true, + "value": "AdvancedJump::DiveDash::PropertyIsDiving" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::DiveDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is diving.", + "fullName": "Is diving", + "functionType": "Condition", + "name": "IsDiving", + "sentence": "_PARAM0_ is diving", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::DiveDash::PropertyIsDiving" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::DiveDash", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "", + "type": "Behavior", + "label": "Platformer character configuration stack", + "description": "", + "group": "", + "extraInformation": [ + "AdvancedJump::PlatformerConfigurationStack" + ], + "hidden": false, + "name": "PlatformerConfigurationStack" + }, + { + "value": "3000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Maximum falling speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DiveMaxFallingSpeed" + }, + { + "value": "1000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Initial falling speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DiveInitialFallingSpeed" + }, + { + "value": "8000", + "type": "Number", + "unit": "PixelAcceleration", + "label": "Gravity", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DiveGravity" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsDiving" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Make platformer characters dash horizontally.", + "fullName": "Horizontal dash", + "name": "HorizontalDash", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyLastDirectionIsLeft" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyLastDirectionIsLeft" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::HorizontalDash::IsDashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "AdvancedJump::HorizontalDash::PropertyDashKeyIsPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "inverted": true, + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_CoolDown\"", + "<", + "Object.Behavior::PropertyCoolDownDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyCanDash" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::IsDashing" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"HorizontalDashGravity\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Sustain" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::PropertyIsSustainning" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Sustain: \" + ToString(Object.PlatformerCharacter::CurrentSpeed())", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_SustainTime\"", + ">", + "Object.Behavior::PropertyDashSustainDurationMax()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::HorizontalDash::PropertyDashKeyIsPressed" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_SustainTime\"", + "<=", + "Object.Behavior::PropertyDashSustainDurationMin()" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyIsSustainning" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureDeceleration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDashDecceleration()", + "\"HorizontalDash\"", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureGravity" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDashGravity()", + "\"HorizontalDashGravity\"", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Sustain end\"", + "", + "" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "After sustain" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::HorizontalDash::PropertyIsSustainning" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "ToString(Object.PlatformerCharacter::CurrentSpeed())", + "", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Dashing end" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "<=", + "Object.PlatformerConfigurationStack::UsualMaxSpeed()" + ] + }, + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + ">=", + "-Object.PlatformerConfigurationStack::UsualMaxSpeed()" + ] + } + ], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::AbortDash" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Dash end\"", + "", + "" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyDashKeyIsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::HorizontalDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Simulate a press of dash key.", + "fullName": "Simulate dash key", + "functionType": "Action", + "name": "SimulateDashKey", + "sentence": "Simulate pressing dash key for _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyDashKeyIsPressed" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::PropertyCanDash" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_SustainTime\"" + ] + }, + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyIsSustainning" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::AbortJump" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentFallSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "0" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureGravity" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDashSustainGravity()", + "\"HorizontalDashGravity\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureMaxSpeed" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDashSustainSpeedMax()", + "\"HorizontalDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureAcceleration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "Object.Behavior::PropertyDashSustainAcceleration()", + "\"HorizontalDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureDeceleration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "0", + "\"HorizontalDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::HorizontalDash::SetPropertyCanDash" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AdvancedJump::HorizontalDash::PropertyLastDirectionIsLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "-Object.Behavior::PropertyDashInitialSpeed()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "AdvancedJump::HorizontalDash::PropertyLastDirectionIsLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "Object.Behavior::PropertyDashInitialSpeed()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Dash start\"", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::HorizontalDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is dashing.", + "fullName": "Is dashing", + "functionType": "Condition", + "name": "IsDashing", + "sentence": "_PARAM0_ is dashing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_SustainTime\"", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::HorizontalDash", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Abort the current dash and set the object to its usual horizontal speed.", + "fullName": "Abort dash", + "functionType": "Action", + "name": "AbortDash", + "sentence": "Abort the current dash of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"HorizontalDash\"", + "" + ] + }, + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::RevertConfiguration" + }, + "parameters": [ + "Object", + "PlatformerConfigurationStack", + "\"HorizontalDashGravity\"", + "" + ] + }, + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_SustainTime\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlatformerDash_CoolDown\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "-Object.PlatformerConfigurationStack::UsualMaxSpeed()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::CurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::SetCurrentSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "Object.PlatformerConfigurationStack::UsualMaxSpeed()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Dash end\"", + "", + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::HorizontalDash", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "", + "type": "Behavior", + "label": "Platformer charcacter configuration stack", + "description": "", + "group": "", + "extraInformation": [ + "AdvancedJump::PlatformerConfigurationStack" + ], + "hidden": false, + "name": "PlatformerConfigurationStack" + }, + { + "value": "500", + "type": "Number", + "label": "Initial speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DashInitialSpeed" + }, + { + "value": "0", + "type": "Number", + "label": "Sustain minimum duration", + "description": "", + "group": "Sustain", + "extraInformation": [], + "hidden": false, + "name": "DashSustainDurationMin" + }, + { + "value": "0.25", + "type": "Number", + "label": "Sustain maxiumum duration", + "description": "", + "group": "Sustain", + "extraInformation": [], + "hidden": false, + "name": "DashSustainDurationMax" + }, + { + "value": "1500", + "type": "Number", + "label": "Sustain acceleration", + "description": "", + "group": "Sustain", + "extraInformation": [], + "hidden": false, + "name": "DashSustainAcceleration" + }, + { + "value": "750", + "type": "Number", + "label": "Sustain maxiumum speed", + "description": "", + "group": "Sustain", + "extraInformation": [], + "hidden": false, + "name": "DashSustainSpeedMax" + }, + { + "value": "0", + "type": "Number", + "label": "Sustain gravity", + "description": "", + "group": "Sustain", + "extraInformation": [], + "hidden": false, + "name": "DashSustainGravity" + }, + { + "value": "3000", + "type": "Number", + "label": "Decceleration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DashDecceleration" + }, + { + "value": "1000", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "DashGravity" + }, + { + "value": "0.25", + "type": "Number", + "label": "Cool down duration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "CoolDownDuration" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LastDirectionIsLeft" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DashKeyIsPressed" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsSustainning" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CanDash" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Resolve conflict between platformer character configuration changes.", + "fullName": "Platformer character configuration stack", + "name": "PlatformerConfigurationStack", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "/** @type {gdjs.PlatformerObjectRuntimeBehavior} */", + "const character = object.getBehavior(behavior._getPlatformerCharacter());", + "", + "behavior.__settingNames = behavior.__settingNames || [\"gravity\", \"maxFallSpeed\", \"jumpSpeed\", \"jumpSustainTime\", \"acceleration\", \"deceleration\", \"maxSpeed\"];", + "", + "/** @type {{id:string, gravity: float, maxFallSpeed: float, jumpSpeed: float, jumpSustainTime: float, acceleration: float, deceleration: float, maxSpeed: float}[]} */", + "const configurationChanges = [];", + "behavior.__configurationChanges = configurationChanges;", + "// Add the default configuration", + "configurationChanges.push(({", + " id: undefined,", + " gravity: character.getGravity(),", + " maxFallSpeed: character.getMaxFallingSpeed(),", + " jumpSpeed: character.getJumpSpeed(),", + " jumpSustainTime: character.getJumpSustainTime(),", + " acceleration: character.getAcceleration(),", + " deceleration: character.getDeceleration(),", + " maxSpeed: character.getMaxSpeed()", + "}));", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Revert configuration changes for one identifier and update the character configuration to use the most recent ones.", + "fullName": "Revert configuration", + "functionType": "Action", + "name": "RevertConfiguration", + "sentence": "Revert configuration changes: _PARAM2_ on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "/** @type {gdjs.PlatformerObjectRuntimeBehavior} */", + "const character = object.getBehavior(behavior._getPlatformerCharacter());", + "/** @type {string} */", + "const id = eventsFunctionContext.getArgument(\"Identifier\");", + "", + "if (id === undefined) {", + " return;", + "}", + "", + "/** @type {{id:string, gravity: float, maxFallSpeed: float, jumpSpeed: float, jumpSustainTime: float, acceleration: float, deceleration: float, maxSpeed: float}[]} */", + "const configurationChanges = behavior.__configurationChanges || [];", + "", + "const index = configurationChanges.findIndex(value => value.id === id);", + "if (index >= 0) {", + " configurationChanges.splice(index, 1);", + "", + " // Update the configuration with the most recent changes.", + " /** @type {string[]} */", + " const settingNames = behavior.__settingNames;", + " for (const settingName of settingNames) {", + " const configuration = configurationChanges.find(value => value[settingName] !== undefined);", + " const settingValue = configuration[settingName];", + " // Methods can't be stored because the character instance could change.", + " switch (settingName) {", + " case \"gravity\":", + " character.setGravity(settingValue);", + " break;", + " case \"maxFallSpeed\":", + " character.setMaxFallingSpeed(settingValue);", + " break;", + " case \"jumpSpeed\":", + " character.setJumpSpeed(settingValue);", + " break;", + " case \"jumpSustainTime\":", + " character.setJumpSustainTime(settingValue);", + " break;", + " case \"acceleration\":", + " character.setAcceleration(settingValue);", + " break;", + " case \"deceleration\":", + " character.setDeceleration(settingValue);", + " break;", + " case \"maxSpeed\":", + " character.setMaxSpeed(settingValue);", + " break;", + " }", + " }", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the character property value when no change applies on it.", + "fullName": "Setting", + "functionType": "Expression", + "name": "UsualSetting", + "private": true, + "sentence": "Configure the _PARAM2_ of _PARAM0_: _PARAM3_ with the identifier: _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "/** @type {gdjs.PlatformerObjectRuntimeBehavior} */", + "const character = object.getBehavior(behavior._getPlatformerCharacter());", + "/** @type {string} */", + "const settingName = eventsFunctionContext.getArgument(\"SettingName\");", + "/** @type {float} */", + "const settingValue = eventsFunctionContext.getArgument(\"SettingValue\");", + "/** @type {string} */", + "const id = eventsFunctionContext.getArgument(\"Identifier\");", + "", + "/** @type {{id:string, gravity: float, maxFallSpeed: float, jumpSpeed: float, jumpSustainTime: float, acceleration: float, deceleration: float, maxSpeed: float}[]} */", + "const configurationChanges = behavior.__configurationChanges || [];", + "", + "eventsFunctionContext.returnValue = configurationChanges[configurationChanges.length - 1][settingName];", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "", + "name": "SettingName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Return the usual maximum horizontal speed when no configuration change applies on it.", + "fullName": "Usual maximum horizontal speed", + "functionType": "Expression", + "name": "UsualMaxSpeed", + "sentence": "Configure the maximum horizontal speed of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::UsualSetting(\"maxSpeed\")" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Configure a character property for a given configuration layer and move this layer on top.", + "fullName": "Configure setting", + "functionType": "Action", + "name": "ConfigureSetting", + "private": true, + "sentence": "Configure the _PARAM2_ of _PARAM0_: _PARAM3_ with the identifier: _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const behaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const object = objects[0];", + "const behavior = object.getBehavior(behaviorName);", + "/** @type {gdjs.PlatformerObjectRuntimeBehavior} */", + "const character = object.getBehavior(behavior._getPlatformerCharacter());", + "/** @type {string} */", + "const settingName = eventsFunctionContext.getArgument(\"SettingName\");", + "/** @type {float} */", + "const settingValue = eventsFunctionContext.getArgument(\"SettingValue\");", + "/** @type {string} */", + "const id = eventsFunctionContext.getArgument(\"Identifier\");", + "", + "/** @type {{id:string, gravity: float, maxFallSpeed: float, jumpSpeed: float, jumpSustainTime: float, acceleration: float, deceleration: float, maxSpeed: float}[]} */", + "const configurationChanges = behavior.__configurationChanges || [];", + "", + "const index = configurationChanges.findIndex(value => value.id === id);", + "let configurationChange;", + "if (index < 0) {", + " configurationChange = {id:id, gravity: undefined, maxFallSpeed: undefined, jumpSpeed: undefined, jumpSustainTime: undefined, acceleration: undefined, deceleration: undefined, maxSpeed: undefined}", + " configurationChanges.splice(0, 0, configurationChange);", + "}", + "else {", + " configurationChange = configurationChanges[index];", + " // Move the configuration change on top", + " if (index > 0) {", + " configurationChanges.splice(index, 1);", + " configurationChanges.splice(0, 0, configurationChange);", + " }", + "}", + "configurationChange[settingName] = settingValue;", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "", + "name": "SettingName", + "type": "string" + }, + { + "description": "Setting value", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Configure character gravity for a given configuration layer and move this layer on top.", + "fullName": "Configure gravity", + "functionType": "Action", + "name": "ConfigureGravity", + "sentence": "Configure the gravity of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureSetting" + }, + "parameters": [ + "Object", + "Behavior", + "\"gravity\"", + "GetArgumentAsNumber(\"SettingValue\")", + "GetArgumentAsString(\"Identifier\")", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::Gravity" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "GetArgumentAsNumber(\"SettingValue\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Gravity", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Configure character deceleration for a given configuration layer and move this layer on top.", + "fullName": "Configure horizontal deceleration", + "functionType": "Action", + "name": "ConfigureDeceleration", + "sentence": "Configure the horizontal deceleration of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureSetting" + }, + "parameters": [ + "Object", + "Behavior", + "\"deceleration\"", + "GetArgumentAsNumber(\"SettingValue\")", + "GetArgumentAsString(\"Identifier\")", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::Deceleration" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "GetArgumentAsNumber(\"SettingValue\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Acceleration", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Configure character maximum speed for a given configuration layer and move this layer on top.", + "fullName": "Configure maximum horizontal speed", + "functionType": "Action", + "name": "ConfigureMaxSpeed", + "sentence": "Configure the maximum horizontal speed of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureSetting" + }, + "parameters": [ + "Object", + "Behavior", + "\"maxSpeed\"", + "GetArgumentAsNumber(\"SettingValue\")", + "GetArgumentAsString(\"Identifier\")", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::MaxSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "GetArgumentAsNumber(\"SettingValue\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Maximum horizontal speed", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Configure character acceleration for a given configuration layer and move this layer on top.", + "fullName": "Configure horizontal acceleration", + "functionType": "Action", + "name": "ConfigureAcceleration", + "sentence": "Configure the horizontal acceleration of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureSetting" + }, + "parameters": [ + "Object", + "Behavior", + "\"acceleration\"", + "GetArgumentAsNumber(\"SettingValue\")", + "GetArgumentAsString(\"Identifier\")", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::Acceleration" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "GetArgumentAsNumber(\"SettingValue\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Acceleration", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Configure character maximum falling speed for a given configuration layer and move this layer on top.", + "fullName": "Configure maximum falling speed", + "functionType": "Action", + "name": "ConfigureMaxFallSpeed", + "sentence": "Configure the maximum falling speed of _PARAM0_: _PARAM2_ with the identifier: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AdvancedJump::PlatformerConfigurationStack::ConfigureSetting" + }, + "parameters": [ + "Object", + "Behavior", + "\"maxFallSpeed\"", + "GetArgumentAsNumber(\"SettingValue\")", + "GetArgumentAsString(\"Identifier\")", + "" + ] + }, + { + "type": { + "value": "PlatformBehavior::MaxFallingSpeed" + }, + "parameters": [ + "Object", + "PlatformerCharacter", + "=", + "GetArgumentAsNumber(\"SettingValue\")", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "AdvancedJump::PlatformerConfigurationStack", + "type": "behavior" + }, + { + "description": "Maximum falling speed", + "name": "SettingValue", + "type": "expression" + }, + { + "description": "Configuration identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Bouh", + "category": "Input", + "extensionNamespace": "", + "fullName": "Gamepads (controllers)", + "helpPath": "/all-features/gamepad", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=", + "name": "Gamepads", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg", + "shortDescription": "Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...", + "version": "0.6.1", + "description": [ + "Add support for gamepads (or other controllers).", + "", + "It gives access to:", + "- button presses", + "- axis positions and force", + "- trigger pressure", + "- configurable deadzone", + "- vibration", + "- automatic mappers for platformer characters and top-down movement", + "", + "The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))." + ], + "origin": { + "identifier": "Gamepads", + "name": "gdevelop-extension-store" + }, + "tags": [ + "controllers", + "gamepads", + "joysticks", + "axis", + "xbox", + "ps4" + ], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "taRwmWxwAFYFL9yyBwB3cwBw0BO2", + "mnImQKdn8nQxwzkS5D6a1JB27V23" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Get the value of the pressure on a gamepad trigger.", + "fullName": "Pressure on a gamepad trigger", + "functionType": "Expression", + "name": "TriggerPressure", + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r", + " console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "switch (trigger) {\r", + " case 'LT':\r", + " case 'L2':\r", + " eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r", + " break;\r", + "\r", + " case 'RT':\r", + " case 'R2':\r", + " eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Trigger button", + "name": "trigger", + "supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "the force of gamepad stick (from 0 to 1).", + "fullName": "Stick force", + "functionType": "ExpressionAndCondition", + "name": "StickForce", + "sentence": "the gamepad _PARAM1_ _PARAM2_ stick force", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r", + " return;\r", + "}\r", + "\r", + "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.", + "fullName": "Value of a stick rotation (deprecated)", + "functionType": "Expression", + "name": "StickRotationValue", + "private": true, + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Gamepads::StickAngle(GetArgumentAsNumber(\"player_ID\"), GetArgumentAsString(\"stick\"))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.", + "fullName": "Stick angle", + "functionType": "Expression", + "name": "StickAngle", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r", + " return;\r", + "}\r", + "if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r", + " break;\r", + "\r", + " default:\r", + " eventsFunctionContext.returnValue = -1;\r", + " break;\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Get the value of axis of a gamepad stick.", + "fullName": "Value of a gamepad axis (deprecated)", + "functionType": "Expression", + "name": "AxisValue", + "private": true, + "sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r", + " console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let parameterError = false;\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " }\r", + " break;\r", + "\r", + " case \"HORIZONTAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r", + " break;\r", + "\r", + " case \"VERTICAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " }\r", + " break;\r", + "\r", + " case \"HORIZONTAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r", + " break;\r", + "\r", + " case \"VERTICAL\":\r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " break;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).", + "fullName": "Stick X force", + "functionType": "Expression", + "name": "StickForceX", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"left\" && stick != \"right\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "const axisIndex = stick === 'right' ? 2 : 0;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Gamepad", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "Stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).", + "fullName": "Stick Y force", + "functionType": "Expression", + "name": "StickForceY", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "if (stick != \"left\" && stick != \"right\") {\r", + " console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "const axisIndex = stick === 'right' ? 3 : 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Gamepad", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "Stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button released", + "functionType": "Condition", + "name": "C_Button_released", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (button === \"\") {\r", + " console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "\r", + "switch (button) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " buttonId = 0;\r", + " break;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " buttonId = 1;\r", + " break;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " buttonId = 2;\r", + " break;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " buttonId = 3;\r", + " break;\r", + " case 'LB':\r", + " case 'L1':\r", + " buttonId = 4;\r", + " break;\r", + " case 'RB':\r", + " case 'R1':\r", + " buttonId = 5;\r", + " break;\r", + " case 'LT':\r", + " case 'L2':\r", + " buttonId = 6;\r", + " break;\r", + " case 'RT':\r", + " case 'R2':\r", + " buttonId = 7;\r", + " break;\r", + "\r", + " case 'UP':\r", + " buttonId = 12;\r", + " break;\r", + " case 'DOWN':\r", + " buttonId = 13;\r", + " break;\r", + " case 'LEFT':\r", + " buttonId = 14;\r", + " break;\r", + " case 'RIGHT':\r", + " buttonId = 15;\r", + " break;\r", + "\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " buttonId = 8;\r", + " break;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " buttonId = 9;\r", + " break;\r", + "\r", + " case 'CLICK_STICK_LEFT':\r", + " buttonId = 10;\r", + " break;\r", + " case 'CLICK_STICK_RIGHT':\r", + " buttonId = 11;\r", + " break;\r", + "\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " buttonId = 16;\r", + " break;\r", + " case 'CLICK_TOUCHPAD':\r", + " buttonId = 17;\r", + " break;\r", + "\r", + " default:\r", + " console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r", + " break;\r", + "}\r", + "\r", + "if (buttonId === undefined) {\r", + " console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//Define default value on pressed button or use previous value\r", + "gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", + "\r", + "//Get state of button at previous frame\r", + "const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", + "\r", + "//When previousStateButton is true and actual button state is not pressed\r", + "//Player have release the button\r", + "if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r", + " // Save the last button used for the player \r", + " gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", + " eventsFunctionContext.returnValue = true;\r", + "\r", + "} else {\r", + " gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", + " eventsFunctionContext.returnValue = false;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the index of the last pressed button of a gamepad.", + "fullName": "Last pressed button (id)", + "functionType": "Expression", + "name": "LastButtonID", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "//Player id is not valid\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "\r", + "//Return the last button used by the player\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if any button is pressed on a gamepad.", + "fullName": "Any gamepad button pressed", + "functionType": "Condition", + "name": "C_Any_Button_pressed", + "sentence": "Any button of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r", + " if (gamepad.buttons[i].pressed) { //One of them is pressed\r", + " buttonId = i; //Save the button pressed\r", + " break;\r", + " }\r", + "}\r", + "\r", + "if (buttonId === undefined) {\r", + " // No buttons are pressed.\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//When a button is pressed, save the button in lastButtonUsed for each players\r", + "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Last pressed button (string)", + "functionType": "StringExpression", + "name": "LastButtonString", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (controllerType === \"\") {\r", + " console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "if (gamepad !== null) { //Gamepad exist\r", + " //Get last btn id\r", + " const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r", + "\r", + " //Return last button as string \r", + " eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r", + "\r", + "} else { //Gamepad dosen't exist\r", + " console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r", + " eventsFunctionContext.returnValue = \"Gamepad not connected\";\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Controller type", + "name": "controller_type", + "supplementaryInformation": "[\"Xbox\",\"PS4\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of gamepads.", + "fullName": "Gamepad count", + "functionType": "Expression", + "name": "GamepadCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get the last activated controller\r", + "const controllerId = gdjs._extensionController.lastActiveController;\r", + "\r", + "// Check if controller is active\r", + "const gamepad = gamepads[controllerId];\r", + "if (gamepad == null) {\r", + " eventsFunctionContext.returnValue = 0;\r", + "} else {\r", + " // Return active controller id\r", + " eventsFunctionContext.returnValue = controllerId + 1;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".", + "fullName": "Gamepad button pressed", + "functionType": "Condition", + "name": "C_Button_pressed", + "sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (button === \"\") {\r", + " console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "let buttonId;\r", + "\r", + "switch (button) {\r", + " case 'A':\r", + " case 'CROSS':\r", + " buttonId = 0;\r", + " break;\r", + " case 'B':\r", + " case 'CIRCLE':\r", + " buttonId = 1;\r", + " break;\r", + " case 'X':\r", + " case 'SQUARE':\r", + " buttonId = 2;\r", + " break;\r", + " case 'Y':\r", + " case 'TRIANGLE':\r", + " buttonId = 3;\r", + " break;\r", + " case 'LB':\r", + " case 'L1':\r", + " buttonId = 4;\r", + " break;\r", + " case 'RB':\r", + " case 'R1':\r", + " buttonId = 5;\r", + " break;\r", + " case 'LT':\r", + " case 'L2':\r", + " buttonId = 6;\r", + " break;\r", + " case 'RT':\r", + " case 'R2':\r", + " buttonId = 7;\r", + " break;\r", + "\r", + " case 'UP':\r", + " buttonId = 12;\r", + " break;\r", + " case 'DOWN':\r", + " buttonId = 13;\r", + " break;\r", + " case 'LEFT':\r", + " buttonId = 14;\r", + " break;\r", + " case 'RIGHT':\r", + " buttonId = 15;\r", + " break;\r", + "\r", + " case 'BACK':\r", + " case 'SHARE':\r", + " buttonId = 8;\r", + " break;\r", + " case 'START':\r", + " case 'OPTIONS':\r", + " buttonId = 9;\r", + " break;\r", + "\r", + " case 'CLICK_STICK_LEFT':\r", + " buttonId = 10;\r", + " break;\r", + " case 'CLICK_STICK_RIGHT':\r", + " buttonId = 11;\r", + " break;\r", + "\r", + " //PS4\r", + " case 'PS_BUTTON':\r", + " buttonId = 16;\r", + " break;\r", + " case 'CLICK_TOUCHPAD':\r", + " buttonId = 17;\r", + " break;\r", + "\r", + " default:\r", + " console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + "}\r", + "\r", + "\r", + "\r", + "if (buttonId === undefined) {\r", + " console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r", + " console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "//When a button is pressed, save the button in lastButtonUsed for each players\r", + "if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\r", + "\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Name of the button", + "name": "button", + "supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.", + "fullName": "Gamepad deadzone for sticks", + "functionType": "Expression", + "name": "Deadzone", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "///Return the deadzone value for a given player\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.", + "fullName": "Set gamepad deadzone for sticks", + "functionType": "Action", + "name": "A_Set_deadzone", + "sentence": "Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Get function parameter\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "\r", + "// clamp the newDeadzone in range [0, 1].\r", + "// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r", + "gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Deadzone for sticks, 0.2 by default (0 to 1)", + "name": "deadzone", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a stick of a gamepad is pushed in a given direction.", + "fullName": "Gamepad stick pushed (axis)", + "functionType": "Condition", + "name": "C_Axis_pushed", + "sentence": "_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r", + "const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + " console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r", + " return;\r", + "}\r", + "if (stick != \"LEFT\" && stick != \"RIGHT\") {\r", + " console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r", + " return;\r", + "}\r", + "if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r", + " console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r", + " return;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) {\r", + " eventsFunctionContext.returnValue = false;\r", + " return;\r", + "}\r", + "\r", + "\r", + "//Define in onFirstSceneLoaded function\r", + "const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r", + "\r", + "switch (stick) {\r", + " case 'LEFT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'ANY':\r", + " if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r", + " || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r", + " || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r", + " || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " switch (direction) {\r", + " case 'LEFT':\r", + " if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'RIGHT':\r", + " if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'UP':\r", + " if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'DOWN':\r", + " if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " case 'ANY':\r", + " if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r", + " || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r", + " || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r", + " || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r", + " eventsFunctionContext.returnValue = true;\r", + " return;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + " }\r", + " break;\r", + "\r", + " default:\r", + " console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r", + " eventsFunctionContext.returnValue = false;\r", + " break;\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = false;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Stick: \"Left\" or \"Right\"", + "name": "stick", + "supplementaryInformation": "[\"Left\",\"Right\"]", + "type": "stringWithSelector" + }, + { + "description": "Direction", + "name": "direction", + "supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the number of connected gamepads.", + "fullName": "Connected gamepads number", + "functionType": "Expression", + "name": "ConnectedGamepadsCount", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "// Gamepads can be disconnected and become null, so we have to filter them.\r", + "eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return a string containing informations about the specified gamepad.", + "fullName": "Gamepad type", + "functionType": "StringExpression", + "name": "GamepadType", + "sentence": "Player _PARAM1_ use _PARAM2_ controller", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.", + "fullName": "Gamepad type", + "functionType": "Condition", + "name": "C_Controller_type", + "sentence": "Gamepad _PARAM1_ is a _PARAM2_ controller", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (controllerType === \"\") {", + " console.error('Parameter type in condition: \"Gamepad type\", is not a string.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "", + "if (controllerType == \"XBOX\") {", + " eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);", + "} else {", + " eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + }, + { + "description": "Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)", + "name": "controller_type", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a gamepad is connected.", + "fullName": "Gamepad connected", + "functionType": "Condition", + "name": "C_Controller_X_is_connected", + "sentence": "Gamepad _PARAM1_ is plugged and connected", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "", + "// If gamepad was disconnected it will be null (so this will return false)", + "// If gamepad was never connected it will be undefined (so this will return false)", + "eventsFunctionContext.returnValue = !!gamepads[playerId];" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.", + "fullName": "Gamepad vibration", + "functionType": "Action", + "name": "A_Vibrate_controller", + "sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: duration * 1000,", + " weakMagnitude: 1.0,", + " strongMagnitude: 1.0", + " });", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Time of the vibration, in seconds (optional, default value is 1)", + "name": "Duration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Generate an advanced vibration on the specified controller. Incompatible with Firefox.", + "fullName": "Advanced gamepad vibration", + "functionType": "Action", + "name": "A_Advanced_Vibration_Controller", + "sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;", + "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", + "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", + " console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", + " console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: duration * 1000,", + " weakMagnitude: weakRumbleMagnitude,", + " strongMagnitude: strongRumbleMagnitude", + " });", + "}", + "", + "gdjs._extensionController.players[playerId].rumble.duration = duration;", + "gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;", + "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", + "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Time of the vibration, in seconds (optional, default value is 1)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Strong rumble magnitude (from 0 to 1)", + "name": "StrongMagnitude", + "type": "expression" + }, + { + "description": "Weak rumble magnitude (from 0 to 1)", + "name": "WeakMagnitude", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change a vibration on the specified controller. Incompatible with Firefox.", + "fullName": "Change gamepad active vibration", + "functionType": "Action", + "name": "A_Change_Vibration_Magnitude", + "sentence": "Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */", + "//Vibration work only on game in browser.", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameters", + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;", + "const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;", + "const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;", + "const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");", + "const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");", + "", + "", + "if (playerId < 0 || playerId > 4) {", + " console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');", + " return;", + "}", + "if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {", + " console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {", + " console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');", + " return;", + "}", + "", + "const gamepad = gamepads[playerId];", + "", + "//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.", + "if (gamepad == null) return;", + "", + "if (originalDuration - elapsedTime <= 0) return;", + "", + "if (gamepad && gamepad.vibrationActuator) {", + " gamepad.vibrationActuator.playEffect(\"dual-rumble\", {", + " startDelay: 0,", + " duration: 1000 * (originalDuration - elapsedTime),", + " weakMagnitude: weakRumbleMagnitude,", + " strongMagnitude: strongRumbleMagnitude", + " });", + "}", + "", + "gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;", + "gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + }, + { + "description": "Strong rumble magnitude (from 0 to 1)", + "name": "StrongMagnitude", + "type": "expression" + }, + { + "description": "Weak rumble magnitude (from 0 to 1)", + "name": "WeakMagnitude", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Define an new private object javascript for the gamepad extension\r", + "gdjs._extensionController = {\r", + " players: {\r", + " 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r", + " },\r", + " lastActiveController: -1, // Last active controller\r", + " controllerButtonNames: { //Map associating controller button ids to button names\r", + " \"XBOX\": {\r", + " 0: \"A\",\r", + " 1: \"B\",\r", + " 2: \"X\",\r", + " 3: \"Y\",\r", + " 4: \"LB\",\r", + " 5: \"RB\",\r", + " 6: \"LT\",\r", + " 7: \"RT\",\r", + " 8: \"BACK\",\r", + " 9: \"START\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"NONE\",\r", + " 17: \"NONE\"\r", + " },\r", + " \"PS4\": {\r", + " 0: \"CROSS\",\r", + " 1: \"CIRCLE\",\r", + " 2: \"SQUARE\",\r", + " 3: \"TRIANGLE\",\r", + " 4: \"L1\",\r", + " 5: \"R1\",\r", + " 6: \"L2\",\r", + " 7: \"R2\",\r", + " 8: \"SHARE\",\r", + " 9: \"OPTIONS\",\r", + " 10: \"CLICK_STICK_LEFT\",\r", + " 11: \"CLICK_STICK_RIGHT\",\r", + " 12: \"UP\",\r", + " 13: \"DOWN\",\r", + " 14: \"LEFT\",\r", + " 15: \"RIGHT\",\r", + " 16: \"PS_BUTTON\",\r", + " 17: \"CLICK_TOUCHPAD\"\r", + " }\r", + " }\r", + "};\r", + "\r", + "gdjs._extensionController.getInputString = function (type, buttonId) {\r", + " const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r", + " if (controllerButtonNames[type] !== undefined) {\r", + " return controllerButtonNames[type][buttonId];\r", + " }\r", + "\r", + " return \"UNKNOWN_BUTTON\";\r", + "}\r", + "\r", + "gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r", + " const rad = Math.atan2(deltaY, deltaX);\r", + " const deg = rad * (180 / Math.PI);\r", + " return deg;\r", + "}\r", + "\r", + "gdjs._extensionController.isXbox = function (gamepad) {\r", + " return (gamepad ? (\r", + " gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r", + " // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r", + " // name reported in Firefox corresponding to the driver being used by the controller\r", + " // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r", + " ) : false);\r", + "}\r", + "\r", + "//Returns the new value taking into account the dead zone for the player_ID given\r", + "gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r", + " // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r", + "\r", + " // Anything smaller than this is assumed to be 0,0\r", + " const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r", + "\r", + " if (Math.abs(v) < DEADZONE) {\r", + " // In the dead zone, set to 0\r", + " v = 0;\r", + "\r", + " if (v == null) {\r", + " return 0;\r", + " } else {\r", + " return v;\r", + " }\r", + "\r", + " } else {\r", + " // We're outside the dead zone, but we'd like to smooth\r", + " // this value out so it still runs nicely between 0..1.\r", + " // That is, we don't want it to jump suddenly from 0 to\r", + " // DEADZONE.\r", + "\r", + " // Remap v from\r", + " // DEADZONE..1 to 0..(1-DEADZONE)\r", + " // or from\r", + " // -1..-DEADZONE to -(1-DEADZONE)..0\r", + "\r", + " v = v - Math.sign(v) * DEADZONE;\r", + "\r", + " // Remap v from\r", + " // 0..(1-DEADZONE) to 0..1\r", + " // or from\r", + " // -(1-DEADZONE)..0 to -1..0\r", + "\r", + " return v / (1 - DEADZONE);\r", + " }\r", + "};" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "//Each time a player press a button i save the last button pressed for the next frame", + "/** @type {Gamepad[]} */", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);", + "", + "//Get function parameter", + "let countPlayers = Object.keys(gdjs._extensionController.players).length;", + "", + "//Repeat for each players", + "for (let i = 0; i < countPlayers; i++) {", + " let gamepad = gamepads[i]; // Get the gamepad of the player", + "", + " //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable.", + " if (gamepad == null) {", + " continue;", + " }", + "", + " for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons", + " if (gamepad.buttons[b].pressed) { //One of them is pressed", + " gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed", + "", + " //Save the state of the button for the next frame.", + " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };", + "", + " // Update Last Active Controller", + " gdjs._extensionController.lastActiveController = i;", + " } else {", + " gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };", + " }", + " }", + "", + "", + " gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;", + " if (", + " gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&", + " (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)", + " ) {", + " gdjs._extensionController.players[i].rumble.weakMagnitude = 0;", + " gdjs._extensionController.players[i].rumble.strongMagnitude = 0;", + " }", + "", + "", + "}", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if any button is released on a gamepad.", + "fullName": "Any gamepad button released", + "functionType": "Condition", + "name": "C_any_button_released", + "sentence": "Any button of gamepad _PARAM1_ is released", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {Gamepad[]} */\r", + "const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r", + "\r", + "//Get function parameters\r", + "const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r", + "\r", + "if (playerId < 0 || playerId > 4) {\r", + "\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r", + "\treturn;\r", + "}\r", + "\r", + "const gamepad = gamepads[playerId];\r", + "\r", + "//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r", + "if (gamepad == null) return;\r", + "\r", + "for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r", + "\r", + "\tif (buttonId === undefined) {\r", + "\t\teventsFunctionContext.returnValue = false;\r", + "\t\treturn;\r", + "\t}\r", + "\r", + "\t//Get previous value or define value by default for the current button\r", + "\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r", + "\r", + "\t//Get state of the button at previous frame\r", + "\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r", + "\r", + "\t//Get the state of the button on the current frame.\r", + "\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r", + "\r", + "\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r", + "\t//Player have release the button\r", + "\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r", + "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r", + "\t\teventsFunctionContext.returnValue = true;\r", + "\t\t//break;\r", + "\t\treturn;\r", + "\t} else {\r", + "\t\t//The player didn't released the button yet, the previous frame state is still true\r", + "\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r", + "\t\teventsFunctionContext.returnValue = false;\r", + "\t}\r", + "\r", + "\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r", + "}\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the strength of the weak vibration motor on the gamepad of a player.", + "fullName": "Weak rumble magnitude", + "functionType": "Expression", + "name": "WeakVibrationMagnitude", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the strength of the strong vibration motor on the gamepad of a player.", + "fullName": "Strong rumble magnitude", + "functionType": "Expression", + "name": "StrongVibrationMagnitude", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r", + "eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "The gamepad identifier: 1, 2, 3 or 4", + "name": "Player_ID", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Control a platformer character with a gamepad.", + "fullName": "Platformer gamepad mapper", + "name": "PlatformerGamepadMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Up\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Down\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"A or Cross\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"A\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"B or Circle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"B\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"X or Square\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"X\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Y or Triangle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Y\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"LB or L1\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"LB\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RB or R1\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"RB\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"LT or L2\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"LT\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"RT or R2\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"RT\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::PlatformerGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseRightStick" + }, + { + "value": "A or Cross", + "type": "Choice", + "label": "Jump button", + "description": "", + "group": "Controls", + "extraInformation": [ + "A or Cross", + "B or Circle", + "X or Square", + "Y or Triangle", + "LB or L1", + "RB or R1", + "LT or L2", + "RT or R2" + ], + "hidden": false, + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a gamepad.", + "fullName": "Top-down gamepad mapper", + "name": "TopDownGamepadMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Up\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Down\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\"))", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::TopDownGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Top-down movement behavior", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "hidden": false, + "name": "TopDownMovement" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "hidden": false, + "name": "UseRightStick" + }, + { + "value": "Analog", + "type": "Choice", + "label": "Stick mode", + "description": "", + "group": "Controls", + "extraInformation": [ + "Analog", + "360°", + "8 Directions" + ], + "hidden": false, + "name": "StickMode" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Rectangular movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", + "name": "RectangleMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", + "shortDescription": "Move objects in a rectangular pattern.", + "version": "1.2.0", + "description": [ + "Move objects in a rectangular pattern with easing functions from the Tween extension.", + "", + "It can be used for:", + "", + "- Moveable platforms", + "- Enemy movement patterns", + "- Moving along the border of another object (inside, center, outside)", + "", + "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer)).", + "", + "This game shows how to make objects move around the border of another object ([open the project online](https://editor.gdevelop.io/?project=example://moving-saw-platformer)).", + "", + "This example can be used to test different settings ([open the project online](https://editor.gdevelop.io/?project=example://rectangular-movement)).", + "" + ], + "origin": { + "identifier": "RectangleMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "rectangular", + "movement", + "rectangle", + "patrol", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Distance from an object to the closest edge of a second object.", + "fullName": "Distance from an object to the closest edge of a second object", + "functionType": "Expression", + "name": "DistanceToClosestEdge", + "private": true, + "sentence": "Distance from _PARAM1_ to the closest edge of _PARAM2_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If point is inside rectangle, just use min distance" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + ">=", + "CenterObject.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + "<=", + "CenterObject.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + ">=", + "CenterObject.BoundingBoxTop()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + "<=", + "CenterObject.BoundingBoxBottom()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "min(\nmin(\nMovingObject.BoundingBoxCenterY() - CenterObject.BoundingBoxTop(), \nCenterObject.BoundingBoxBottom() - MovingObject.BoundingBoxCenterY()),\nmin(\nMovingObject.BoundingBoxCenterX() - CenterObject.BoundingBoxLeft(), \nCenterObject.BoundingBoxRight() - MovingObject.BoundingBoxCenterX())\n)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If point is outside rectangle, find distance to clamped position on rectangle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + "<", + "CenterObject.BoundingBoxLeft()" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "MovingObject", + ">", + "CenterObject.BoundingBoxRight()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + "<", + "CenterObject.BoundingBoxTop()" + ] + }, + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "MovingObject", + ">", + "CenterObject.BoundingBoxBottom()" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "DistanceBetweenPositions(\nMovingObject.BoundingBoxCenterX(),\nMovingObject.BoundingBoxCenterY(),\nclamp(MovingObject.BoundingBoxCenterX(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxRight()),\nclamp(MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxTop(), CenterObject.BoundingBoxBottom())\n)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Center object", + "name": "CenterObject", + "type": "objectList" + }, + { + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Update rectangular movement to follow the border of an object. Run once, or every time the center object moves.", + "fullName": "Update rectangular movement to follow the border of an object", + "functionType": "Action", + "name": "MoveAlongBorderOfObject", + "sentence": "Update rectangular movement of _PARAM1_ to follow the border of _PARAM3_. Position on border: _PARAM4_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create object link (if one has not been created)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Set a valid initial value by picking any Center object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "MovingObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.DistanceToClosestEdge", + "=", + "RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject)" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update value if distance is lower than existing minimum", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.DistanceToClosestEdge", + "=", + "min(MovingObject.Variable(__RectangleMovement.DistanceToClosestEdge), RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject))" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Link objects that have the closest distance", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Link the MovingObject that has the shortest distance (and don't create more links even if another object has the same distance)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "RectangleMovement::DistanceToClosestEdge(CenterObject, MovingObject)", + "=", + "MovingObject.Variable(__RectangleMovement.DistanceToClosestEdge)" + ] + } + ], + "actions": [ + { + "type": { + "value": "LinkedObjects::LinkObjects" + }, + "parameters": [ + "", + "MovingObject", + "CenterObject" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "True" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Update rectangular movement to follow the border of object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "CenterObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "MovingObject", + "CenterObject", + "" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Inside (default)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Inside\"" + ] + }, + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom() - MovingObject.Height()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight() - MovingObject.Width()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Center", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Center\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop() - MovingObject.Height()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom() - MovingObject.Height()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft() - MovingObject.Width()/2", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight() - MovingObject.Width()/2", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Outside", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareArgumentAsString" + }, + "parameters": [ + "\"PositionOnBorder\"", + "=", + "\"Outside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop() - MovingObject.Height()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft() - MovingObject.Width()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" + }, + { + "description": "Rectangle Movement (required)", + "name": "RectangleMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Center object", + "name": "CenterObject", + "type": "objectList" + }, + { + "description": "Position on border", + "name": "PositionOnBorder", + "supplementaryInformation": "[\"Inside\",\"Center\",\"Outside\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Move to the nearest corner of the center object.", + "fullName": "Move to the nearest corner of the center object", + "functionType": "Action", + "name": "MoveToNearestCorner", + "sentence": "Move _PARAM1_ to the nearest corner of _PARAM3_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create a link to the closest object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.Linked", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::MoveAlongBorderOfObject" + }, + "parameters": [ + "", + "MovingObject", + "RectangleMovement", + "CenterObject", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move to nearest corner", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "MovingObject", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LinkedObjects::PickObjectsLinkedTo" + }, + "parameters": [ + "", + "CenterObject", + "MovingObject", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to TopLeft (don't use a condition on the first check so the variable starts with a valid corner)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxTop())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Top-left corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to TopRight" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxTop())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxTop())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Top-right corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to BottomLeft" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxBottom())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxLeft(), CenterObject.BoundingBoxBottom())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Bottom-left corner\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Distance to BottomRight" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxBottom())", + "<", + "MovingObject.Variable(__RectangleMovement.ClosestCornerDistance)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "MovingObject", + "__RectangleMovement.ClosestCornerDistance", + "=", + "DistanceBetweenPositions(MovingObject.BoundingBoxCenterX(), MovingObject.BoundingBoxCenterY(), CenterObject.BoundingBoxRight(), CenterObject.BoundingBoxBottom())" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::TeleportToCorner" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "\"Bottom-right corner\"", + "" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Moving object", + "name": "MovingObject", + "type": "objectList" + }, + { + "description": "Rectangle Movement (required)", + "name": "RectangleMovement", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Center object", + "name": "CenterObject", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Move objects in a rectangular pattern.", + "fullName": "Rectangular movement", + "name": "RectangleMovement", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the initial state according to the configuration." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Top-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::TopRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Bottom-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyInitialPosition" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Bottom-left corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomLeftDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X() - Object.Behavior::DeltaX()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y() - Object.Behavior::DeltaY()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update the rectangle when the object is moved outside of the behavior." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.X() - Object.Behavior::PropertyOldX()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Y() - Object.Behavior::PropertyOldY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move the object on the rectangular path." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyLeft() + Object.Behavior::DeltaX()", + "=", + "Object.Behavior::PropertyTop() + Object.Behavior::DeltaY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the position to detect when the object is moved outside of the behavior." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Step on the path." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(Object.Behavior::PropertyProgress() + TimeDelta() / Object.Behavior::LoopDuration(), 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(Object.Behavior::PropertyProgress() - TimeDelta() / Object.Behavior::LoopDuration(), 1)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Teleport the object to a corner of the movement rectangle.", + "fullName": "Teleport at a corner", + "functionType": "Action", + "name": "TeleportToCorner", + "sentence": "Set the position of _PARAM0_ at the _PARAM2_ of the rectangle loop", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Top-left corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Top-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::TopRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Bottom-right corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomRightDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareStrings" + }, + "parameters": [ + "GetArgumentAsString(\"Corner\")", + "=", + "\"Bottom-left corner\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyProgress" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::BottomLeftDuration() / Object.Behavior::LoopDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Corner", + "name": "Corner", + "supplementaryInformation": "[\"Top-left corner\",\"Top-right corner\",\"Bottom-left corner\",\"Bottom-right corner\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Return the perimeter of the movement rectangle.", + "fullName": "Perimeter", + "functionType": "Expression", + "group": "Rectangular movement shape", + "name": "Perimeter", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "2 * (abs(Object.Behavior::PropertyWidth()) + abs(Object.Behavior::PropertyHeight()))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through the whole rectangle (in seconds).", + "fullName": "Loop duration", + "functionType": "Expression", + "name": "LoopDuration", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "2 * (Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through a horizontal edge (in seconds).", + "fullName": "Horizontal edge duration", + "functionType": "Expression", + "name": "HorizontalEdgeDuration", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time the object takes to go through a vertical edge (in seconds).", + "fullName": "Vertical edge duration", + "functionType": "Expression", + "name": "VerticalEdgeDuration", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the rectangle width.", + "fullName": "Width", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Width", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the rectangle height.", + "fullName": "Height", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Height", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the left bound of the movement.", + "fullName": "Left bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Left", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLeft()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the top bound of the movement.", + "fullName": "Top bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Top", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTop()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the right bound of the movement.", + "fullName": "Right bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Right", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyLeft() + Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the bottom bound of the movement.", + "fullName": "Bottom bound", + "functionType": "Expression", + "group": "Rectangular movement/Shape", + "name": "Bottom", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTop() + Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the left bound of the rectangular movement.", + "fullName": "Left bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetLeft", + "sentence": "Change the movement left bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyLeft() - GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the top bound of the rectangular movement.", + "fullName": "Top bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetTop", + "sentence": "Change the movement top bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::PropertyTop() - GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the right bound of the rectangular movement.", + "fullName": "Right bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetRight", + "sentence": "Change the movement right bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\") - Object.Behavior::PropertyLeft()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the bottom bound of the rectangular movement.", + "fullName": "Bottom bound", + "functionType": "Action", + "group": "Rectangular movement shape", + "name": "SetBottom", + "sentence": "Change the movement bottom bound of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHeight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\") - Object.Behavior::PropertyTop()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time the object takes to go through a horizontal edge (in seconds).", + "fullName": "Horizontal edge duration", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetHorizontalEdgeDuration", + "sentence": "Change the time _PARAM0_ takes to go through a horizontal edge to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyHorizontalEdgeDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the time the object takes to go through a vertical edge (in seconds).", + "fullName": "Vertical edge duration", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetVerticalEdgeDuration", + "sentence": "Change the time _PARAM0_ takes to go through a vertical edge to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyVerticalEdgeDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the direction to clockwise or counter-clockwise.", + "fullName": "Clockwise", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetClockwise", + "sentence": "Use clockwise direction for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "description": "Clockwise", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the easing function of the movement.", + "fullName": "Easing", + "functionType": "Action", + "group": "Rectangular movement speed", + "name": "SetEasing", + "sentence": "Change the easing of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + }, + { + "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": "Toggle the direction to clockwise or counter-clockwise.", + "fullName": "Toggle direction", + "functionType": "Action", + "name": "ToogleClockwise", + "sentence": "Toogle the direction of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "=" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyToogleClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetPropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is moving clockwise.", + "fullName": "Is moving clockwise", + "functionType": "Condition", + "name": "IsMovingClockwise", + "sentence": "_PARAM0_ is moving clockwise", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is moving to the left.", + "fullName": "Is moving left", + "functionType": "Condition", + "name": "IsMovingLeft", + "sentence": "_PARAM0_ is moving to the left", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnTop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnBottom" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is moving up.", + "fullName": "Is moving up", + "functionType": "Condition", + "name": "IsMovingUp", + "sentence": "_PARAM0_ is moving up", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnRight" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is moving to the right.", + "fullName": "Is moving right", + "functionType": "Condition", + "name": "IsMovingRight", + "sentence": "_PARAM0_ is moving to the right", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnTop" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnBottom" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is moving down.", + "fullName": "Is moving down", + "functionType": "Condition", + "name": "IsMovingDown", + "sentence": "_PARAM0_ is moving down", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnRight" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangleMovement::RectangleMovement::PropertyClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::IsOnLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is on the left side of the rectangle.", + "fullName": "Is on left", + "functionType": "Condition", + "name": "IsOnLeft", + "sentence": "_PARAM0_ is on the left side", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomLeftDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is on the top side of the rectangle.", + "fullName": "Is on top", + "functionType": "Condition", + "name": "IsOnTop", + "sentence": "_PARAM0_ is on the top side", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::TopRightDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is on the right side of the rectangle.", + "fullName": "Is on right", + "functionType": "Condition", + "name": "IsOnRight", + "sentence": "_PARAM0_ is on the right side", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::BottomRightDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is on the bottom side of the rectangle.", + "fullName": "Is on bottom", + "functionType": "Condition", + "name": "IsOnBottom", + "sentence": "_PARAM0_ is on the bottom side", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<=", + "Object.Behavior::BottomLeftDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the duration between the top-left vertex and the top-right one.", + "fullName": "Duration to top right", + "functionType": "Expression", + "name": "TopRightDuration", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the duration between the top-left vertex and the bottom-right one.", + "fullName": "Duration to bottom right", + "functionType": "Expression", + "name": "BottomRightDuration", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the duration between the top-left vertex and the bottom-left one.", + "fullName": "Duration to bottom left", + "functionType": "Expression", + "name": "BottomLeftDuration", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "2 * Object.Behavior::PropertyHorizontalEdgeDuration() + Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the ratio between the covered distance from the last vertex and the edge length (between 0 and 1).", + "fullName": "Progress on edge", + "functionType": "Expression", + "name": "EdgeProgress", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::HalfCurrentTime() / Object.Behavior::PropertyHorizontalEdgeDuration()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::HalfCurrentTime()", + ">=", + "abs(Object.Behavior::PropertyHorizontalEdgeDuration())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(Object.Behavior::HalfCurrentTime() - Object.Behavior::PropertyHorizontalEdgeDuration()) / Object.Behavior::PropertyVerticalEdgeDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of the current edge origin.", + "fullName": "Edge origin X", + "functionType": "Expression", + "name": "EdgeOriginX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomLeftDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the Y position of the current edge origin.", + "fullName": "Edge origin Y", + "functionType": "Expression", + "name": "EdgeOriginY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::BottomRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::Perimeter()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the X position of the current edge target.", + "fullName": "Edge target X", + "functionType": "Expression", + "name": "EdgeTargetY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + ">=", + "Object.Behavior::TopRightDuration()" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomLeftDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the Y position of the current edge target.", + "fullName": "Edge target Y", + "functionType": "Expression", + "name": "EdgeTargetX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Behavior::CurrentTime()", + "<", + "Object.Behavior::BottomRightDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyWidth()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the time from the top-left vertex.", + "fullName": "Current time", + "functionType": "Expression", + "name": "CurrentTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyProgress() * Object.Behavior::LoopDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the covered length from the top-left vertex or the bottom-right one.", + "fullName": "Half Current length", + "functionType": "Expression", + "name": "HalfCurrentTime", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object. Behavior::LoopDuration() * mod(Object.Behavior::PropertyProgress(), 0.5)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on the X axis from the top-left vertex.", + "fullName": "Delta X", + "functionType": "Expression", + "name": "DeltaX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Tween::Ease(Object.Behavior::PropertyEasing(), Object.Behavior::EdgeOriginX(), Object.Behavior::EdgeTargetX(), Object.Behavior::EdgeProgress())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the displacement on the Y axis from the top-left vertex.", + "fullName": "Delta Y", + "functionType": "Expression", + "name": "DeltaY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Tween::Ease(Object.Behavior::PropertyEasing(), Object.Behavior::EdgeOriginY(), Object.Behavior::EdgeTargetY(), Object.Behavior::EdgeProgress())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RectangleMovement::RectangleMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "100", + "type": "Number", + "unit": "Pixel", + "label": "Width", + "description": "", + "group": "Dimension", + "extraInformation": [], + "hidden": false, + "name": "Width" + }, + { + "value": "100", + "type": "Number", + "unit": "Pixel", + "label": "Height", + "description": "", + "group": "Dimension", + "extraInformation": [], + "hidden": false, + "name": "Height" + }, + { + "value": "true", + "type": "Boolean", + "label": "Clockwise", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "Clockwise" + }, + { + "value": "4", + "type": "Number", + "unit": "Second", + "label": "Horizontal edge duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "HorizontalEdgeDuration" + }, + { + "value": "1", + "type": "Number", + "unit": "Second", + "label": "Vertical edge duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "VerticalEdgeDuration" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Left" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Top" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Progress" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldY" + }, + { + "value": "easeInOutSine", + "type": "Choice", + "label": "Easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "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" + ], + "hidden": false, + "name": "Easing" + }, + { + "value": "Top-left corner", + "type": "Choice", + "label": "Initial position", + "description": "", + "group": "", + "extraInformation": [ + "Top-left corner", + "Top-right corner", + "Bottom-right corner", + "Bottom-left corner" + ], + "hidden": false, + "name": "InitialPosition" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ToogleClockwise" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Camera", + "extensionNamespace": "", + "fullName": "Smooth Camera", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=", + "name": "SmoothCamera", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg", + "shortDescription": "Smoothly scroll to follow an object.", + "version": "0.3.0", + "description": [ + "The camera follows an object according to:", + "- a frame rate independent catch-up speed to make the scrolling from smooth to strong", + "- a maximum speed to do linear following ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) or slow down the camera when teleporting the object", + "- a follow-free zone to avoid scrolling on small movements", + "- an offset to see further in one direction", + "- an extra delay and catch-up speed to give an impression of speed (useful for dash)", + "- position forecasting and delay to simulate a cameraman response time", + "", + "A platformer dedicated behavior allows to switch of settings when the character is in air or on the floor. This can be used to stabilize the camera when jumping." + ], + "origin": { + "identifier": "SmoothCamera", + "name": "gdevelop-extension-store" + }, + "tags": [ + "camera", + "scrolling", + "follow", + "smooth" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Smoothly scroll to follow an object.", + "fullName": "Smooth Camera", + "name": "SmoothCamera", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update private properties through setters to check their values and initialize state." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyLeftwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyRightwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyUpwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyDownwardSpeed()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyLeftwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetRightwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyRightwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyUpwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyDownwardSpeedMax()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaLeft" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaLeft()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaRight" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaRight()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaTop()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFollowFreeAreaBottom()", + "log(1 - )" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyCameraDelay()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::PropertyIsCalledManually" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.", + "fullName": "Move the camera closer", + "functionType": "Action", + "name": "MoveCameraCloser", + "sentence": "Move the camera closer to _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIsCalledManually" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Move the camera closer to the object.", + "fullName": "Do move the camera closer", + "functionType": "Action", + "name": "DoMoveCameraCloser", + "private": true, + "sentence": "Do move the camera closer _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::UpdateDelayedPosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::UpdateForecastedPosition" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraX(Object.Layer(), 0)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + ">", + "Object.Behavior::FreeAreaRight()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * Object.Behavior::PropertyLogLeftwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "<", + "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldX() - Object.Behavior::PropertyLeftwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + "<", + "Object.Behavior::FreeAreaLeft()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * Object.Behavior::PropertyLogRightwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraX" + }, + "parameters": [ + "", + ">", + "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraX" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldX() + Object.Behavior::PropertyRightwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraY(Object.Layer(), 0)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + ">", + "Object.Behavior::FreeAreaBottom()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * Object.Behavior::PropertyLogUpwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "<", + "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldY() - Object.Behavior::PropertyUpwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + "<", + "Object.Behavior::FreeAreaTop()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * Object.Behavior::PropertyLogDownwardSpeed())", + "Object.Layer()", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CameraY" + }, + "parameters": [ + "", + ">", + "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetCameraY" + }, + "parameters": [ + "", + "=", + "Object.Behavior::PropertyOldY() + Object.Behavior::PropertyDownwardSpeedMax() * TimeDelta()", + "Object.Layer()", + "0" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Delay the camera according to a maximum speed and catch up the delay.", + "fullName": "Wait and catch up", + "functionType": "Action", + "name": "WaitAndCatchUp", + "sentence": "Delay the camera of _PARAM0_ during: _PARAM2_ seconds according to the maximum speed _PARAM3_;_PARAM4_ seconds and catch up in _PARAM5_ seconds", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingEnd" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "TimeFromStart() + GetArgumentAsNumber(\"WaitingDuration\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedXMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitingSpeedXMax\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyWaitingSpeedYMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"WaitingSpeedYMax\")" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CatchUpDuration\")" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Wait and catch up\"", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Waiting duration (in seconds)", + "name": "WaitingDuration", + "type": "expression" + }, + { + "description": "Waiting maximum camera target speed X", + "name": "WaitingSpeedXMax", + "type": "expression" + }, + { + "description": "Waiting maximum camera target speed Y", + "name": "WaitingSpeedYMax", + "type": "expression" + }, + { + "description": "Catch up duration (in seconds)", + "name": "CatchUpDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Draw the targeted and actual camera position.", + "fullName": "Draw debug", + "functionType": "Action", + "name": "DrawDebug", + "sentence": "Draw targeted and actual camera position for _PARAM0_ on _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "ShapePainter", + "=", + "0" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Path used by the forecasting", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"245;166;35\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::BeginFillPath" + }, + "parameters": [ + "ShapePainter", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::PathLineTo" + }, + "parameters": [ + "ShapePainter", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::EndFillPath" + }, + "parameters": [ + "ShapePainter" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Follow-free area.", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaLeft" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaRight" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"126;211;33\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::FreeAreaLeft() - 1", + "Object.Behavior::FreeAreaTop() - 1", + "Object.Behavior::FreeAreaRight() + 1", + "Object.Behavior::FreeAreaBottom() + 1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Linear regression vector used by the forecasting.", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::OutlineColor" + }, + "parameters": [ + "ShapePainter", + "\"208;2;27\"" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::PropertyProjectedOldestX()", + "Object.Behavior::PropertyProjectedOldestY()", + "Object.Behavior::PropertyProjectedNewestX()", + "Object.Behavior::PropertyProjectedNewestY()", + "1" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Targeted and actual camera position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "ShapePainter", + "Object.Behavior::PropertyForecastedX()", + "Object.Behavior::PropertyForecastedY()", + "3" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "CameraX(Object.Layer(), 0)", + "CameraY(Object.Layer(), 0) - 4", + "CameraX(Object.Layer(), 0)", + "CameraY(Object.Layer(), 0) + 4", + "1" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::LineV2" + }, + "parameters": [ + "ShapePainter", + "CameraX(Object.Layer(), 0) - 4", + "CameraY(Object.Layer(), 0)", + "CameraX(Object.Layer(), 0) + 4", + "CameraY(Object.Layer(), 0)", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Shape painter", + "name": "ShapePainter", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the following on X axis.", + "fullName": "Follow on X", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowOnX", + "sentence": "The camera follows _PARAM0_ on X axis: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"FollowOnX\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnX" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow on X axis", + "name": "FollowOnX", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the following on Y axis.", + "fullName": "Follow on Y", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowOnY", + "sentence": "The camera follows _PARAM0_ on Y axis: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"FollowOnY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowOnY" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow on Y axis", + "name": "FollowOnY", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area right border.", + "fullName": "Follow free area right border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaRight", + "sentence": "Change the camera follow free area right border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaRight\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area right border", + "name": "SetFollowFreeAreaRight", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area left border.", + "fullName": "Follow free area left border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaLeft", + "sentence": "Change the camera follow free area left border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaLeft\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area left border", + "name": "SetFollowFreeAreaLeft", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area top border.", + "fullName": "Follow free area top border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaTop", + "sentence": "Change the camera follow free area top border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"FollowFreeAreaTop\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area top border", + "name": "FollowFreeAreaTop", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera follow free area bottom border.", + "fullName": "Follow free area bottom border", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetFollowFreeAreaBottom", + "sentence": "Change the camera follow free area bottom border of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"SetFollowFreeAreaBottom\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Follow free area bottom border", + "name": "SetFollowFreeAreaBottom", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera leftward maximum speed (in pixels per second).", + "fullName": "Leftward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetLeftwardSpeedMax", + "sentence": "Change the camera leftward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Leftward maximum speed (in ratio per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera rightward maximum speed (in pixels per second).", + "fullName": "Rightward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetRightwardSpeedMax", + "sentence": "Change the camera rightward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Rightward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera upward maximum speed (in pixels per second).", + "fullName": "Upward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetUpwardSpeedMax", + "sentence": "Change the camera upward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Upward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera downward maximum speed (in pixels per second).", + "fullName": "Downward maximum speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetDownwardSpeedMax", + "sentence": "Change the camera downward maximum speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeedMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, GetArgumentAsNumber(\"Speed\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Downward maximum speed (in pixels per second)", + "name": "Speed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera leftward catch-up speed (in ratio per second).", + "fullName": "Leftward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetLeftwardSpeed", + "sentence": "Change the camera leftward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"LeftwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogLeftwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyLeftwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Leftward catch-up speed (in ratio per second)", + "name": "LeftwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera rightward catch-up speed (in ratio per second).", + "fullName": "Rightward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetRightwardSpeed", + "sentence": "Change the camera rightward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"RightwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogRightwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyRightwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Rightward catch-up speed (in ratio per second)", + "name": "RightwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera downward catch-up speed (in ratio per second).", + "fullName": "Downward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetDownwardSpeed", + "sentence": "Change the camera downward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"DownwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogDownwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyDownwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Downward catch-up speed (in ratio per second)", + "name": "DownwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera upward catch-up speed (in ratio per second).", + "fullName": "Upward catch-up speed", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetUpwardSpeed", + "sentence": "Change the camera upward catch-up speed of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "clamp(0, 1, GetArgumentAsNumber(\"UpwardSpeed\"))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyLogUpwardSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "log(1 - Object.Behavior::PropertyUpwardSpeed())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Upward catch-up speed (in ratio per second)", + "name": "UpwardSpeed", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the camera offset on X axis of the object. This is not the current difference between the object and the camera position.", + "fullName": "Camera offset X", + "functionType": "ExpressionAndCondition", + "group": "Camera configuration", + "name": "OffsetX", + "sentence": "the camera offset on X axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraOffsetX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetX", + "name": "SetOffsetXOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera offset on X axis of an object.", + "fullName": "Camera Offset X", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetOffsetX", + "private": true, + "sentence": "Change the camera offset on X axis of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetXOp instead." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetOffsetXOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CameraOffsetX\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera offset X", + "name": "CameraOffsetX", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the camera offset on Y axis of the object. This is not the current difference between the object and the camera position.", + "fullName": "Camera offset Y", + "functionType": "ExpressionAndCondition", + "group": "Camera configuration", + "name": "OffsetY", + "sentence": "the camera offset on Y axis", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraOffsetY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "OffsetY", + "name": "SetOffsetYOp", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Deprecated use SetOffsetYOp instead." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraOffsetY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera offset on Y axis of an object.", + "fullName": "Camera Offset Y", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetOffsetY", + "private": true, + "sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetOffsetYOp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"CameraOffsetY\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera offset Y", + "name": "CameraOffsetY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera forecast time (in seconds).", + "fullName": "Forecast time", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetForecastTime", + "sentence": "Change the camera forecast time of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(0, GetArgumentAsNumber(\"ForecastTime\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Forecast time", + "name": "ForecastTime", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the camera delay (in seconds).", + "fullName": "Camera delay", + "functionType": "Action", + "group": "Camera configuration", + "name": "SetCameraDelay", + "sentence": "Change the camera delay of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(0, GetArgumentAsNumber(\"CameraDelay\"))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Camera delay", + "name": "CameraDelay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area left border X.", + "fullName": "Free area left", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaLeft", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() - Object.Behavior::PropertyFollowFreeAreaLeft()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area right border X.", + "fullName": "Free area right", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaRight", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedX() + Object.Behavior::PropertyCameraOffsetX() + Object.Behavior::PropertyFollowFreeAreaRight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area bottom border Y.", + "fullName": "Free area bottom", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaBottom", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() + Object.Behavior::PropertyFollowFreeAreaBottom()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return follow free area top border Y.", + "fullName": "Free area top", + "functionType": "Expression", + "group": "Private", + "name": "FreeAreaTop", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyForecastedY() + Object.Behavior::PropertyCameraOffsetY() - Object.Behavior::PropertyFollowFreeAreaTop()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Update delayed position and delayed history. This is called in doStepPreEvents.", + "fullName": "Update delayed position", + "functionType": "Action", + "group": "Private", + "name": "UpdateDelayedPosition", + "private": true, + "sentence": "Update delayed position and delayed history of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "TimeFromStart()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use the object center when no delay is asked." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.CenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.CenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition" + }, + "parameters": [ + "Object", + "Behavior", + "TimeFromStart()", + "Object.CenterX()", + "Object.CenterY()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "TimeFromStart()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "Object.CenterX()" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "Object.CenterY()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting." + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime[1]", + "<", + "TimeFromStart() - Object.Behavior::CurrentDelay()" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ObjectTime[0])", + "Object.Variable(__SmoothCamera.ObjectX[0])", + "Object.Variable(__SmoothCamera.ObjectY[0])", + "" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Don't move the camera if there is not enough history." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Variable(__SmoothCamera.ObjectX[0])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Variable(__SmoothCamera.ObjectY[0])" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ObjectTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime[0]", + "<", + "TimeFromStart() - Object.Behavior::CurrentDelay()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "max(0, TimeDelta() * (1 - min(Object.Behavior::PropertyWaitingSpeedXMax() * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), Object.Behavior::PropertyWaitingSpeedYMax() * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Extra delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The time with delay is now between the first 2 indexes" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyDelayedCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsDelayed" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectTime" + ] + }, + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectX" + ] + }, + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__SmoothCamera.ObjectY" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraDelayCatchUpSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyCameraExtraDelay() / Object.Behavior::PropertyCameraDelayCatchUpDuration()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Start to catch up\"", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SmoothCamera::SmoothCamera::IsWaiting" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyCameraExtraDelay" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(0, Object.Behavior::PropertyCameraExtraDelay() -Object.Behavior::PropertyCameraDelayCatchUpSpeed() * TimeDelta())" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Catching up delay: \" + ToString(Object.Behavior::PropertyCameraExtraDelay())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera following target is delayed from the object.", + "fullName": "Camera is delayed", + "functionType": "Condition", + "name": "IsDelayed", + "private": true, + "sentence": "The camera of _PARAM0_ is delayed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::CurrentDelay()", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the current camera delay.", + "fullName": "Current delay", + "functionType": "Expression", + "name": "CurrentDelay", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCameraDelay() + Object.Behavior::PropertyCameraExtraDelay()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the camera following is waiting at a reduced speed.", + "fullName": "Camera is waiting", + "functionType": "Condition", + "name": "IsWaiting", + "private": true, + "sentence": "The camera of _PARAM0_ is waiting", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyWaitingEnd" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "TimeFromStart()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Add a position to the history for forecasting. This is called 2 times in UpadteDelayedPosition.", + "fullName": "Add forecast history position", + "functionType": "Action", + "group": "Private", + "name": "AddForecastHistoryPosition", + "private": true, + "sentence": "Add the time:_PARAM2_ and position: _PARAM3_; _PARAM4_ to the forecast history of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime", + "GetArgumentAsNumber(\"Time\")" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryX", + "GetArgumentAsNumber(\"ObjectX\")" + ] + }, + { + "type": { + "value": "ObjectVariablePushNumber" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryY", + "GetArgumentAsNumber(\"ObjectY\")" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions." + }, + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">=", + "3" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime[0]", + "<", + "TimeFromStart() - Object.Behavior::PropertyCameraDelay() - Object.Behavior::PropertyCameraExtraDelay() - Object.Behavior::PropertyForecastHistoryDuration()" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryTime", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryX", + "0" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveAt" + }, + "parameters": [ + "Object", + "__SmoothCamera.ForecastHistoryY", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "Time", + "name": "Time", + "type": "expression" + }, + { + "description": "Object X", + "name": "ObjectX", + "type": "expression" + }, + { + "description": "Object Y", + "name": "ObjectY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Update forecasted position. This is called in doStepPreEvents.", + "fullName": "Update forecasted position", + "functionType": "Action", + "group": "Private", + "name": "UpdateForecastedPosition", + "private": true, + "sentence": "Update forecasted position of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)", + ">=", + "2" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastHistoryDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::PropertyForecastTime" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Mean X", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanX" + }, + "parameters": [ + "Object", + "Behavior", + "/", + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Mean Y", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()])" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryMeanY" + }, + "parameters": [ + "Object", + "Behavior", + "/", + "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Mean: \" + ToString(Object.Behavior::PropertyForecastHistoryMeanX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryMeanY())", + "", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Variance and Covariance", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX(), 2)" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryVarianceY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY(), 2)" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryCovariance" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "(Object.Variable(__SmoothCamera.ForecastHistoryX[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanX())\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Object.Behavior::PropertyIndex()]) - Object.Behavior::PropertyForecastHistoryMeanY())" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Variances: \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceX()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryVarianceY()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryCovariance())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "<", + "1" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyDelayedCenterY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + ">=", + "1" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())", + ">=", + "1" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Linear function parameters", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + ">=", + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryMeanY() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanX()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Projection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Axis permutation to avoid a ratio between 2 numbers near 0." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyForecastHistoryVarianceX())", + "<", + "abs(Object.Behavior::PropertyForecastHistoryVarianceY())" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearA" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryCovariance() / Object.Behavior::PropertyForecastHistoryVarianceY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastHistoryLinearB" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyForecastHistoryMeanX() - Object.Behavior::PropertyForecastHistoryLinearA() * Object.Behavior::PropertyForecastHistoryMeanY()" + ] + } + ], + "events": [ + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Linear: \" + ToString(Object.Behavior::PropertyForecastHistoryLinearA()) + \" \" + ToString(Object.Behavior::PropertyForecastHistoryLinearB())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Projection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__SmoothCamera.ForecastHistoryY[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[0])", + "Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])", + "Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Permute back axis" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedOldestX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedOldestY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyIndex()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestX()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestY()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyIndex()" + ] + } + ] + } + ], + "parameters": [] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Oldest: \" + ToString(Object.Behavior::PropertyProjectedOldestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedOldestY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Newest: \" + ToString(Object.Behavior::PropertyProjectedNewestX()) + \" \" + ToString(Object.Behavior::PropertyProjectedNewestY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Forecasted position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestX() + ( Object.Behavior::PropertyProjectedNewestX() - Object.Behavior::PropertyProjectedOldestX()) * Object.Behavior::ForecastTimeRatio()" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyForecastedY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyProjectedNewestY() + ( Object.Behavior::PropertyProjectedNewestY() - Object.Behavior::PropertyProjectedOldestY()) * Object.Behavior::ForecastTimeRatio()" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Forecasted: \" + ToString(Object.Behavior::PropertyForecastedX()) + \" \" + ToString(Object.Behavior::PropertyForecastedY())", + "\"info\"", + "\"SmoothCamera\"" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Project history ends position to have the vector on the line from linear regression. This function is only called by UpdateForecastedPosition.", + "fullName": "Project history ends", + "functionType": "Action", + "group": "Private", + "name": "ProjectHistoryEnds", + "private": true, + "sentence": "Project history oldest: _PARAM2_;_PARAM3_ and newest position: _PARAM4_;_PARAM5_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(GetArgumentAsNumber(\"NewestX\") + (GetArgumentAsNumber(\"NewestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedNewestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"NewestY\") + (GetArgumentAsNumber(\"NewestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"NewestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "(GetArgumentAsNumber(\"OldestX\") + (GetArgumentAsNumber(\"OldestY\") - Object.Behavior::PropertyForecastHistoryLinearB()) * Object.Behavior::PropertyForecastHistoryLinearA()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetPropertyProjectedOldestY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"OldestY\") + (GetArgumentAsNumber(\"OldestX\") * Object.Behavior::PropertyForecastHistoryLinearA() - GetArgumentAsNumber(\"OldestY\") \n+ Object.Behavior::PropertyForecastHistoryLinearB()) / (1 + pow(Object.Behavior::PropertyForecastHistoryLinearA(), 2))" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + }, + { + "description": "OldestX", + "name": "OldestX", + "type": "expression" + }, + { + "description": "OldestY", + "name": "OldestY", + "type": "expression" + }, + { + "description": "Newest X", + "name": "NewestX", + "type": "expression" + }, + { + "description": "Newest Y", + "name": "NewestY", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Return the ratio between forecast time and the duration of the history. This function is only called by UpdateForecastedPosition.", + "fullName": "Forecast time ratio", + "functionType": "Expression", + "group": "Private", + "name": "ForecastTimeRatio", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "- Object.Behavior::PropertyForecastTime() / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothCamera", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0.9", + "type": "Number", + "label": "Leftward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "LeftwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Rightward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "RightwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "UpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward catch-up speed (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "DownwardSpeed" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on X axis", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FollowOnX" + }, + { + "value": "true", + "type": "Boolean", + "label": "Follow on Y axis", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "FollowOnY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area left border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaLeft" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area right border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaRight" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area top border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area bottom border", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FollowFreeAreaBottom" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Camera offset X", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "CameraOffsetX" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Camera offset Y", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "CameraOffsetY" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Camera delay", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "CameraDelay" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Forecast time", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "ForecastTime" + }, + { + "value": "0", + "type": "Number", + "unit": "Second", + "label": "Forecast history duration", + "description": "", + "group": "Timing", + "extraInformation": [], + "hidden": false, + "name": "ForecastHistoryDuration" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogLeftwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogRightwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogDownwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "LogUpwardSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DelayedCenterX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DelayedCenterY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryMeanX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryMeanY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryVarianceX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryCovariance" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryLinearA" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryLinearB" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastedX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastedY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedNewestX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedNewestY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedOldestX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProjectedOldestY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ForecastHistoryVarianceY" + }, + { + "value": "", + "type": "Number", + "label": "Index (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraDelayCatchUpSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraExtraDelay" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingSpeedXMax" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingSpeedYMax" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "WaitingEnd" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CameraDelayCatchUpDuration" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Leftward maximum speed", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "LeftwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Rightward maximum speed", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "RightwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Upward maximum speed", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "UpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Downward maximum speed", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "DownwardSpeedMax" + }, + { + "value": "", + "type": "Number", + "label": "OldX (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldX" + }, + { + "value": "", + "type": "Number", + "label": "OldY (local variable)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldY" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsCalledManually" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly scroll to follow a character and stabilize the camera when jumping.", + "fullName": "Smooth platformer camera", + "name": "SmoothPlatformerCamera", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorFollowFreeAreaTop()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorFollowFreeAreaBottom()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorUpwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorDownwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorUpwardSpeedMax()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyFloorDownwardSpeedMax()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + }, + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirFollowFreeAreaTop()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirFollowFreeAreaBottom()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirUpwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeed" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirDownwardSpeed()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirUpwardSpeedMax()", + "" + ] + }, + { + "type": { + "value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax" + }, + "parameters": [ + "Object", + "SmoothCamera", + "Object.Behavior::PropertyAirDownwardSpeedMax()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "SmoothCamera::SmoothPlatformerCamera", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerCharacter" + }, + { + "value": "", + "type": "Behavior", + "label": "Smooth camera behavior", + "description": "", + "group": "", + "extraInformation": [ + "SmoothCamera::SmoothCamera" + ], + "hidden": false, + "name": "SmoothCamera" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "JumpOriginY" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area top in the air", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "AirFollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area bottom in the air", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "AirFollowFreeAreaBottom" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area top on the floor", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FloorFollowFreeAreaTop" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Follow free area bottom on the floor", + "description": "", + "group": "Position", + "extraInformation": [], + "hidden": false, + "name": "FloorFollowFreeAreaBottom" + }, + { + "value": "0.95", + "type": "Number", + "label": "Upward speed in the air (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "AirUpwardSpeed" + }, + { + "value": "0.95", + "type": "Number", + "label": "Downward speed in the air (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "AirDownwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Upward speed on the floor (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "FloorUpwardSpeed" + }, + { + "value": "0.9", + "type": "Number", + "label": "Downward speed on the floor (in ratio per second)", + "description": "", + "group": "Catch-up speed", + "extraInformation": [], + "hidden": false, + "name": "FloorDownwardSpeed" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Upward maximum speed in the air", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "AirUpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Downward maximum speed in the air", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "AirDownwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Upward maximum speed on the floor", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "FloorUpwardSpeedMax" + }, + { + "value": "9000", + "type": "Number", + "unit": "PixelSpeed", + "label": "Downward maximum speed on the floor", + "description": "", + "group": "Maximum speed", + "extraInformation": [], + "hidden": false, + "name": "FloorDownwardSpeedMax" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Platformer character animator", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGc+DQoJPHBhdGggZD0iTTIzLDExYzIuMiwwLDQtMS44LDQtNHMtMS44LTQtNC00cy00LDEuOC00LDRTMjAuOCwxMSwyMywxMXoiLz4NCgk8cGF0aCBkPSJNMzAuOCwxMi40Yy0wLjMtMC40LTEtMC41LTEuNC0wLjJsLTIuOSwyLjNjLTAuOCwwLjctMiwwLjYtMi43LTAuMmwtNy45LTcuOWMtMS42LTEuNi00LjEtMS42LTUuNywwTDcuMyw5LjMNCgkJYy0wLjQsMC40LTAuNCwxLDAsMS40czEsMC40LDEuNCwwbDIuOC0yLjhjMC44LTAuOCwyLjEtMC44LDIuOSwwbDEuNiwxLjZMMTEuNiwxNGMtMSwxLTEuNCwyLjMtMS4xLDMuN2MwLjIsMS4xLDAuOSwyLDEuOCwyLjYNCgkJbC0xLjYsMS42Yy0wLjQsMC40LTEsMC40LTEuNCwwbC0zLjYtMy42Yy0wLjQtMC40LTEtMC40LTEuNCwwcy0wLjQsMSwwLDEuNGwzLjYsMy42YzAuNiwwLjYsMS4zLDAuOSwyLjEsMC45czEuNi0wLjMsMi4xLTAuOQ0KCQlsMi4xLTIuMWwyLjUsMWMwLjcsMC4zLDEuMiwxLDEuMiwxLjh2NmMwLDAuNiwwLjQsMSwxLDFzMS0wLjQsMS0xdi02YzAtMS42LTEtMy4xLTIuNS0zLjdsLTEuNy0wLjdsNS4yLTUuMmwxLjQsMS40DQoJCWMwLjgsMC44LDEuOCwxLjIsMi45LDEuMmMwLjksMCwxLjgtMC4zLDIuNS0wLjlsMi45LTIuM0MzMS4xLDEzLjQsMzEuMSwxMi44LDMwLjgsMTIuNHoiLz4NCjwvZz4NCjwvc3ZnPg0K", + "name": "PlatformerCharacterAnimator", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Glyphster Pack/Master/SVG/Sports and Fitness/Sports and Fitness_training_running_run.svg", + "shortDescription": "Change animations and horizontal flipping of a platformer character automatically.", + "version": "1.0.1", + "description": [ + "Automatically change the animations and horizontal flipping of a platformer character based on movement and interaction with platform objects.", + "", + "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer))." + ], + "origin": { + "identifier": "PlatformerCharacterAnimator", + "name": "gdevelop-extension-store" + }, + "tags": [ + "animations", + "platformer", + "flipping", + "automatic" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Change animations and horizontal flipping of a platformer character automatically.", + "fullName": "Platformer character animator", + "name": "PlatformerCharacterAnimator", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Flip character based on input from controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change animations", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyJumpAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyFallAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyRunAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyIdleAnimationName()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyClimbAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onActivate", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Flip character based on input from controls", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Right\"" + ] + }, + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsUsingControl" + }, + "parameters": [ + "Object", + "PlatformerBehavior", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change animations", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::PropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsJumping" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyJumpAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsFalling" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyFallAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnFloor" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyRunAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyIdleAnimationName()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyClimbAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlatformBehavior::IsOnLadder" + }, + "parameters": [ + "Object", + "PlatformerBehavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automated animation changes a platformer character. Disabling animation changes is useful to play custom animations.", + "fullName": "Enable (or disable) automated animation changes", + "functionType": "Action", + "name": "EnableChangingAnimations", + "sentence": "Enable automated animation changes on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableAnimationChanges\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableAnimationChanges" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Change animations automatically", + "name": "EnableAnimationChanges", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Enable (or disable) automated horizontal flipping of a platform character.", + "fullName": "Enable (or disable) automated horizontal flipping", + "functionType": "Action", + "name": "EnableHorizontalFlipping", + "sentence": "Enable automated horizontal flipping on _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"EnableHorizontalFlipping\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyEnableHorizontalFlipping" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Enable horizontal flipping", + "name": "EnableHorizontalFlipping", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Idle\" animation name. Do not use quotation marks.", + "fullName": "\"Idle\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetIdleAnimationName", + "sentence": "Set \"Idle\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyIdleAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Move\" animation name. Do not use quotation marks.", + "fullName": "\"Move\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetMoveAnimationName", + "sentence": "Set \"Move\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyRunAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Jump\" animation name. Do not use quotation marks.", + "fullName": "\"Jump\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetJumpAnimationName", + "sentence": "Set \"Jump\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyJumpAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Fall\" animation name. Do not use quotation marks.", + "fullName": "\"Fall\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetFallAnimationName", + "sentence": "Set \"Fall\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyFallAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Set the \"Climb\" animation name. Do not use quotation marks.", + "fullName": "\"Climb\" animation name", + "functionType": "Action", + "group": "Configure animations", + "name": "SetClimbAnimationName", + "sentence": "Set \"Climb\" animation of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlatformerCharacterAnimator::PlatformerCharacterAnimator::SetPropertyClimbAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"AnimationName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "type": "behavior" + }, + { + "description": "Animation name", + "name": "AnimationName", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "Enable animation changes", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "EnableAnimationChanges" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable horizontal flipping", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "EnableHorizontalFlipping" + }, + { + "value": "Idle", + "type": "String", + "label": "\"Idle\" animation name ", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "IdleAnimationName" + }, + { + "value": "Run", + "type": "String", + "label": "\"Run\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "RunAnimationName" + }, + { + "value": "Jump", + "type": "String", + "label": "\"Jump\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "JumpAnimationName" + }, + { + "value": "Fall", + "type": "String", + "label": "\"Fall\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "FallAnimationName" + }, + { + "value": "Climb", + "type": "String", + "label": "\"Climb\" animation name", + "description": "", + "group": "Animation names", + "extraInformation": [], + "hidden": false, + "name": "ClimbAnimationName" + }, + { + "value": "", + "type": "Behavior", + "label": "Platformer character", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "hidden": false, + "name": "PlatformerBehavior" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Record Movements", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlY29yZC1yZWMiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSw1QTcuNSw3LjUgMCAwLDAgNSwxMi41QTcuNSw3LjUgMCAwLDAgMTIuNSwyMEE3LjUsNy41IDAgMCwwIDIwLDEyLjVBNy41LDcuNSAwIDAsMCAxMi41LDVNNywxMEg5QTEsMSAwIDAsMSAxMCwxMVYxMkMxMCwxMi41IDkuNjIsMTIuOSA5LjE0LDEyLjk3TDEwLjMxLDE1SDkuMTVMOCwxM1YxNUg3TTEyLDEwSDE0VjExSDEyVjEySDE0VjEzSDEyVjE0SDE0VjE1SDEyQTEsMSAwIDAsMSAxMSwxNFYxMUExLDEgMCAwLDEgMTIsMTBNMTYsMTBIMThWMTFIMTZWMTRIMThWMTVIMTZBMSwxIDAgMCwxIDE1LDE0VjExQTEsMSAwIDAsMSAxNiwxME04LDExVjEySDlWMTEiIC8+PC9zdmc+", + "name": "RecordMovements", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f45c73c02542b0cd3a13ac5f0033603c44245bab1d4a5cc603f4f0923ea11f1a_record-rec.svg", + "shortDescription": "Record and playback movements of an object", + "version": "1.0.0", + "description": "", + "tags": [], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Load compression functions", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// Removed String-Buffer conversion functions from https://github.com/nodeca/pako/commit/23563dfae92cec9223804311a16636477ea6d7ab", + "", + "let STR_APPLY_UIA_OK = true;", + "", + "try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }", + "", + "function shrinkBuf(buf, size) {", + " if (buf.length === size) { return buf; }", + " if (buf.subarray) { return buf.subarray(0, size); }", + " buf.length = size;", + " return buf;", + "};", + "", + "function buf2binstring(buf) {", + " const len = buf.length;", + " // On Chrome, the arguments in a function call that are allowed is `65534`.", + " // If the length of the buffer is smaller than that, we can use this optimization,", + " // otherwise we will take a slower path.", + " if (len < 65534 && STR_APPLY_UIA_OK) {", + " return String.fromCharCode.apply(null, shrinkBuf(buf, len));", + " }", + " let result = '';", + " for (let i = 0; i < len; i++) {", + " result += String.fromCharCode(buf[i]);", + " }", + " return result;", + "}", + "", + "function binstring2buf(str) {", + " const buf = new Uint8Array(str.length);", + " for (let i = 0, len = buf.length; i < len; i++) {", + " buf[i] = str.charCodeAt(i);", + " }", + " return buf;", + "};", + "", + "gdjs._pakoTools = { binstring2buf, buf2binstring };", + "", + "/* This is Pako v2.0.4, find it on https://github.com/nodeca/pako. */", + "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e((t=\"undefined\"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){\"use strict\";function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const _=new Array(60);e(_);const f=new Array(512);e(f);const c=new Array(256);e(c);const u=new Array(29);e(u);const w=new Array(n);function b(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let g,p,m;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(w);const v=t=>t<256?f[t]:f[256+(t>>>7)],y=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{x(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const i=new Array(16);let n,r,l=0;for(n=1;n<=s;n++)i[n]=l=l+a[n-1]<<1;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=A(i[e]++,e))}},R=t=>{let e;for(e=0;e{t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let n,s,o,h,d=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===n?z(t,s,e):(o=c[s],z(t,o+a+1,e),h=r[o],0!==h&&(s-=u[o],x(t,s,h)),n--,o=v(n),z(t,o,i),h=l[o],0!==h&&(n-=w[o],x(t,n,h)))}while(d{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,r=e.stat_desc.elems;let l,o,h,d=-1;for(t.heap_len=0,t.heap_max=573,l=0;l>1;l>=1;l--)S(t,a,l);h=r;do{l=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=l,t.heap[--t.heap_max]=o,a[2*h]=a[2*l]+a[2*o],t.depth[h]=(t.depth[l]>=t.depth[o]?t.depth[l]:t.depth[o])+1,a[2*l+1]=a[2*o+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let d,_,f,c,u,w,b=0;for(c=0;c<=s;c++)t.bl_count[c]=0;for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++)_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,b++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=o&&(u=l[_-o]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));if(0!==b){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,b-=2}while(b>0);for(c=h;0!==c;c--)for(_=t.bl_count[c];0!==_;)f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--)}})(t,e),E(a,d,t.bl_count)},O=(t,e,a)=>{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++l{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++l{x(t,0+(i?1:0),3),((t,e,a,i)=>{Z(t),i&&(y(t,a),y(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a})(t,e,a,!0)};var N={_tr_init:t=>{F||((()=>{let t,e,a,h,k;const v=new Array(16);for(a=0,h=0;h<28;h++)for(u[h]=a,t=0;t<1<>=7;h{let s,r,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),((t,e,a,i)=>{let n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{x(t,2,3),z(t,256,d),(t=>{16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const C=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var M=(t,e,a,i)=>{const n=C,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},H={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:P,_tr_flush_block:Y,_tr_tally:G,_tr_align:X}=N,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:q,Z_FULL_FLUSH:J,Z_FINISH:Q,Z_BLOCK:V,Z_OK:$,Z_STREAM_END:tt,Z_STREAM_ERROR:et,Z_DATA_ERROR:at,Z_BUF_ERROR:it,Z_DEFAULT_COMPRESSION:nt,Z_FILTERED:st,Z_HUFFMAN_ONLY:rt,Z_RLE:lt,Z_FIXED:ot,Z_DEFAULT_STRATEGY:ht,Z_UNKNOWN:dt,Z_DEFLATED:_t}=j,ft=258,ct=262,ut=103,wt=113,bt=666,gt=(t,e)=>(t.msg=H[e],e),pt=t=>(t<<1)-(t>4?9:0),mt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let kt=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},yt=(t,e)=>{Y(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,vt(t.strm)},xt=(t,e)=>{t.pending_buf[t.pending++]=e},zt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=B(t.adler,e,n,a):2===t.state.wrap&&(t.adler=M(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},Et=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,l=t.nice_match;const o=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ft;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=l)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>o&&0!=--n);return r<=t.lookahead?r:t.lookahead},Rt=t=>{const e=t.w_size;let a,i,n,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ct)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,a=i;do{n=t.head[--a],t.head[a]=n>=e?n-e:0}while(--i);i=e,a=i;do{n=t.prev[--a],t.prev[a]=n>=e?n-e:0}while(--i);s+=e}if(0===t.strm.avail_in)break;if(i=At(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=kt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=kt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let a,i;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(i=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=kt(t,t.ins_h,t.window[t.strstart+1]);else i=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2},Ut=(t,e)=>{let a,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(yt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=G(t,0,t.window[t.strstart-1]),i&&yt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2};function St(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const Dt=[new St(0,0,0,0,((t,e)=>{let a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Rt(t),0===t.lookahead&&e===W)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,yt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(yt(t,!1),t.strm.avail_out),1)})),new St(4,4,8,4,Zt),new St(4,5,16,8,Zt),new St(4,6,32,32,Zt),new St(4,4,16,16,Ut),new St(8,16,32,32,Ut),new St(8,16,128,128,Ut),new St(8,32,128,256,Ut),new St(32,128,258,1024,Ut),new St(32,258,258,4096,Ut)];function Tt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ot=t=>{if(!t||!t.state)return gt(t,et);t.total_in=t.total_out=0,t.data_type=dt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=W,K(e),$},It=t=>{const e=Ot(t);var a;return e===$&&((a=t.state).window_size=2*a.w_size,mt(a.head),a.max_lazy_match=Dt[a.level].max_lazy,a.good_match=Dt[a.level].good_length,a.nice_match=Dt[a.level].nice_length,a.max_chain_length=Dt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ft=(t,e,a,i,n,s)=>{if(!t)return et;let r=1;if(e===nt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==_t||i<8||i>15||e<0||e>9||s<0||s>ot)return gt(t,et);8===i&&(i=9);const l=new Tt;return t.state=l,l.strm=t,l.wrap=r,l.gzhead=null,l.w_bits=i,l.w_size=1<Ft(t,e,_t,15,8,ht),deflateInit2:Ft,deflateReset:It,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?et:(t.state.gzhead=e,$):et,deflate:(t,e)=>{let a,i;if(!t||!t.state||e>V||e<0)return t?gt(t,et):et;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===bt&&e!==Q)return gt(t,0===t.avail_out?it:et);n.strm=t;const s=n.last_flush;if(n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,xt(n,31),xt(n,139),xt(n,8),n.gzhead?(xt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),xt(n,255&n.gzhead.time),xt(n,n.gzhead.time>>8&255),xt(n,n.gzhead.time>>16&255),xt(n,n.gzhead.time>>24&255),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(xt(n,255&n.gzhead.extra.length),xt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=M(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,3),n.status=wt);else{let e=_t+(n.w_bits-8<<4)<<8,a=-1;a=n.strategy>=rt||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=a<<6,0!==n.strstart&&(e|=32),e+=31-e%31,n.status=wt,zt(n,e),0!==n.strstart&&(zt(n,t.adler>>>16),zt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending!==n.pending_buf_size));)xt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.status=ut)}else n.status=ut;if(n.status===ut&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&vt(t),n.pending+2<=n.pending_buf_size&&(xt(n,255&t.adler),xt(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(vt(t),0===t.avail_out)return n.last_flush=-1,$}else if(0===t.avail_in&&pt(e)<=pt(s)&&e!==Q)return gt(t,it);if(n.status===bt&&0!==t.avail_in)return gt(t,it);if(0!==t.avail_in||0!==n.lookahead||e!==W&&n.status!==bt){let a=n.strategy===rt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(Rt(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===lt?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=ft){if(Rt(t),t.lookahead<=ft&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ft;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):Dt[n.level].func(n,e);if(3!==a&&4!==a||(n.status=bt),1===a||3===a)return 0===t.avail_out&&(n.last_flush=-1),$;if(2===a&&(e===q?X(n):e!==V&&(P(n,0,0,!1),e===J&&(mt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),vt(t),0===t.avail_out))return n.last_flush=-1,$}return e!==Q?$:n.wrap<=0?tt:(2===n.wrap?(xt(n,255&t.adler),xt(n,t.adler>>8&255),xt(n,t.adler>>16&255),xt(n,t.adler>>24&255),xt(n,255&t.total_in),xt(n,t.total_in>>8&255),xt(n,t.total_in>>16&255),xt(n,t.total_in>>24&255)):(zt(n,t.adler>>>16),zt(n,65535&t.adler)),vt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?$:tt)},deflateEnd:t=>{if(!t||!t.state)return et;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==ut&&e!==wt&&e!==bt?gt(t,et):(t.state=null,e===wt?gt(t,at):$)},deflateSetDictionary:(t,e)=>{let a=e.length;if(!t||!t.state)return et;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return et;if(1===n&&(t.adler=B(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(mt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Rt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=kt(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Rt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=l,t.avail_in=s,i.wrap=n,$},deflateInfo:\"pako deflate (from Nodeca project)\"};const Nt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Bt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if(\"object\"!=typeof a)throw new TypeError(a+\"must be non-object\");for(const e in a)Nt(a,e)&&(t[e]=a[e])}}return t},Ct=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ht[254]=Ht[254]=1;var jt=t=>{if(\"function\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,l=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},Kt=(t,e)=>{const a=e||t.length;if(\"function\"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Mt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a=\"\";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ht[t[a]]>e?a:e};var Yt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0};const Gt=Object.prototype.toString,{Z_NO_FLUSH:Xt,Z_SYNC_FLUSH:Wt,Z_FULL_FLUSH:qt,Z_FINISH:Jt,Z_OK:Qt,Z_STREAM_END:Vt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:te,Z_DEFLATED:ee}=j;function ae(t){this.options=Bt({level:$t,method:ee,chunkSize:16384,windowBits:15,memLevel:8,strategy:te},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Lt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Qt)throw new Error(H[a]);if(e.header&&Lt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t=\"string\"==typeof e.dictionary?jt(e.dictionary):\"[object ArrayBuffer]\"===Gt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Lt.deflateSetDictionary(this.strm,t),a!==Qt)throw new Error(H[a]);this._dict_set=!0}}function ie(t,e){const a=new ae(e);if(a.push(t,!0),a.err)throw a.msg||H[a.err];return a.result}ae.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Jt:Xt,\"string\"==typeof t?a.input=jt(t):\"[object ArrayBuffer]\"===Gt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Wt||s===qt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Lt.deflate(a,s),n===Vt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Lt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},ae.prototype.onData=function(t){this.chunks.push(t)},ae.prototype.onEnd=function(t){t===Qt&&(this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ne={Deflate:ae,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:j};var se=function(t,e){let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),l=E.dmax,o=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,b=(1<>>24,f>>>=m,c-=m,m=p>>>16&255,0===m)A[n++]=65535&p;else{if(!(16&m)){if(0==(64&m)){p=u[(65535&p)+(f&(1<>>=m,c-=m),c<15&&(f+=z[a++]<>>24,f>>>=m,c-=m,m=p>>>16&255,!(16&m)){if(0==(64&m)){p=w[(65535&p)+(f&(1<l){t.msg=\"invalid distance too far back\",E.mode=30;break t}if(f>>>=m,c-=m,m=n-s,v>m){if(m=v-m,m>h&&E.sane){t.msg=\"invalid distance too far back\",E.mode=30;break t}if(y=0,x=_,0===d){if(y+=o-m,m2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const o=l.bits;let h,d,_,f,c,u,w=0,b=0,g=0,p=0,m=0,k=0,v=0,y=0,x=0,z=0,A=null,E=0;const R=new Uint16Array(16),Z=new Uint16Array(16);let U,S,D,T=null,O=0;for(w=0;w<=re;w++)R[w]=0;for(b=0;b=1&&0===R[p];p--);if(m>p&&(m=p),0===p)return n[s++]=20971520,n[s++]=20971520,l.bits=1,0;for(g=1;g0&&(0===t||1!==p))return-1;for(Z[1]=0,w=1;w852||2===t&&x>592)return 1;for(;;){U=w-v,r[b]u?(S=T[O+r[b]],D=A[E+r[b]]):(S=96,D=0),h=1<>v)+d]=U<<24|S<<16|D|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,b++,0==--R[w]){if(w===p)break;w=e[a+r[b]]}if(w>m&&(z&f)!==_){for(0===v&&(v=m),c+=g,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=m<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),l.bits=m,0};const{Z_FINISH:fe,Z_BLOCK:ce,Z_TREES:ue,Z_OK:we,Z_STREAM_END:be,Z_NEED_DICT:ge,Z_STREAM_ERROR:pe,Z_DATA_ERROR:me,Z_MEM_ERROR:ke,Z_BUF_ERROR:ve,Z_DEFLATED:ye}=j,xe=12,ze=30,Ae=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function Ee(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Re=t=>{if(!t||!t.state)return pe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg=\"\",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,we},Ze=t=>{if(!t||!t.state)return pe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Re(t)},Ue=(t,e)=>{let a;if(!t||!t.state)return pe;const i=t.state;return e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?pe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,Ze(t))},Se=(t,e)=>{if(!t)return pe;const a=new Ee;t.state=a,a.window=null;const i=Ue(t,e);return i!==we&&(t.state=null),i};let De,Te,Oe=!0;const Ie=t=>{if(Oe){De=new Int32Array(512),Te=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(_e(1,t.lens,0,288,De,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;_e(2,t.lens,0,32,Te,0,t.work,{bits:5}),Oe=!1}t.lencode=De,t.lenbits=9,t.distcode=Te,t.distbits=5},Fe=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whaveSe(t,15),inflateInit2:Se,inflate:(t,e)=>{let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return pe;a=t.state,a.mode===xe&&(a.mode=13),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,_=l,f=o,x=we;t:for(;;)switch(a.mode){case 1:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0),h=0,d=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg=\"incorrect header check\",a.mode=ze;break}if((15&h)!==ye){t.msg=\"unknown compression method\",a.mode=ze;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg=\"invalid window size\",a.mode=ze;break}a.dmax=1<>8&1),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=3;case 3:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=M(a.check,A,4,0)),h=0,d=0,a.mode=4;case 4:for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>8),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(c=a.length,c>l&&(c=l),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===l)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=xe;break;case 10:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===l)break t;l--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=14;break;case 1:if(Ie(a),a.mode=20,e===ue){h>>>=2,d-=2;break t}break;case 2:a.mode=17;break;case 3:t.msg=\"invalid block type\",a.mode=ze}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break t;l--,h+=i[s++]<>>16^65535)){t.msg=\"invalid stored block lengths\",a.mode=ze;break}if(a.length=65535&h,h=0,d=0,a.mode=15,e===ue)break t;case 15:a.mode=16;case 16:if(c=a.length,c){if(c>l&&(c=l),c>o&&(c=o),0===c)break t;n.set(i.subarray(s,s+c),r),l-=c,s+=c,o-=c,r+=c,a.length-=c;break}a.mode=xe;break;case 17:for(;d<14;){if(0===l)break t;l--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg=\"too many length or distance symbols\",a.mode=ze;break}a.have=0,a.mode=18;case 18:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=_e(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg=\"invalid code lengths set\",a.mode=ze;break}a.have=0,a.mode=19;case 19:for(;a.have>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=b,d-=b,a.lens[a.have++]=p;else{if(16===p){for(R=b+2;d>>=b,d-=b,0===a.have){t.msg=\"invalid bit length repeat\",a.mode=ze;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===p){for(R=b+3;d>>=b,d-=b,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=b+7;d>>=b,d-=b,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg=\"invalid bit length repeat\",a.mode=ze;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===ze)break;if(0===a.lens[256]){t.msg=\"invalid code -- missing end-of-block\",a.mode=ze;break}if(a.lenbits=9,E={bits:a.lenbits},x=_e(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg=\"invalid literal/lengths set\",a.mode=ze;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=_e(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg=\"invalid distances set\",a.mode=ze;break}if(a.mode=20,e===ue)break t;case 20:a.mode=21;case 21:if(l>=6&&o>=258){t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,se(t,f),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,a.mode===xe&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,a.length=p,0===g){a.mode=26;break}if(32&g){a.back=-1,a.mode=xe;break}if(64&g){t.msg=\"invalid literal/length code\",a.mode=ze;break}a.extra=15&g,a.mode=22;case 22:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;z=a.distcode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,64&g){t.msg=\"invalid distance code\",a.mode=ze;break}a.offset=p,a.extra=15&g,a.mode=24;case 24:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg=\"invalid distance too far back\",a.mode=ze;break}a.mode=25;case 25:if(0===o)break t;if(c=f-o,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg=\"invalid distance too far back\",a.mode=ze;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>o&&(c=o),o-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=21);break;case 26:if(0===o)break t;n[r++]=a.length,o--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===l)break t;l--,h|=i[s++]<{if(!t||!t.state)return pe;let e=t.state;return e.window&&(e.window=null),t.state=null,we},inflateGetHeader:(t,e)=>{if(!t||!t.state)return pe;const a=t.state;return 0==(2&a.wrap)?pe:(a.head=e,e.done=!1,we)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return t&&t.state?(i=t.state,0!==i.wrap&&11!==i.mode?pe:11===i.mode&&(n=1,n=B(n,e,a,0),n!==i.check)?me:(s=Fe(t,e,a,a),s?(i.mode=31,ke):(i.havedict=1,we))):pe},inflateInfo:\"pako inflate (from Nodeca project)\"};var Ne=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1};const Be=Object.prototype.toString,{Z_NO_FLUSH:Ce,Z_FINISH:Me,Z_OK:He,Z_STREAM_END:je,Z_NEED_DICT:Ke,Z_STREAM_ERROR:Pe,Z_DATA_ERROR:Ye,Z_MEM_ERROR:Ge}=j;function Xe(t){this.options=Bt({chunkSize:65536,windowBits:15,to:\"\"},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Le.inflateInit2(this.strm,e.windowBits);if(a!==He)throw new Error(H[a]);if(this.header=new Ne,Le.inflateGetHeader(this.strm,this.header),e.dictionary&&(\"string\"==typeof e.dictionary?e.dictionary=jt(e.dictionary):\"[object ArrayBuffer]\"===Be.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Le.inflateSetDictionary(this.strm,e.dictionary),a!==He)))throw new Error(H[a])}function We(t,e){const a=new Xe(e);if(a.push(t),a.err)throw a.msg||H[a.err];return a.result}Xe.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,l;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Me:Ce,\"[object ArrayBuffer]\"===Be.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Le.inflate(a,r),s===Ke&&n&&(s=Le.inflateSetDictionary(a,n),s===He?s=Le.inflate(a,r):s===Ye&&(s=Ke));a.avail_in>0&&s===je&&a.state.wrap>0&&0!==t[a.next_in];)Le.inflateReset(a),s=Le.inflate(a,r);switch(s){case Pe:case Ye:case Ke:case Ge:return this.onEnd(s),this.ended=!0,!1}if(l=a.avail_out,a.next_out&&(0===a.avail_out||s===je))if(\"string\"===this.options.to){let t=Pt(a.output,a.next_out),e=a.next_out-t,n=Kt(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==He||0!==l){if(s===je)return s=Le.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},Xe.prototype.onData=function(t){this.chunks.push(t)},Xe.prototype.onEnd=function(t){t===He&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var qe={Inflate:Xe,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:j};const{Deflate:Je,deflate:Qe,deflateRaw:Ve,gzip:$e}=ne,{Inflate:ta,inflate:ea,inflateRaw:aa,ungzip:ia}=qe;var na=Je,sa=Qe,ra=Ve,la=$e,oa=ta,ha=ea,da=aa,_a=ia,fa=j,ca={Deflate:na,deflate:sa,deflateRaw:ra,gzip:la,Inflate:oa,inflate:ha,inflateRaw:da,ungzip:_a,constants:fa};t.Deflate=na,t.Inflate=oa,t.constants=fa,t.default=ca,t.deflate=sa,t.deflateRaw=ra,t.gzip=la,t.inflate=ha,t.inflateRaw=da,t.ungzip=_a,Object.defineProperty(t,\"__esModule\",{value:!0})}));" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Compress a string.", + "fullName": "Compress String", + "functionType": "StringExpression", + "name": "Compress", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "eventsFunctionContext.returnValue = gdjs._pakoTools.buf2binstring(pako.deflate(eventsFunctionContext.getArgument(\"comp\")));\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "String to compress", + "name": "comp", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Decompress a string.", + "fullName": "Decompress String", + "functionType": "StringExpression", + "name": "Decompress", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "eventsFunctionContext.returnValue = pako.inflate(gdjs._pakoTools.binstring2buf(eventsFunctionContext.getArgument(\"comp\")), { to: \"string\" });\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "String to decompress", + "name": "comp", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Local storage has playback data.", + "fullName": "Local storage has playback data ", + "functionType": "Condition", + "name": "LocalStorageHasData", + "sentence": "Local storage has playback data named _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"__PlaybackMovements\"", + "GetArgumentAsString(\"StorageGroup\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Storage group name", + "name": "StorageGroup", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Copy an object variable to another object.", + "fullName": "Copy an object variable to another object", + "functionType": "Action", + "name": "CopyObjectVariableToObject", + "sentence": "Copy variable _PARAM1_ of _PARAM2_ into _PARAM3_ of _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "function copyVariable(sourceVar, destVar) {", + " if (sourceVar.isNumber()) {", + " destVar.setNumber(sourceVar.getAsNumber());", + " } else if (sourceVar.isString()) {", + " destVar.setString(sourceVar.getAsString());", + " } else if (sourceVar.isStructure()) {", + " sourceVar.getAllChildrenNames().forEach(childName => {", + " if (!destVar.hasChild(childName)) {", + " destVar.addChild(childName);", + " }", + " copyVariable(sourceVar.getChild(childName), destVar.getChild(childName));", + " });", + " }", + "}", + "", + "const sourceObject = eventsFunctionContext.getObjects(\"SourceObject\")[0];", + "const targetObject = eventsFunctionContext.getObjects(\"TargetObject\")[0];", + "const sourceVariableName = eventsFunctionContext.getArgument(\"SourceVariableName\");", + "const targetVariableName = eventsFunctionContext.getArgument(\"TargetVariableName\");", + "", + "const sourceVariable = sourceObject.getVariables().get(sourceVariableName);", + "const targetVariable = targetObject.getVariables().get(targetVariableName);", + "", + "copyVariable(sourceVariable, targetVariable);" + ], + "parameterObjects": "SourceObject", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Source Variable Name", + "name": "SourceVariableName", + "type": "string" + }, + { + "description": "Source Object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Target Variable Name", + "name": "TargetVariableName", + "type": "string" + }, + { + "description": "Target Object", + "name": "TargetObject", + "type": "objectList" + } + ], + "objectGroups": [ + { + "name": "Group", + "objects": [ + { + "name": "SourceObject" + }, + { + "name": "DestinationObject" + } + ] + } + ] + }, + { + "description": "Delete the scene variable, the variable will be deleted from the memory.", + "fullName": "Delete scene variable", + "functionType": "Action", + "group": "Scene variables", + "name": "DeleteSceneVariable", + "sentence": "Delete the scene variable _PARAM1_ from memory", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "runtimeScene.getVariables().remove(eventsFunctionContext.getArgument(\"SceneVariableName\"));", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Name of the scene variable to delete", + "name": "SceneVariableName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Copy the object variable from one object to another.", + "fullName": "Copy an object variable", + "functionType": "Action", + "group": "Object variables", + "name": "CopyObjectVariable", + "sentence": "Copy the variable _PARAM2_ of _PARAM1_ to the variable _PARAM4_ of _PARAM3_ (clear destination first: _PARAM5_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const sourceObject = eventsFunctionContext.getObjects(\"SourceObject\")[0];", + "const targetObject = eventsFunctionContext.getObjects(\"TargetObject\")[0];", + "const sourceVariableName = eventsFunctionContext.getArgument(\"SourceVariableName\");", + "const targetVariableName = eventsFunctionContext.getArgument(\"TargetVariableName\");", + "const isExactCopy = eventsFunctionContext.getArgument(\"isExactCopy\");", + "", + "const sourceVariables = sourceObject.getVariables();", + "const targetVariables = targetObject.getVariables();", + "", + "if (sourceVariables.has(sourceVariableName))", + "{", + " gdjs.Variable.copy", + " (", + " sourceVariables.get(sourceVariableName),", + " targetVariables.get(targetVariableName),", + " isExactCopy", + " );", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Source object", + "name": "SourceObject", + "type": "objectList" + }, + { + "description": "Variable to copy", + "name": "SourceVariableName", + "type": "string" + }, + { + "description": "Destination object", + "longDescription": "To copy the variable between 2 instances of the same object, the variable has to be copied to another object first.", + "name": "TargetObject", + "type": "objectList" + }, + { + "description": "Destination variable", + "name": "TargetVariableName", + "type": "string" + }, + { + "defaultValue": "yes", + "description": "Clear the destination variable before copying", + "name": "isExactCopy", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Color tint applied to an object.", + "fullName": "Color tint applied to an object", + "functionType": "ExpressionAndCondition", + "name": "ColorTint", + "sentence": "Color tint applied to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Return the color string for the tint applied to the object" + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "/** @type {gdjs.SpriteRuntimeObject} */\r", + "const tintedObject = objects[0];\r", + "const tint = tintedObject.getColor();\r", + "eventsFunctionContext.returnValue = tint;" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Get shortest recordings from Firebase.", + "fullName": "Get shortest recordings from Firebase", + "functionType": "Action", + "name": "GetShortestRecordingsFromFirebase", + "private": true, + "sentence": "Get _PARAM1_ recordings from Firebase collection _PARAM2_ sorted by shortest duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Firebase::FirestoreStartQuery" + }, + "parameters": [ + "\"GetShortestRecordings\"", + "GetArgumentAsString(\"FirebaseCollection\")" + ] + }, + { + "type": { + "value": "Firebase::FirestoreQueryOrderBy" + }, + "parameters": [ + "\"GetShortestRecordings\"", + "\"RecordingDuration\"", + "\"asc\"" + ] + }, + { + "type": { + "value": "Firebase::FirestoreQueryLimit" + }, + "parameters": [ + "\"GetShortestRecordings\"", + "GetArgumentAsNumber(\"NumberOfRecordings\")", + "no" + ] + }, + { + "type": { + "value": "Firebase::FirestoreExecuteQuery" + }, + "parameters": [ + "\"GetShortestRecordings\"", + "__PlaybackMovements_SortedRecordings", + "__PlaybackMovements_GetSortedRecordings_Status" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Wait for Firebase query success" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "2" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Number of recordings", + "name": "NumberOfRecordings", + "type": "expression" + }, + { + "description": "Firebase collection", + "name": "FirebaseCollection", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Get highest scores from Firebase.", + "fullName": "Get highest scores from Firebase", + "functionType": "Action", + "name": "GetHighestScoresFromFirebase", + "private": true, + "sentence": "Get _PARAM1_ recordings from Firebase collection _PARAM2_ sorted by highest score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Firebase::FirestoreStartQuery" + }, + "parameters": [ + "\"GetHighestScores\"", + "GetArgumentAsString(\"FirebaseCollection\")" + ] + }, + { + "type": { + "value": "Firebase::FirestoreQueryOrderBy" + }, + "parameters": [ + "\"GetHighestScores\"", + "\"Score\"", + "\"desc\"" + ] + }, + { + "type": { + "value": "Firebase::FirestoreQueryLimit" + }, + "parameters": [ + "\"GetHighestScores\"", + "GetArgumentAsNumber(\"NumberOfRecordings\")", + "no" + ] + }, + { + "type": { + "value": "Firebase::FirestoreExecuteQuery" + }, + "parameters": [ + "\"GetHighestScores\"", + "__PlaybackMovements_SortedRecordings", + "__PlaybackMovements_GetSortedRecordings_Status" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Wait for Firebase query success" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "2" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Number of recordings", + "name": "NumberOfRecordings", + "type": "expression" + }, + { + "description": "Firebase collection", + "name": "FirebaseCollection", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Create objects to playback sorted recordings. One object is created for each available recording.", + "fullName": "Create objects from sorted recordings", + "functionType": "Action", + "name": "CreateObjectsFromSortedRecordings", + "private": true, + "sentence": "Create instances of _PARAM1_ from sorted recordings", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Create objects", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::ForEachChildVariable", + "iterableVariableName": "__PlaybackMovements_SortedRecordings.docs", + "valueIteratorVariableName": "child", + "keyIteratorVariableName": "childname", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Uncompress (if needed) and delete compressed data" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VariableChildExists" + }, + "parameters": [ + "child.data", + "\"CompressedFrameData\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "JSONToVariableStructure" + }, + "parameters": [ + "RecordMovements::Decompress(VariableString(child.data.CompressedFrameData))", + "child.data.MovementData" + ] + }, + { + "type": { + "value": "VariableRemoveChild" + }, + "parameters": [ + "child.data", + "\"CompressedFrameData\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save the order of each recording, based on sorting method" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "child.data.Rank", + "=", + "Variable(childname) + 1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Create object and copy recording data" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Object", + "0", + "0", + "\"\"" + ] + }, + { + "type": { + "value": "JSONToObjectVariableStructure" + }, + "parameters": [ + "ToJSON(child.data)", + "Object", + "__PlaybackMovements.PlaybackSession" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::UpdateObjectToMatchPlayback" + }, + "parameters": [ + "Object", + "Behavior", + "0", + "" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Cleanup", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Delete recordings to save memory" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "__PlaybackMovements_SortedRecordings" + ] + }, + { + "type": { + "value": "VariableClearChildren" + }, + "parameters": [ + "child" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Create objects to playback recordings from Firebase. One object is created for each available recording.", + "fullName": "Create objects using shortest recordings from Firebase", + "functionType": "Action", + "name": "CreateObjectsFromShortestRecordingsFirebase", + "sentence": "Create _PARAM3_ instances of _PARAM1_ using shortest recordings from Firebase collection _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::GetShortestRecordingsFromFirebase" + }, + "parameters": [ + "", + "GetArgumentAsNumber(\"ObjectQuantity\")", + "GetArgumentAsString(\"FirebaseCollection\")", + "GetArgumentAsString(\"FirebaseCollection\")" + ] + }, + { + "type": { + "value": "RecordMovements::CreateObjectsFromSortedRecordings" + }, + "parameters": [ + "", + "Object", + "Behavior", + "GetArgumentAsNumber(\"ObjectQuantity\")" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "description": "Objects to create", + "name": "ObjectQuantity", + "supplementaryInformation": "Sprite", + "type": "expression" + }, + { + "description": "Firebase collection", + "name": "FirebaseCollection", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Create objects to playback recordings from Firebase. One object is created for each available recording.", + "fullName": "Create objects using highest scores from Firebase", + "functionType": "Action", + "name": "CreateObjectsFromHighestScoresFirebase", + "sentence": "Create _PARAM3_ instances of _PARAM1_ using highest scores from Firebase collection _PARAM4_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::GetHighestScoresFromFirebase" + }, + "parameters": [ + "", + "GetArgumentAsNumber(\"ObjectQuantity\")", + "GetArgumentAsString(\"FirebaseCollection\")", + "GetArgumentAsString(\"FirebaseCollection\")" + ] + }, + { + "type": { + "value": "RecordMovements::CreateObjectsFromSortedRecordings" + }, + "parameters": [ + "", + "Object", + "Behavior", + "GetArgumentAsNumber(\"ObjectQuantity\")" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "description": "Objects to create", + "name": "ObjectQuantity", + "supplementaryInformation": "Sprite", + "type": "expression" + }, + { + "description": "Firebase collection", + "name": "FirebaseCollection", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "Record movements of an object.", + "fullName": "Record movements", + "name": "RecordMovements", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 254, + "colorG": 19, + "colorR": 144, + "creationTime": 0, + "name": "Recording", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop recording if max duration is reached", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Recording\"" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyMaxRecordingDuration" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_RecordingDuration\"", + ">=", + "Object.Behavior::PropertyMaxRecordingDuration()" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::StopRecording" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Record", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Recording\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Always record the very first frame. Use a timer for periodic recordings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"", + "<=", + "0" + ] + }, + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"", + ">=", + "1 / Object.Behavior::PropertyRecordingFrequency()" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Save data from the current frame", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Timestamp", + "=", + "Object.ObjectTimerElapsedTime(\"__RecordMovements_RecordingDuration\")" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.TimeDelta", + "=", + "TimeDelta()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.TimeBetweenRecordedFrames", + "=", + "Object.ObjectTimerElapsedTime(\"__RecordMovements_TimeSinceLastRecordedFrame\")" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordPosition" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.PositionX", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.PositionY", + "=", + "Object.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordAngle" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Angle", + "=", + "Object.Angle()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordAnimation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.AnimationNumber", + "=", + "Object.Animation()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.AnimationFrame", + "=", + "Object.Sprite()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordHorizontalFlip" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlippedX" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.HorizontalFlip", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FlippedX" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.HorizontalFlip", + "=" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordVerticalFlip" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FlippedY" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.VerticalFlip", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "FlippedY" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.VerticalFlip", + "=" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordVisibility" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Visible", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Visible" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Visible", + "=" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordSize" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Height", + "=", + "Object.Height()" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Width", + "=", + "Object.Width()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordOpacity" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Opacity", + "=", + "Object.Opacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordZorder" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Zorder", + "=", + "Object.ZOrder()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordLayer" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Layer", + "=", + "Object.Layer()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordTint" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarSceneTxt" + }, + "parameters": [ + "__RecordMovements.CurrentFrame.Tint", + "=", + "RecordMovements::ColorTint(Object)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Neither of these is working..." + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::CopyObjectVariable" + }, + "parameters": [ + "", + "Object", + "Object.Behavior::PropertyCustomObjectVariable()", + "Object", + "\"__RecordMovements.CurrentFrame.CustomVariable\"", + "no", + "" + ] + } + ] + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::CopyObjectVariableToObject" + }, + "parameters": [ + "", + "Object.Behavior::PropertyCustomObjectVariable()", + "Object", + "\"__RecordMovements.CurrentFrame.CustomVariable\"", + "Object", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Add frame data to RecordMovements array", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectVariablePush" + }, + "parameters": [ + "Object", + "__RecordMovements.MovementData", + "__RecordMovements.CurrentFrame" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Start recording movements of an object.", + "fullName": "Start recording movements", + "functionType": "Action", + "name": "StartRecording", + "sentence": "Start recording movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::ClearRecording" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_RecordingDuration\"" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"" + ] + }, + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.ObjectName", + "=", + "Object.ObjectName()" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__RecordMovements.RecordingStartTime", + "=", + "Time(\"timestamp\")" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::SetPropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Recording\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Paused\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimerPaused" + }, + "parameters": [ + "Object", + "\"__RecordingTimer\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_RecordingDuration\"" + ] + }, + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop recording movements of an object.", + "fullName": "Stop recording movements", + "functionType": "Action", + "name": "StopRecording", + "sentence": "Stop recording movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Recording\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use the GDevelop username if the user is authenticated. If not, use the name of the player object." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__RecordMovements", + "\"PlayerName\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.PlayerName", + "=", + "PlayerAuthentication::Username()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.PlayerName", + "=", + "Object.ObjectName()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_RecordingDuration\"" + ] + }, + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__RecordMovements.RecordingDuration", + "=", + "Object.ObjectTimerElapsedTime(\"__RecordMovements_RecordingDuration\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__RecordMovements.RecordingStopTime", + "=", + "Time(\"timestamp\")" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::SetPropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pause recording movements of an object.", + "fullName": "Pause recording movements", + "functionType": "Action", + "name": "PauseRecording", + "sentence": "Pause recording movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::PropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Recording\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_RecordingDuration\"" + ] + }, + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__RecordMovements_TimeSinceLastRecordedFrame\"" + ] + }, + { + "type": { + "value": "RecordMovements::RecordMovements::SetPropertyRecordingState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Paused\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change player name of recording. If not set, the authenticated player name will be used.", + "fullName": "Change player name of recording", + "functionType": "Action", + "name": "SetPlayerName", + "sentence": "Change player name to _PARAM2_ on recording of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.PlayerName", + "=", + "GetArgumentAsString(\"PlayerName\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + }, + { + "description": "Player name", + "name": "PlayerName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Change score of recording.", + "fullName": "Change score of recording", + "functionType": "Action", + "name": "SetScore", + "sentence": "Change score to _PARAM2_ on recording of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.Score", + "=", + "GetArgumentAsString(\"Score\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + }, + { + "description": "Score", + "name": "Score", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Clear recorded movements of an object.", + "fullName": "Clear recorded movements", + "functionType": "Action", + "name": "ClearRecording", + "sentence": "Clear recorded movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::StopRecording" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "__RecordMovements" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Save recorded movements to local storage.", + "fullName": "Save recorded movements to local storage", + "functionType": "Action", + "name": "SaveRecordingLocalStorage", + "sentence": "Save recorded movements of _PARAM0_ in local storage _PARAM2_. Use compression: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::StopRecording" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DeleteGroupFichier" + }, + "parameters": [ + "\"__RecordMovements\"", + "GetArgumentAsString(\"StorageGroup\")" + ] + }, + { + "type": { + "value": "EcrireFichierTxt" + }, + "parameters": [ + "\"__RecordMovements\"", + "GetArgumentAsString(\"StorageGroup\")", + "ObjectVarToJSON(Object, __RecordMovements.MovementData)" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + }, + { + "description": "Storage group name", + "name": "StorageGroup", + "type": "string" + }, + { + "defaultValue": "yes", + "description": "Compress data", + "longDescription": "Compression can reduce the size of data by ~85%.", + "name": "UseCompression", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Save recorded movements to Firebase.", + "fullName": "Save recorded movements to Firebase", + "functionType": "Action", + "name": "SaveRecordingFirebase", + "sentence": "Save recorded movements of _PARAM0_ to Firebase collection _PARAM3_. Use compression: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::RecordMovements::StopRecording" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"UseCompression\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjetTxt" + }, + "parameters": [ + "Object", + "__RecordMovements.CompressedFrameData", + "=", + "RecordMovements::Compress(ObjectVarToJSON(Object, __RecordMovements.MovementData))" + ] + }, + { + "type": { + "value": "ObjectVariableRemoveChild" + }, + "parameters": [ + "Object", + "__RecordMovements", + "\"MovementData\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "JSONToVariableStructure" + }, + "parameters": [ + "ObjectVarToJSON(Object, __RecordMovements)", + "__RecordMovements.TempSaveStorage" + ] + }, + { + "type": { + "value": "Firebase::FirestoreAddDocument" + }, + "parameters": [ + "GetArgumentAsString(\"FirebaseCollection\")", + "__RecordMovements.TempSaveStorage", + "__RecordMovements.FirebaseSaveStatus" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Create a recursive function to check status variable (with fallback timer)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "2" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::RecordMovements", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Compress data", + "longDescription": "Compression can reduce the size of data by ~85%.", + "name": "UseCompression", + "optional": true, + "type": "yesorno" + }, + { + "description": "Firebase collection", + "name": "FirebaseCollection", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "20", + "type": "Number", + "unit": "Dimensionless", + "label": "Recording frequency (frames per second)", + "description": "Lower to save resources and storage. Increase for more accuracy.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordingFrequency" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Recording", + "Saving" + ], + "hidden": true, + "name": "RecordingState" + }, + { + "value": "true", + "type": "Boolean", + "label": "Record position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordPosition" + }, + { + "value": "true", + "type": "Boolean", + "label": "Record angle", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordAngle" + }, + { + "value": "true", + "type": "Boolean", + "label": "Record horizontal flip", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordHorizontalFlip" + }, + { + "value": "true", + "type": "Boolean", + "label": "Record vertical flip", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordVerticalFlip" + }, + { + "value": "true", + "type": "Boolean", + "label": "Record animation state", + "description": "Includes the animation number and frame number", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordAnimation" + }, + { + "value": "false", + "type": "Boolean", + "label": "Record size", + "description": "Includes the height and width", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordSize" + }, + { + "value": "", + "type": "Boolean", + "label": "Record opacity", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordOpacity" + }, + { + "value": "", + "type": "Boolean", + "label": "Record Z-order", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordZorder" + }, + { + "value": "", + "type": "Boolean", + "label": "Record visibility", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordVisibility" + }, + { + "value": "", + "type": "Boolean", + "label": "Record layer", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordLayer" + }, + { + "value": "", + "type": "Boolean", + "label": "Record tint", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "RecordTint" + }, + { + "value": "", + "type": "String", + "label": "Object variable to save in the recording", + "description": "To save multiple pieces of data, select a structure variable", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CustomObjectVariable" + }, + { + "value": "", + "type": "Number", + "unit": "Second", + "label": "Max recording duration", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "MaxRecordingDuration" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Playback the movements of an object that was previously recorded.", + "fullName": "Playback movements", + "name": "PlaybackMovements", + "objectType": "Sprite", + "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": "Animations are controlled manually by playback" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Playback", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Playback\"" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate the relative time spent in the recording vs time spent in this playback frame", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Frames before the second recorded frame won't have a value for \"time between recorded frames\" so assume they have the same time delta" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.NormalizedFrameDuration", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + ">=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.NormalizedFrameDuration", + "=", + "TimeDelta() / Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[floor(Object.Variable(__PlaybackMovements.PlaybackFrame))].TimeBetweenRecordedFrames)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change value of playback frame based on the relative speed and speed multiplier", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "+", + "Object.Behavior::PlaybackSpeedMultiplier() * Object.Variable(__PlaybackMovements.NormalizedFrameDuration)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "-", + "Object.Behavior::PlaybackSpeedMultiplier() * Object.Variable(__PlaybackMovements.NormalizedFrameDuration)" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply playback data to object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This function handles interpolating values between recorded frames" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::UpdateObjectToMatchPlayback" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__PlaybackMovements.PlaybackFrame)", + "" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "async": true, + "description": "Load recorded movements from local storage.", + "fullName": "Load recorded movements from local storage", + "functionType": "Action", + "name": "LoadRecording_LocalStorage", + "sentence": "Load recorded movements from local storage _PARAM2_ to _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::DeleteSceneVariable" + }, + "parameters": [ + "", + "\"__PlaybackMovements.TempStorage\"", + "" + ] + }, + { + "type": { + "value": "LireFichierTxt" + }, + "parameters": [ + "\"__PlaybackMovements\"", + "GetArgumentAsString(\"StorageName\")", + "", + "__PlaybackMovements.TempStorage" + ] + }, + { + "type": { + "value": "JSONToObjectVariableStructure" + }, + "parameters": [ + "VariableString(__PlaybackMovements.TempStorage)", + "Object", + "__PlaybackMovements.PlaybackData" + ] + }, + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "description": "Local storage name", + "name": "StorageName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Update object to match playback data for the current frame.", + "fullName": "Update object to match playback", + "functionType": "Action", + "name": "UpdateObjectToMatchPlayback", + "sentence": "Update _PARAM0_ to match playback data for the current frame", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Force playback frame number to be valid", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep playback in bounds of recording" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "=", + "clamp(Object.Variable(__PlaybackMovements.PlaybackFrame), 0, Object.Behavior::TotalFramesInRecording() - 1)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Temp variables (to reduce complexity and repetition)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrameInteger", + "=", + "floor(Object.Variable(__PlaybackMovements.PlaybackFrame))" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.FramePercentComplete", + "=", + "Object.Variable(__PlaybackMovements.PlaybackFrame) - Object.Variable(__PlaybackMovements.PlaybackFrameInteger)" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "disabled": true, + "name": "TODO: Use temp variables to reduce complexity and repetition (this does not work)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::CopyObjectVariableToObject" + }, + "parameters": [ + "", + "VariableString(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)])", + "Object", + "VariableString(__PlaybackMovements.PrevFrameData)", + "Object", + "" + ] + }, + { + "type": { + "value": "RecordMovements::CopyObjectVariableToObject" + }, + "parameters": [ + "", + "VariableString(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))])", + "Object", + "VariableString(__PlaybackMovements.NextFrameData)", + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::CopyObjectVariable" + }, + "parameters": [ + "", + "Object", + "VariableString(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)])", + "Object", + "VariableString(__PlaybackMovements.PrevFrameData)", + "", + "" + ] + }, + { + "type": { + "value": "RecordMovements::CopyObjectVariable" + }, + "parameters": [ + "", + "Object", + "VariableString(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))])", + "Object", + "VariableString(__PlaybackMovements.NextFrameData)", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PrevFrameData", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)])" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.NextFrameData", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))])" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move object using recorded movements", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: Short version of interpolation using intermediate variables (this does not work)" + }, + { + "disabled": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackPosition" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"PositionX\"" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"PositionY\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PrevFrameData.PositionX), \nObject.Variable(__PlaybackMovements.NextFrameData.PositionX), \nObject.Variable(__PlaybackMovements.FramePercentComplete))", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PrevFrameData.PositionY), \nObject.Variable(__PlaybackMovements.NextFrameData.PositionY), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackPosition" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"PositionX\"" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"PositionY\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].PositionX)", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].PositionY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreXY" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].PositionX), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].PositionX), Object.Variable(__PlaybackMovements.FramePercentComplete))", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].PositionY), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].PositionY), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackAngle" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Angle\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Angle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "lerpAngle(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Angle), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].Angle), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackHeight" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Height\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeHeight" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Height)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeHeight" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Height), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].Height), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackWidth" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Width\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeWidth" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Width)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeWidth" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Width), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].Width), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackZorder" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Zorder\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Zorder)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Zorder), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].Zorder), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackOpacity" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Opacity\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[floor(Object.Variable(__PlaybackMovements.PlaybackFrameInteger))].Opacity)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Object", + "=", + "lerp(\nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Opacity), \nObject.Variable(__PlaybackMovements.PlaybackSession.MovementData[ceil(Object.Variable(__PlaybackMovements.PlaybackFrame))].Opacity), \nObject.Variable(__PlaybackMovements.FramePercentComplete))" + ] + } + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Discrete states (cannot interpolate)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackHorizontalFlip" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"HorizontalFlip\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].HorizontalFlip", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].HorizontalFlip", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipX" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackVerticalFlip" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"VerticalFlip\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].VerticalFlip", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipY" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].VerticalFlip", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "FlipY" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackTint" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"Tint\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "Object.VariableString(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].Tint)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackAnimation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"AnimationNumber\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeAnimation" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].AnimationNumber)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)]", + "\"AnimationFrame\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeSprite" + }, + "parameters": [ + "Object", + "=", + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrameInteger)].AnimationFrame)" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Start playback of recorded movements.", + "fullName": "Start playback", + "functionType": "Action", + "name": "StartPlayback", + "sentence": "Start playback of recorded movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlaybackMovements_PlaybackTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Paused\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "UnPauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlaybackMovements_PlaybackTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Playback\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pause playback of recorded movements of an object.", + "fullName": "Pause playback", + "functionType": "Action", + "name": "PausePlayback", + "sentence": "Pause playback of recorded movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Playback\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PauseObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlaybackMovements_PlaybackTimer\"" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Paused\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop playback of recorded movements of an object.", + "fullName": "Stop playback", + "functionType": "Action", + "name": "StopPlayback", + "sentence": "Stop playback of recorded movements of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Playback\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RemoveObjectTimer" + }, + "parameters": [ + "Object", + "\"__PlaybackMovements_PlaybackTimer\"" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"idle\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Playback is playing.", + "fullName": "Playback is playing", + "functionType": "Condition", + "name": "PlaybackIsActive", + "sentence": "Playback of _PARAM0_ is playing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Playback\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Playback is paused.", + "fullName": "Playback is paused", + "functionType": "Condition", + "name": "PlaybackIsPaused", + "sentence": "Playback of _PARAM0_ is paused", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyPlaybackState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Paused\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Playback has finished by reaching the end of the recording.", + "fullName": "Playback has finished", + "functionType": "Condition", + "name": "PlaybackHasFinished", + "sentence": "Playback on _PARAM0_ has finished", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RecordMovements::PlaybackMovements::PropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlaybackFrameNumber" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::TotalFramesInRecording() - 1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::PlaybackFrameNumber" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change playback position by a number of frames. Use negative numbers to move towards the start.", + "fullName": "Change playback position by a number of frames", + "functionType": "Action", + "name": "ChangePlaybackPositionRelative", + "sentence": "Change playback position of _PARAM0_ by _PARAM2_ frames", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "=", + "Object.Variable(__PlaybackMovements.PlaybackFrame) + GetArgumentAsNumber(\"Frames\")" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::UpdateObjectToMatchPlayback" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__PlaybackMovements.PlaybackFrame)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "description": "Frames", + "name": "Frames", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set playback frame to a specific freame.", + "fullName": "Set playback frame", + "functionType": "Action", + "name": "ChangePlaybackPositionAbsolute", + "sentence": "Set playback position of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackFrame", + "=", + "GetArgumentAsNumber(\"Frame\")" + ] + }, + { + "type": { + "value": "RecordMovements::PlaybackMovements::UpdateObjectToMatchPlayback" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Variable(__PlaybackMovements.PlaybackFrame)", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "description": "Frame", + "name": "Frame", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "total frames in recording", + "fullName": "Total frames in recording", + "functionType": "ExpressionAndCondition", + "name": "TotalFramesInRecording", + "sentence": "Total frames in recording", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.VariableChildCount(__PlaybackMovements.PlaybackSession.MovementData)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Playback frame number that is currently being used.", + "fullName": "Playback frame number", + "functionType": "ExpressionAndCondition", + "name": "PlaybackFrameNumber", + "sentence": "Playback frame number", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__PlaybackMovements.PlaybackFrame)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Playback time from recording ", + "fullName": "Playback time from recording", + "functionType": "ExpressionAndCondition", + "name": "PlaybackTime", + "sentence": "Playback time from recording ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__PlaybackMovements.PlaybackSession.MovementData[Object.Variable(__PlaybackMovements.PlaybackFrame)].Timestamp)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Player name that was used in the recording.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "Player name that was used in the recording", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableChildExists" + }, + "parameters": [ + "Object", + "__PlaybackMovements.PlaybackSession", + "\"PlayerName\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.VariableString(__PlaybackMovements.PlaybackSession.PlayerName)" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object name that was used in the recording.", + "fullName": "Object name", + "functionType": "ExpressionAndCondition", + "name": "ObjectName", + "sentence": "Object name that was used in the recording", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.VariableString(__PlaybackMovements.PlaybackSession.ObjectName)" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "rank from sorted recordings.", + "fullName": "Rank", + "functionType": "ExpressionAndCondition", + "name": "Rank", + "sentence": "Rank from sorted recordings.", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Variable(__PlaybackMovements.PlaybackSession.Rank)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if using reverse direction for playback.", + "fullName": "Use reverse direction", + "functionType": "Condition", + "group": "Playback movements configuration", + "name": "UseReverseDirection", + "sentence": "_PARAM0_ using reverse direction for playback", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if using reverse direction for playback.", + "fullName": "Use reverse direction", + "functionType": "Action", + "group": "Playback movements configuration", + "name": "SetUseReverseDirection", + "sentence": "_PARAM0_ using reverse direction for playback: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyUseReverseDirection" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Use reverse direction", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "the playback speed multiplier of the object.", + "fullName": "Playback speed multiplier", + "functionType": "ExpressionAndCondition", + "group": "Playback movements configuration", + "name": "PlaybackSpeedMultiplier", + "sentence": "playback speed multiplier", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPlaybackSpeedMultiplier()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PlaybackSpeedMultiplier", + "name": "SetPlaybackSpeedMultiplier", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyPlaybackSpeedMultiplier" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if using interpolation (smoothing).", + "fullName": "Use interpolation (smoothing)", + "functionType": "Condition", + "group": "Playback movements configuration", + "name": "UseInterpolation", + "sentence": "_PARAM0_ using interpolation (smoothing) for playback", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::PropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change if using interpolation (smoothing).", + "fullName": "Use interpolation (smoothing)", + "functionType": "Action", + "group": "Playback movements configuration", + "name": "SetUseInterpolation", + "sentence": "_PARAM0_ using interpolation (smoothing) for playback: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RecordMovements::PlaybackMovements::SetPropertyUseInterpolation" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RecordMovements::PlaybackMovements", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "Use interpolation", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "Idle", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Loading", + "Playback" + ], + "hidden": true, + "name": "PlaybackState" + }, + { + "value": "true", + "type": "Boolean", + "label": "Playback position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackPosition" + }, + { + "value": "true", + "type": "Boolean", + "label": "Playback angle", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackAngle" + }, + { + "value": "true", + "type": "Boolean", + "label": "Playback animation state", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackAnimation" + }, + { + "value": "true", + "type": "Boolean", + "label": "Playback horizontal flip", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackHorizontalFlip" + }, + { + "value": "true", + "type": "Boolean", + "label": "Playback vertical flip", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackVerticalFlip" + }, + { + "value": "false", + "type": "Boolean", + "label": "Playback height", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackHeight" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback width", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackWidth" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback opacity", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackOpacity" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback Z-order", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackZorder" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback visibility", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackVisibility" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback layer", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackLayer" + }, + { + "value": "", + "type": "Boolean", + "label": "Playback tint", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackTint" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Playback speed multiplier", + "description": "For instance, 1 is used for normal playback speed, 0.5 is half-speed, and 2 is double speed.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "PlaybackSpeedMultiplier" + }, + { + "value": "", + "type": "Boolean", + "label": "Use reverse direction", + "description": "Reverse direction moves towards the start of the recording.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "UseReverseDirection" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use interpolation (smoothing)", + "description": "Move the object smoothly between the values in the recording.", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "UseInterpolation" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file diff --git a/examples/ghost-racer/preview.png b/examples/ghost-racer/preview.png new file mode 100644 index 000000000..0f58005f8 Binary files /dev/null and b/examples/ghost-racer/preview.png differ