diff --git a/examples/moving-saw-platformer/Preview.png b/examples/moving-saw-platformer/Preview.png new file mode 100644 index 000000000..44c9420d8 Binary files /dev/null and b/examples/moving-saw-platformer/Preview.png differ diff --git a/examples/moving-saw-platformer/README.md b/examples/moving-saw-platformer/README.md new file mode 100644 index 000000000..eef750d83 --- /dev/null +++ b/examples/moving-saw-platformer/README.md @@ -0,0 +1,3 @@ +Demonstrates how to make an object follow the rectangular border of another object. +This can be used for hazards such as moving saws, or to visually control the movement +paths of NPCs in your game. diff --git a/examples/moving-saw-platformer/assets/9patch_Bordered Hud_all_32.png b/examples/moving-saw-platformer/assets/9patch_Bordered Hud_all_32.png new file mode 100644 index 000000000..d78abacbf Binary files /dev/null and b/examples/moving-saw-platformer/assets/9patch_Bordered Hud_all_32.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_dead.png b/examples/moving-saw-platformer/assets/Blue player_dead.png new file mode 100644 index 000000000..ffccb59a9 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_dead.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_duck.png b/examples/moving-saw-platformer/assets/Blue player_duck.png new file mode 100644 index 000000000..e6aca27db Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_duck.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_fall.png b/examples/moving-saw-platformer/assets/Blue player_fall.png new file mode 100644 index 000000000..f85f007dc Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_fall.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_hit.png b/examples/moving-saw-platformer/assets/Blue player_hit.png new file mode 100644 index 000000000..88af0b8fe Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_hit.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_roll.png b/examples/moving-saw-platformer/assets/Blue player_roll.png new file mode 100644 index 000000000..de8bbadbc Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_roll.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_stand.png b/examples/moving-saw-platformer/assets/Blue player_stand.png new file mode 100644 index 000000000..2ebd04b06 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_stand.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_swim_1.png b/examples/moving-saw-platformer/assets/Blue player_swim_1.png new file mode 100644 index 000000000..772d4e7d5 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_swim_1.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_swim_2.png b/examples/moving-saw-platformer/assets/Blue player_swim_2.png new file mode 100644 index 000000000..22c3bdb15 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_swim_2.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_switch_1.png b/examples/moving-saw-platformer/assets/Blue player_switch_1.png new file mode 100644 index 000000000..757333e88 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_switch_1.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_switch_2.png b/examples/moving-saw-platformer/assets/Blue player_switch_2.png new file mode 100644 index 000000000..f9e10c0c8 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_switch_2.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_up_1.png b/examples/moving-saw-platformer/assets/Blue player_up_1.png new file mode 100644 index 000000000..75e91e62e Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_up_1.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_up_2.png b/examples/moving-saw-platformer/assets/Blue player_up_2.png new file mode 100644 index 000000000..8b925863f Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_up_2.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_up_3.png b/examples/moving-saw-platformer/assets/Blue player_up_3.png new file mode 100644 index 000000000..f4cf4a4f3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_up_3.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_walk_1.png b/examples/moving-saw-platformer/assets/Blue player_walk_1.png new file mode 100644 index 000000000..64c5f7a07 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_walk_1.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_walk_2.png b/examples/moving-saw-platformer/assets/Blue player_walk_2.png new file mode 100644 index 000000000..feafd206f Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_walk_2.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_walk_3.png b/examples/moving-saw-platformer/assets/Blue player_walk_3.png new file mode 100644 index 000000000..c3ca57fdf Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_walk_3.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_walk_4.png b/examples/moving-saw-platformer/assets/Blue player_walk_4.png new file mode 100644 index 000000000..7230aa615 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_walk_4.png differ diff --git a/examples/moving-saw-platformer/assets/Blue player_walk_5.png b/examples/moving-saw-platformer/assets/Blue player_walk_5.png new file mode 100644 index 000000000..a3491aaa2 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Blue player_walk_5.png differ diff --git a/examples/moving-saw-platformer/assets/Climb.png b/examples/moving-saw-platformer/assets/Climb.png new file mode 100644 index 000000000..2239b4293 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb.png differ diff --git a/examples/moving-saw-platformer/assets/Climb10.png b/examples/moving-saw-platformer/assets/Climb10.png new file mode 100644 index 000000000..aff2199b2 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb10.png differ diff --git a/examples/moving-saw-platformer/assets/Climb11.png b/examples/moving-saw-platformer/assets/Climb11.png new file mode 100644 index 000000000..852bdad7a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb11.png differ diff --git a/examples/moving-saw-platformer/assets/Climb12.png b/examples/moving-saw-platformer/assets/Climb12.png new file mode 100644 index 000000000..852bdad7a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb12.png differ diff --git a/examples/moving-saw-platformer/assets/Climb13.png b/examples/moving-saw-platformer/assets/Climb13.png new file mode 100644 index 000000000..a05065828 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb13.png differ diff --git a/examples/moving-saw-platformer/assets/Climb14.png b/examples/moving-saw-platformer/assets/Climb14.png new file mode 100644 index 000000000..a05065828 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb14.png differ diff --git a/examples/moving-saw-platformer/assets/Climb15.png b/examples/moving-saw-platformer/assets/Climb15.png new file mode 100644 index 000000000..f85b26721 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb15.png differ diff --git a/examples/moving-saw-platformer/assets/Climb16.png b/examples/moving-saw-platformer/assets/Climb16.png new file mode 100644 index 000000000..f85b26721 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb16.png differ diff --git a/examples/moving-saw-platformer/assets/Climb2.png b/examples/moving-saw-platformer/assets/Climb2.png new file mode 100644 index 000000000..2239b4293 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb2.png differ diff --git a/examples/moving-saw-platformer/assets/Climb3.png b/examples/moving-saw-platformer/assets/Climb3.png new file mode 100644 index 000000000..f85b26721 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb3.png differ diff --git a/examples/moving-saw-platformer/assets/Climb4.png b/examples/moving-saw-platformer/assets/Climb4.png new file mode 100644 index 000000000..f85b26721 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb4.png differ diff --git a/examples/moving-saw-platformer/assets/Climb5.png b/examples/moving-saw-platformer/assets/Climb5.png new file mode 100644 index 000000000..a05065828 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb5.png differ diff --git a/examples/moving-saw-platformer/assets/Climb6.png b/examples/moving-saw-platformer/assets/Climb6.png new file mode 100644 index 000000000..a05065828 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb6.png differ diff --git a/examples/moving-saw-platformer/assets/Climb7.png b/examples/moving-saw-platformer/assets/Climb7.png new file mode 100644 index 000000000..852bdad7a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb7.png differ diff --git a/examples/moving-saw-platformer/assets/Climb8.png b/examples/moving-saw-platformer/assets/Climb8.png new file mode 100644 index 000000000..852bdad7a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb8.png differ diff --git a/examples/moving-saw-platformer/assets/Climb9.png b/examples/moving-saw-platformer/assets/Climb9.png new file mode 100644 index 000000000..aff2199b2 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Climb9.png differ diff --git a/examples/moving-saw-platformer/assets/Energy Bar.png b/examples/moving-saw-platformer/assets/Energy Bar.png new file mode 100644 index 000000000..cce76fe2c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Energy Bar.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_1.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_1.png new file mode 100644 index 000000000..7f75b3476 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_1.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_10.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_10.png new file mode 100644 index 000000000..99a46d2f3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_10.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_11.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_11.png new file mode 100644 index 000000000..e9e7409c3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_11.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_12.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_12.png new file mode 100644 index 000000000..09940e39b Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_12.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_13.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_13.png new file mode 100644 index 000000000..28e98fb2c Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_13.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_14.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_14.png new file mode 100644 index 000000000..28e98fb2c Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_14.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_15.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_15.png new file mode 100644 index 000000000..1d86301b5 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_15.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_16.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_16.png new file mode 100644 index 000000000..1d86301b5 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_16.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_17.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_17.png new file mode 100644 index 000000000..a6f2cd64c Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_17.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_18.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_18.png new file mode 100644 index 000000000..a6f2cd64c Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_18.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_19.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_19.png new file mode 100644 index 000000000..44a2e9f6b Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_19.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_2.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_2.png new file mode 100644 index 000000000..9b6b490fc Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_2.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_20.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_20.png new file mode 100644 index 000000000..44a2e9f6b Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_20.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_3.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_3.png new file mode 100644 index 000000000..dd742fc78 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_3.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_4.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_4.png new file mode 100644 index 000000000..a25d13f02 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_4.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_5.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_5.png new file mode 100644 index 000000000..c6f991ea2 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_5.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_6.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_6.png new file mode 100644 index 000000000..52a4b8a73 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_6.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_7.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_7.png new file mode 100644 index 000000000..dac9338a2 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_7.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_8.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_8.png new file mode 100644 index 000000000..e3a685db1 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_8.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Fire_9.png b/examples/moving-saw-platformer/assets/GreenHero_Fire_9.png new file mode 100644 index 000000000..99a46d2f3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Fire_9.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Pose1.png b/examples/moving-saw-platformer/assets/GreenHero_Pose1.png new file mode 100644 index 000000000..29eb95496 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Pose1.png differ diff --git a/examples/moving-saw-platformer/assets/GreenHero_Pose2.png b/examples/moving-saw-platformer/assets/GreenHero_Pose2.png new file mode 100644 index 000000000..4ccc010f3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/GreenHero_Pose2.png differ diff --git a/examples/moving-saw-platformer/assets/Idle41.png b/examples/moving-saw-platformer/assets/Idle41.png new file mode 100644 index 000000000..1b691f09f Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle41.png differ diff --git a/examples/moving-saw-platformer/assets/Idle42.png b/examples/moving-saw-platformer/assets/Idle42.png new file mode 100644 index 000000000..1b691f09f Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle42.png differ diff --git a/examples/moving-saw-platformer/assets/Idle43.png b/examples/moving-saw-platformer/assets/Idle43.png new file mode 100644 index 000000000..1b691f09f Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle43.png differ diff --git a/examples/moving-saw-platformer/assets/Idle44.png b/examples/moving-saw-platformer/assets/Idle44.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle44.png differ diff --git a/examples/moving-saw-platformer/assets/Idle45.png b/examples/moving-saw-platformer/assets/Idle45.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle45.png differ diff --git a/examples/moving-saw-platformer/assets/Idle46.png b/examples/moving-saw-platformer/assets/Idle46.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle46.png differ diff --git a/examples/moving-saw-platformer/assets/Idle47.png b/examples/moving-saw-platformer/assets/Idle47.png new file mode 100644 index 000000000..d30df1539 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle47.png differ diff --git a/examples/moving-saw-platformer/assets/Idle48.png b/examples/moving-saw-platformer/assets/Idle48.png new file mode 100644 index 000000000..d30df1539 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle48.png differ diff --git a/examples/moving-saw-platformer/assets/Idle49.png b/examples/moving-saw-platformer/assets/Idle49.png new file mode 100644 index 000000000..058c15d2b Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle49.png differ diff --git a/examples/moving-saw-platformer/assets/Idle50.png b/examples/moving-saw-platformer/assets/Idle50.png new file mode 100644 index 000000000..058c15d2b Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle50.png differ diff --git a/examples/moving-saw-platformer/assets/Idle51.png b/examples/moving-saw-platformer/assets/Idle51.png new file mode 100644 index 000000000..ec508a1e3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle51.png differ diff --git a/examples/moving-saw-platformer/assets/Idle52.png b/examples/moving-saw-platformer/assets/Idle52.png new file mode 100644 index 000000000..ec508a1e3 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle52.png differ diff --git a/examples/moving-saw-platformer/assets/Idle53.png b/examples/moving-saw-platformer/assets/Idle53.png new file mode 100644 index 000000000..4fff9f72e Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle53.png differ diff --git a/examples/moving-saw-platformer/assets/Idle54.png b/examples/moving-saw-platformer/assets/Idle54.png new file mode 100644 index 000000000..4fff9f72e Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle54.png differ diff --git a/examples/moving-saw-platformer/assets/Idle55.png b/examples/moving-saw-platformer/assets/Idle55.png new file mode 100644 index 000000000..2bf6fce16 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle55.png differ diff --git a/examples/moving-saw-platformer/assets/Idle56.png b/examples/moving-saw-platformer/assets/Idle56.png new file mode 100644 index 000000000..2bf6fce16 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle56.png differ diff --git a/examples/moving-saw-platformer/assets/Idle57.png b/examples/moving-saw-platformer/assets/Idle57.png new file mode 100644 index 000000000..2bf6fce16 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle57.png differ diff --git a/examples/moving-saw-platformer/assets/Idle58.png b/examples/moving-saw-platformer/assets/Idle58.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle58.png differ diff --git a/examples/moving-saw-platformer/assets/Idle59.png b/examples/moving-saw-platformer/assets/Idle59.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle59.png differ diff --git a/examples/moving-saw-platformer/assets/Idle60.png b/examples/moving-saw-platformer/assets/Idle60.png new file mode 100644 index 000000000..0efce8793 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Idle60.png differ diff --git a/examples/moving-saw-platformer/assets/Jump35.png b/examples/moving-saw-platformer/assets/Jump35.png new file mode 100644 index 000000000..dd1aee8af Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump35.png differ diff --git a/examples/moving-saw-platformer/assets/Jump36.png b/examples/moving-saw-platformer/assets/Jump36.png new file mode 100644 index 000000000..dd1aee8af Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump36.png differ diff --git a/examples/moving-saw-platformer/assets/Jump37.png b/examples/moving-saw-platformer/assets/Jump37.png new file mode 100644 index 000000000..8c0b3f8ef Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump37.png differ diff --git a/examples/moving-saw-platformer/assets/Jump38.png b/examples/moving-saw-platformer/assets/Jump38.png new file mode 100644 index 000000000..8c0b3f8ef Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump38.png differ diff --git a/examples/moving-saw-platformer/assets/Jump39.png b/examples/moving-saw-platformer/assets/Jump39.png new file mode 100644 index 000000000..b0c0f1803 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump39.png differ diff --git a/examples/moving-saw-platformer/assets/Jump40.png b/examples/moving-saw-platformer/assets/Jump40.png new file mode 100644 index 000000000..b0c0f1803 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump40.png differ diff --git a/examples/moving-saw-platformer/assets/Jump41.png b/examples/moving-saw-platformer/assets/Jump41.png new file mode 100644 index 000000000..d5f1970f9 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump41.png differ diff --git a/examples/moving-saw-platformer/assets/Jump42.png b/examples/moving-saw-platformer/assets/Jump42.png new file mode 100644 index 000000000..d3867a280 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump42.png differ diff --git a/examples/moving-saw-platformer/assets/Jump43.png b/examples/moving-saw-platformer/assets/Jump43.png new file mode 100644 index 000000000..55a4e62c4 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump43.png differ diff --git a/examples/moving-saw-platformer/assets/Jump44.png b/examples/moving-saw-platformer/assets/Jump44.png new file mode 100644 index 000000000..55a4e62c4 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump44.png differ diff --git a/examples/moving-saw-platformer/assets/Jump45.png b/examples/moving-saw-platformer/assets/Jump45.png new file mode 100644 index 000000000..e7eb3e4da Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump45.png differ diff --git a/examples/moving-saw-platformer/assets/Jump46.png b/examples/moving-saw-platformer/assets/Jump46.png new file mode 100644 index 000000000..e7eb3e4da Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump46.png differ diff --git a/examples/moving-saw-platformer/assets/Jump47.png b/examples/moving-saw-platformer/assets/Jump47.png new file mode 100644 index 000000000..b5b515c0c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump47.png differ diff --git a/examples/moving-saw-platformer/assets/Jump48.png b/examples/moving-saw-platformer/assets/Jump48.png new file mode 100644 index 000000000..b5b515c0c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump48.png differ diff --git a/examples/moving-saw-platformer/assets/Jump49.png b/examples/moving-saw-platformer/assets/Jump49.png new file mode 100644 index 000000000..b5b515c0c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump49.png differ diff --git a/examples/moving-saw-platformer/assets/Jump50.png b/examples/moving-saw-platformer/assets/Jump50.png new file mode 100644 index 000000000..b5b515c0c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump50.png differ diff --git a/examples/moving-saw-platformer/assets/Jump51.png b/examples/moving-saw-platformer/assets/Jump51.png new file mode 100644 index 000000000..b5b515c0c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Jump51.png differ diff --git a/examples/moving-saw-platformer/assets/Punch14.png b/examples/moving-saw-platformer/assets/Punch14.png new file mode 100644 index 000000000..e62cf671e Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch14.png differ diff --git a/examples/moving-saw-platformer/assets/Punch15.png b/examples/moving-saw-platformer/assets/Punch15.png new file mode 100644 index 000000000..1f5f20e19 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch15.png differ diff --git a/examples/moving-saw-platformer/assets/Punch16.png b/examples/moving-saw-platformer/assets/Punch16.png new file mode 100644 index 000000000..1f5f20e19 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch16.png differ diff --git a/examples/moving-saw-platformer/assets/Punch17.png b/examples/moving-saw-platformer/assets/Punch17.png new file mode 100644 index 000000000..b3b27c250 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch17.png differ diff --git a/examples/moving-saw-platformer/assets/Punch18.png b/examples/moving-saw-platformer/assets/Punch18.png new file mode 100644 index 000000000..b3b27c250 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch18.png differ diff --git a/examples/moving-saw-platformer/assets/Punch19.png b/examples/moving-saw-platformer/assets/Punch19.png new file mode 100644 index 000000000..b3b27c250 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch19.png differ diff --git a/examples/moving-saw-platformer/assets/Punch20.png b/examples/moving-saw-platformer/assets/Punch20.png new file mode 100644 index 000000000..bfa604e66 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch20.png differ diff --git a/examples/moving-saw-platformer/assets/Punch21.png b/examples/moving-saw-platformer/assets/Punch21.png new file mode 100644 index 000000000..bfa604e66 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch21.png differ diff --git a/examples/moving-saw-platformer/assets/Punch22.png b/examples/moving-saw-platformer/assets/Punch22.png new file mode 100644 index 000000000..a552dae6c Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch22.png differ diff --git a/examples/moving-saw-platformer/assets/Punch23.png b/examples/moving-saw-platformer/assets/Punch23.png new file mode 100644 index 000000000..09ca23525 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch23.png differ diff --git a/examples/moving-saw-platformer/assets/Punch24.png b/examples/moving-saw-platformer/assets/Punch24.png new file mode 100644 index 000000000..09ca23525 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch24.png differ diff --git a/examples/moving-saw-platformer/assets/Punch25.png b/examples/moving-saw-platformer/assets/Punch25.png new file mode 100644 index 000000000..09ca23525 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch25.png differ diff --git a/examples/moving-saw-platformer/assets/Punch26.png b/examples/moving-saw-platformer/assets/Punch26.png new file mode 100644 index 000000000..09ca23525 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Punch26.png differ diff --git a/examples/moving-saw-platformer/assets/Run29.png b/examples/moving-saw-platformer/assets/Run29.png new file mode 100644 index 000000000..f0ff62028 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run29.png differ diff --git a/examples/moving-saw-platformer/assets/Run30.png b/examples/moving-saw-platformer/assets/Run30.png new file mode 100644 index 000000000..7218aacc9 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run30.png differ diff --git a/examples/moving-saw-platformer/assets/Run31.png b/examples/moving-saw-platformer/assets/Run31.png new file mode 100644 index 000000000..8dbc2024b Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run31.png differ diff --git a/examples/moving-saw-platformer/assets/Run32.png b/examples/moving-saw-platformer/assets/Run32.png new file mode 100644 index 000000000..58793903b Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run32.png differ diff --git a/examples/moving-saw-platformer/assets/Run33.png b/examples/moving-saw-platformer/assets/Run33.png new file mode 100644 index 000000000..cf6c13069 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run33.png differ diff --git a/examples/moving-saw-platformer/assets/Run34.png b/examples/moving-saw-platformer/assets/Run34.png new file mode 100644 index 000000000..cf6c13069 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run34.png differ diff --git a/examples/moving-saw-platformer/assets/Run35.png b/examples/moving-saw-platformer/assets/Run35.png new file mode 100644 index 000000000..39b6f4e06 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run35.png differ diff --git a/examples/moving-saw-platformer/assets/Run36.png b/examples/moving-saw-platformer/assets/Run36.png new file mode 100644 index 000000000..f3009058b Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run36.png differ diff --git a/examples/moving-saw-platformer/assets/Run37.png b/examples/moving-saw-platformer/assets/Run37.png new file mode 100644 index 000000000..171e19b26 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run37.png differ diff --git a/examples/moving-saw-platformer/assets/Run38.png b/examples/moving-saw-platformer/assets/Run38.png new file mode 100644 index 000000000..ae5dde820 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run38.png differ diff --git a/examples/moving-saw-platformer/assets/Run39.png b/examples/moving-saw-platformer/assets/Run39.png new file mode 100644 index 000000000..3f3853c91 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run39.png differ diff --git a/examples/moving-saw-platformer/assets/Run40.png b/examples/moving-saw-platformer/assets/Run40.png new file mode 100644 index 000000000..3f3853c91 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run40.png differ diff --git a/examples/moving-saw-platformer/assets/Run41.png b/examples/moving-saw-platformer/assets/Run41.png new file mode 100644 index 000000000..5fbff6923 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run41.png differ diff --git a/examples/moving-saw-platformer/assets/Run42.png b/examples/moving-saw-platformer/assets/Run42.png new file mode 100644 index 000000000..5fbff6923 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Run42.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_Off.png b/examples/moving-saw-platformer/assets/Saw_Off.png new file mode 100644 index 000000000..368b463ea Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_Off.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_1.png b/examples/moving-saw-platformer/assets/Saw_On_1.png new file mode 100644 index 000000000..368b463ea Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_1.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_2.png b/examples/moving-saw-platformer/assets/Saw_On_2.png new file mode 100644 index 000000000..6c4d4a0fa Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_2.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_3.png b/examples/moving-saw-platformer/assets/Saw_On_3.png new file mode 100644 index 000000000..10fc2a484 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_3.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_4.png b/examples/moving-saw-platformer/assets/Saw_On_4.png new file mode 100644 index 000000000..d52a85acd Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_4.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_5.png b/examples/moving-saw-platformer/assets/Saw_On_5.png new file mode 100644 index 000000000..3a0e27d12 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_5.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_6.png b/examples/moving-saw-platformer/assets/Saw_On_6.png new file mode 100644 index 000000000..6c143571a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_6.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_7.png b/examples/moving-saw-platformer/assets/Saw_On_7.png new file mode 100644 index 000000000..516e953a7 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_7.png differ diff --git a/examples/moving-saw-platformer/assets/Saw_On_8.png b/examples/moving-saw-platformer/assets/Saw_On_8.png new file mode 100644 index 000000000..a332d72e1 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Saw_On_8.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Idle.png b/examples/moving-saw-platformer/assets/Trophy_Idle.png new file mode 100644 index 000000000..9c4d4a55d Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Idle.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_1.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_1.png new file mode 100644 index 000000000..4d14db670 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_1.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_2.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_2.png new file mode 100644 index 000000000..4d14db670 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_2.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_3.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_3.png new file mode 100644 index 000000000..4d14db670 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_3.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_4.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_4.png new file mode 100644 index 000000000..e911ca401 Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_4.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_5.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_5.png new file mode 100644 index 000000000..9c4d4a55d Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_5.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_6.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_6.png new file mode 100644 index 000000000..9c4d4a55d Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_6.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_7.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_7.png new file mode 100644 index 000000000..4f53f062a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_7.png differ diff --git a/examples/moving-saw-platformer/assets/Trophy_Pressed_8.png b/examples/moving-saw-platformer/assets/Trophy_Pressed_8.png new file mode 100644 index 000000000..4f53f062a Binary files /dev/null and b/examples/moving-saw-platformer/assets/Trophy_Pressed_8.png differ diff --git a/examples/moving-saw-platformer/moving-saw-platformer.json b/examples/moving-saw-platformer/moving-saw-platformer.json new file mode 100644 index 000000000..5c8f39f38 --- /dev/null +++ b/examples/moving-saw-platformer/moving-saw-platformer.json @@ -0,0 +1,29569 @@ +{ + "firstLayout": "Rectangle Movement", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.example.gamename", + "pixelsRounding": false, + "projectUuid": "83849273-cd13-491b-a1c0-00ed638a0c5e", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Moving Saw Platformer", + "description": "Demonstrate how to make objects move along the borders of another object.", + "author": "", + "windowWidth": 854, + "windowHeight": 480, + "latestCompilationDirectory": "", + "maxFPS": 60, + "minFPS": 20, + "verticalSync": false, + "platformSpecificAssets": { + "android-icon-144": "", + "android-icon-192": "", + "android-icon-36": "", + "android-icon-48": "", + "android-icon-72": "", + "android-icon-96": "", + "android-windowSplashScreenAnimatedIcon": "", + "desktop-icon-512": "", + "ios-icon-100": "", + "ios-icon-1024": "", + "ios-icon-114": "", + "ios-icon-120": "", + "ios-icon-144": "", + "ios-icon-152": "", + "ios-icon-167": "", + "ios-icon-180": "", + "ios-icon-20": "", + "ios-icon-29": "", + "ios-icon-40": "", + "ios-icon-50": "", + "ios-icon-57": "", + "ios-icon-58": "", + "ios-icon-60": "", + "ios-icon-72": "", + "ios-icon-76": "", + "ios-icon-80": "", + "ios-icon-87": "", + "liluo-thumbnail": "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": "bottom-left", + "showWatermark": true + }, + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "authorUsernames": [ + "VictrisGames" + ], + "categories": [], + "playableDevices": [ + "keyboard", + "gamepad" + ], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/Saw_Off.png", + "kind": "image", + "metadata": "", + "name": "Saw_Off.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/8215537950e4e02640f87df890132c2d9c19c42dbaf5d0cc8237272112941978_Saw_Off.png", + "name": "Saw_Off.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_1.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_1.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/8215537950e4e02640f87df890132c2d9c19c42dbaf5d0cc8237272112941978_Saw_On_1.png", + "name": "Saw_On_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_2.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_2.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/1d982f3e006a7ac6b76bca8cefbf716fd017b25f7e0218942276b4dd92ac1813_Saw_On_2.png", + "name": "Saw_On_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_3.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_3.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/b208726b0292bb1f401f3738902ec190c004841ae8c555b2817d9f19ef46ca62_Saw_On_3.png", + "name": "Saw_On_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_4.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_4.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/b6119060081879814ea630f152a39fb3c303d421b797515814c045b73b94abdf_Saw_On_4.png", + "name": "Saw_On_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_5.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_5.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/2cfa1cffe1380dd56016085e018c4b68844c6f669e67925dd365481f8ef26586_Saw_On_5.png", + "name": "Saw_On_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_6.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_6.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/75d8836f8bfc835f3217c0468d04f8aae970f136231c792f1251b73f5e868058_Saw_On_6.png", + "name": "Saw_On_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_7.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_7.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/6351b1a83d1930df91b19b49cc23a375aa154ee74f7a31280acc6abb6f1b1fd2_Saw_On_7.png", + "name": "Saw_On_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Saw_On_8.png", + "kind": "image", + "metadata": "", + "name": "Saw_On_8.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Traps/Saw/63cce13ef5f9e917ed2de1359357510061e462e6cc8183553c0fb0c70a3c03f9_Saw_On_8.png", + "name": "Saw_On_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/9patch_Bordered Hud_all_32.png", + "kind": "image", + "metadata": "", + "name": "9patch_Bordered Hud_all_32.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Western FPS 2D/Hud/998f3521bccc8b5fedee0a2f6891d6c2604964a6cb048c4858575443b3634f4d_9patch_Bordered Hud_all_32.png", + "name": "9patch_Bordered Hud_all_32.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_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/Climb.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb2.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb2", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb3.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb3", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb4.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb4", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb5.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb5", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb6.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb6", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb7.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb7", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb8.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb8", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb9.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb9", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb10.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb10", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb11.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb11", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb12.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb12", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb13.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb13", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb14.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb14", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb15.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb15", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Climb16.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Climb16", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Jump35.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump35", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump36.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump36", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump37.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump37", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump38.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump38", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump39.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump39", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump40.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump40", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump41.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump41", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump42.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump42", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump43.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump43", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump44.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump44", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump45.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump45", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump46.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump46", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump47.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump47", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump48.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump48", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump49.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump49", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump50.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump50", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Jump51.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Jump51", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Run29.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run29", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run30.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run30", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run31.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run31", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run32.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run32", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run33.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run33", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run34.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run34", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run35.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run35", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run36.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run36", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run37.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run37", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run38.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run38", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run39.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run39", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run40.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run40", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run41.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run41", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Run42.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Run42", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch14.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch14", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch15.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch15", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch16.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch16", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch17.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch17", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch18.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch18", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch19.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch19", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch20.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch20", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch21.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch21", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch22.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch22", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch23.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch23", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch24.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch24", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch25.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch25", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Punch26.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Punch26", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Idle.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Idle.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/210269c05dbd0f77c102edae234bc9b136fa43b1e4b7837145d463e9f7d96646_Trophy_Idle.png", + "name": "Trophy_Idle.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_1.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_1.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/e5535f87ec94bbd5675a85c21b5326222b6a98716376affde9be37dccab66df7_Trophy_Pressed_1.png", + "name": "Trophy_Pressed_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_2.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_2.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/e5535f87ec94bbd5675a85c21b5326222b6a98716376affde9be37dccab66df7_Trophy_Pressed_2.png", + "name": "Trophy_Pressed_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_3.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_3.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/e5535f87ec94bbd5675a85c21b5326222b6a98716376affde9be37dccab66df7_Trophy_Pressed_3.png", + "name": "Trophy_Pressed_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_4.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_4.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/488dc86910ab0eab2e0297381864563a189bb636b5c17ea661d0377d6f113a40_Trophy_Pressed_4.png", + "name": "Trophy_Pressed_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_5.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_5.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/210269c05dbd0f77c102edae234bc9b136fa43b1e4b7837145d463e9f7d96646_Trophy_Pressed_5.png", + "name": "Trophy_Pressed_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_6.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_6.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/210269c05dbd0f77c102edae234bc9b136fa43b1e4b7837145d463e9f7d96646_Trophy_Pressed_6.png", + "name": "Trophy_Pressed_6.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_7.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_7.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/e028bfa643dced611129a9b72b7fe394013952b46a8833947adea351779bf4a3_Trophy_Pressed_7.png", + "name": "Trophy_Pressed_7.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Trophy_Pressed_8.png", + "kind": "image", + "metadata": "", + "name": "Trophy_Pressed_8.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Pixel Adventure Pack/Items/Checkpoints/e028bfa643dced611129a9b72b7fe394013952b46a8833947adea351779bf4a3_Trophy_Pressed_8.png", + "name": "Trophy_Pressed_8.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Idle41.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle41", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle42.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle42", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle43.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle43", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle44.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle44", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle45.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle45", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle46.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle46", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle47.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle47", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle48.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle48", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle49.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle49", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle50.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle50", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle51.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle51", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle52.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle52", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle53.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle53", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle54.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle54", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle55.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle55", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle56.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle56", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle57.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle57", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle58.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle58", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle59.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle59", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Idle60.png", + "kind": "image", + "metadata": "{\"extension\":\".png\"}", + "name": "Idle60", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_dead.png", + "kind": "image", + "metadata": "", + "name": "Blue player_dead.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/906c71dfc05b7ce84ca9de2c21a8f84151b9708818a49c0e28e01853e68956e0_Blue player_dead.png", + "name": "Blue player_dead.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_duck.png", + "kind": "image", + "metadata": "", + "name": "Blue player_duck.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/5a412597e85b2dfd798d822f050e068b430b3819475a1a47d42685b02a209dd7_Blue player_duck.png", + "name": "Blue player_duck.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_fall.png", + "kind": "image", + "metadata": "", + "name": "Blue player_fall.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/7814d3f8d3acb10b6f03c00fe8a04c1486415d85850a5dc1121bc63c65a4dee7_Blue player_fall.png", + "name": "Blue player_fall.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_hit.png", + "kind": "image", + "metadata": "", + "name": "Blue player_hit.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/93df8d0ffa8ab66999aa72cfa151c8e04afd3d555e5452fd931a4dee0f6ae74d_Blue player_hit.png", + "name": "Blue player_hit.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_roll.png", + "kind": "image", + "metadata": "", + "name": "Blue player_roll.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/1fa88dd585f63bbe2a0abf64896531e1d579dad18567d6b3ae19f557c8c3f438_Blue player_roll.png", + "name": "Blue player_roll.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_stand.png", + "kind": "image", + "metadata": "", + "name": "Blue player_stand.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/16b5cb814580d40456eb79eda21a2809bddd403bf2281c1c7228aed0d3299600_Blue player_stand.png", + "name": "Blue player_stand.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_swim_1.png", + "kind": "image", + "metadata": "", + "name": "Blue player_swim_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/8de1841878e6c96dacee8703d3cd012184758f2d6a4e733c21d04f0b7d99c27e_Blue player_swim_1.png", + "name": "Blue player_swim_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_swim_2.png", + "kind": "image", + "metadata": "", + "name": "Blue player_swim_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/a515b387f4ec0b78c214baaf100651dcb5dc1f7cc42c1f48dd6b6a003f47d331_Blue player_swim_2.png", + "name": "Blue player_swim_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_switch_1.png", + "kind": "image", + "metadata": "", + "name": "Blue player_switch_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/1c62cecf83f255a43ab89418dea2d10d32f02bbb25e68a60bfd090fa22d32f19_Blue player_switch_1.png", + "name": "Blue player_switch_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_switch_2.png", + "kind": "image", + "metadata": "", + "name": "Blue player_switch_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/be2a35ed875ef54121034e3dbd1b805181d3aab67e2a2bd152f463ff66ce645c_Blue player_switch_2.png", + "name": "Blue player_switch_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_up_1.png", + "kind": "image", + "metadata": "", + "name": "Blue player_up_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/8bc569c6baa83426caa84de02480912770e2b2ff335f8e4c6270fcd01bff1175_Blue player_up_1.png", + "name": "Blue player_up_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_up_2.png", + "kind": "image", + "metadata": "", + "name": "Blue player_up_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/94d5b4b691ff12ec0ac1c7ad9f1325b6ae644751d9559509b8038bf128d90bdd_Blue player_up_2.png", + "name": "Blue player_up_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_up_3.png", + "kind": "image", + "metadata": "", + "name": "Blue player_up_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/fce285e8d3c3ebd62af3e862ec77fc83d00d917ccd2afb0c86681bca8a9de699_Blue player_up_3.png", + "name": "Blue player_up_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_walk_1.png", + "kind": "image", + "metadata": "", + "name": "Blue player_walk_1.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/d96968d16da6e212be2c14eefe14cec18f45274cfc99fde5676875ea477b758b_Blue player_walk_1.png", + "name": "Blue player_walk_1.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_walk_2.png", + "kind": "image", + "metadata": "", + "name": "Blue player_walk_2.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/1f8a502bb00c514fd0e944574280a70a98824ecd6d022f51cca759ef3f645d22_Blue player_walk_2.png", + "name": "Blue player_walk_2.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_walk_3.png", + "kind": "image", + "metadata": "", + "name": "Blue player_walk_3.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/5829812a5c39c05752515d0bcf0371d8d8ddaeceaffe17ddfadbf4c8485ce886_Blue player_walk_3.png", + "name": "Blue player_walk_3.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_walk_4.png", + "kind": "image", + "metadata": "", + "name": "Blue player_walk_4.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/846d9168c14f5a529bf7e5e0a17680b55ec4624dab7fd3119391b65a26aefe82_Blue player_walk_4.png", + "name": "Blue player_walk_4.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Blue player_walk_5.png", + "kind": "image", + "metadata": "", + "name": "Blue player_walk_5.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Abstract Platformer Pack (370 assets)/PNG/Players/Player Blue/555525c9434c8f41c5b7d811fe766f8f1ecc3306c6c409877d7916c11a0c1c31_Blue player_walk_5.png", + "name": "Blue player_walk_5.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Energy Bar.png", + "kind": "image", + "metadata": "", + "name": "Energy Bar.png", + "smoothed": false, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Space Shooter by Pixel boy/Hud/Bar/5e8415764fad4e64bf3d6eb76c48ee5a89901545b96795315ec70b17fb0e1f7f_Energy Bar.png", + "name": "Energy Bar.png" + } + }, + { + "alwaysLoaded": false, + "file": "Preview.png", + "kind": "image", + "metadata": "", + "name": "Preview.png", + "smoothed": true, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsGroups": [], + "variables": [], + "layouts": [ + { + "b": 31, + "disableInputWhenNotFocused": true, + "mangledName": "Moving_32Saw_32Platformer", + "name": "Moving Saw Platformer", + "r": 31, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 31, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 16, + "gridHeight": 16, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.2, + "snap": true, + "zoomFactor": 0.6449197509627761, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "Platforms", + "objects": [ + { + "name": "Platform" + }, + { + "name": "MovingPlatform" + } + ] + } + ], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "589b6f8f-cf2e-40ea-ab88-81335dec0d96", + "width": 0, + "x": 781, + "y": 343, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "", + "name": "Platform", + "persistentUuid": "fe4899a6-6668-4069-826d-c4fa511e0a8b", + "width": 230, + "x": 564, + "y": 234, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "da7b905c-98af-4b17-a585-4bb12938ad13", + "width": 0, + "x": 275, + "y": 109, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 1168, + "layer": "", + "name": "Platform", + "persistentUuid": "bd87b684-8d15-4faf-92bf-3f379044cdf4", + "width": 624, + "x": 832, + "y": -752, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 704, + "layer": "", + "name": "Platform", + "persistentUuid": "73810944-9219-486c-bf2e-7c496bec9c67", + "width": 1984, + "x": -512, + "y": 416, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Title_Text", + "persistentUuid": "fe2f0a17-ae1c-457f-a1e5-7408a87b6970", + "width": 0, + "x": 176, + "y": -345, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "0e3b5473-0e67-4cbb-a416-cfbc1d0eeacc", + "width": 0, + "x": 275, + "y": 291, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "", + "name": "Platform", + "persistentUuid": "f8393a49-2057-497a-9f1b-96051bc73d1a", + "width": 96, + "x": 64, + "y": -32, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 270, + "customSize": true, + "height": 128, + "layer": "", + "name": "TrophyParticles", + "persistentUuid": "0b5b9140-333f-4ee0-bf0b-2cc99ea5e59c", + "width": 128, + "x": 112, + "y": -62, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "5389527b-953f-44c1-b915-e5e951b3ff34", + "width": 0, + "x": 583, + "y": 349, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "aedee705-179c-43e3-8836-ba4f019d48cc", + "width": 0, + "x": 775, + "y": 247, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "GreenHero", + "persistentUuid": "b89b6097-1eb3-4d6d-8891-2f03bf48e315", + "width": 0, + "x": 74, + "y": 339, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 1088, + "layer": "", + "name": "Platform", + "persistentUuid": "8b56d4c2-010a-43c3-b10a-68d8d9bc4875", + "width": 544, + "x": -512, + "y": -672, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Trophy", + "persistentUuid": "ce008221-ff5f-4396-919a-072d53f32b91", + "width": 0, + "x": 80, + "y": -88, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 90, + "layer": "", + "name": "Platform", + "persistentUuid": "b699faa9-fbe0-4eac-95d1-edddc03e1d66", + "width": 86, + "x": 586, + "y": 64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 48, + "layer": "", + "name": "Platform", + "persistentUuid": "72d656cf-d8d8-449f-8e2e-bc81d2fa5dca", + "width": 74, + "x": 672, + "y": 106, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "eeba8486-97ca-4ab2-aaba-d288e6b7b835", + "width": 0, + "x": 583, + "y": 253, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "d3bfa2d5-440a-4879-af53-0f0bf0c18d94", + "width": 0, + "x": 621, + "y": 135, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "e55ba9a4-658b-43b3-83be-e68389c1b754", + "width": 0, + "x": 695, + "y": 135, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "GameOver_Text", + "persistentUuid": "856c0b3e-9795-44f2-8b09-57d192405efc", + "width": 0, + "x": 288, + "y": 103, + "zOrder": 40, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Saw", + "persistentUuid": "3a531c83-2c7f-4b81-bf26-9f93545dfdbc", + "width": 0, + "x": 93, + "y": 67, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "UI", + "name": "Timer_Text", + "persistentUuid": "67d164e3-101a-481e-937f-e5899a81c384", + "width": 0, + "x": 32, + "y": 32, + "zOrder": 41, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "", + "name": "MovingPlatform", + "persistentUuid": "93cab373-7f4b-4698-9aaa-0719fce5e964", + "width": 224, + "x": 80, + "y": 64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "", + "name": "MovingPlatform", + "persistentUuid": "140d1fe3-0dd7-410d-9c96-6f8104246493", + "width": 112, + "x": 272, + "y": 288, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Controls_Text", + "persistentUuid": "283f4738-4d3e-455e-ab7b-e59735aab8f5", + "width": 0, + "x": 32, + "y": 432, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "BluePlayer", + "persistentUuid": "8274ff04-4da6-439f-9dbd-47655e87b54e", + "width": 0, + "x": 128, + "y": -240, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "", + "name": "HiddenPathMarker", + "persistentUuid": "59f83831-aecf-4640-a135-08ebdf21d6a5", + "width": 576, + "x": 160, + "y": -224, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "FlyerTrail", + "persistentUuid": "da2f65c5-c944-450f-b6a6-d0248b7ab43b", + "width": 0, + "x": 160, + "y": -208, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "04458b0edc6d387709a7393d302010db9933d6d8fcd0e8150c6db22cdea18d2b", + "name": "Saw", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 100, + "Height": 100, + "Clockwise": true, + "HorizontalEdgeDuration": 2, + "VerticalEdgeDuration": 2, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutQuad", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "On", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.035, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Saw_On_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Saw_On_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Off", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Saw_Off.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 19, + "y": 19 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 9, + "y": 9 + }, + { + "x": 29, + "y": 9 + }, + { + "x": 29.5, + "y": 29 + }, + { + "x": 9, + "y": 29.5 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Moving Saw Platformer", + "font": "", + "textAlignment": "center", + "characterSize": 50, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Controls_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Keyboard: Arrow keys to move, spacebar to jump\n\nGamepad: Left-Stick to move, A button (green) to jump", + "font": "", + "textAlignment": "left", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Timer_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Time: 12.34", + "font": "", + "textAlignment": "center", + "characterSize": 25, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "GameOver_Text", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ], + "behaviors": [], + "string": "Press any key", + "font": "", + "textAlignment": "center", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "afbeb7d1b67ec8b51b3370ddfd8c4aa1bd9b925ee58ead50767f44e2e444d7ba", + "bottomMargin": 32, + "height": 96, + "leftMargin": 32, + "name": "Platform", + "rightMargin": 32, + "tags": "", + "texture": "9patch_Bordered Hud_all_32.png", + "tiled": true, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 96, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + } + ] + }, + { + "assetStoreId": "afbeb7d1b67ec8b51b3370ddfd8c4aa1bd9b925ee58ead50767f44e2e444d7ba", + "bottomMargin": 32, + "height": 96, + "leftMargin": 32, + "name": "MovingPlatform", + "rightMargin": 32, + "tags": "", + "texture": "9patch_Bordered Hud_all_32.png", + "tiled": true, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 96, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior", + "canBeGrabbed": false, + "platformType": "NormalPlatform", + "yGrabOffset": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 100, + "Height": 0, + "Clockwise": true, + "HorizontalEdgeDuration": 4, + "VerticalEdgeDuration": 1, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ] + }, + { + "additive": false, + "assetStoreId": "1c010f733d45fbe792e563d6463f14f4d3d0b48d52de37f51bba3c821b0c7a12", + "destroyWhenNoParticles": false, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 100, + "emitterForceMin": 25, + "flow": 20, + "jumpForwardInTimeOnCreation": 0, + "maxParticleNb": 100, + "name": "TrophyParticles", + "particleAlpha1": 255, + "particleAlpha2": 255, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 119, + "particleBlue2": 119, + "particleGravityX": 0, + "particleGravityY": -50, + "particleGreen1": 199, + "particleGreen2": 199, + "particleLifeTimeMax": 1, + "particleLifeTimeMin": 1, + "particleRed1": 65, + "particleRed2": 65, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 7, + "rendererParam2": 8, + "rendererType": "Point", + "tags": "", + "tank": -1, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 16, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 1, + "thickness": 1 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [] + }, + { + "additive": false, + "assetStoreId": "1c010f733d45fbe792e563d6463f14f4d3d0b48d52de37f51bba3c821b0c7a12", + "destroyWhenNoParticles": false, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 0, + "emitterForceMin": 0, + "flow": 30, + "jumpForwardInTimeOnCreation": 0, + "maxParticleNb": 100, + "name": "FlyerTrail", + "particleAlpha1": 255, + "particleAlpha2": 255, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 226, + "particleBlue2": 226, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 144, + "particleGreen2": 144, + "particleLifeTimeMax": 0.5, + "particleLifeTimeMin": 0.25, + "particleRed1": 74, + "particleRed2": 74, + "particleSize1": 100, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 7, + "rendererParam2": 8, + "rendererType": "Point", + "tags": "", + "tank": -1, + "textureParticleName": "", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 8, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 1, + "thickness": 1 + }, + "stringParameters": { + "color": "255;255;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "Sticker", + "type": "Sticker::Sticker", + "OnlyFollowPosition": true + } + ] + }, + { + "assetStoreId": "f2a545fe86b8cc1509591e310c5b6e497482b05fc54d5e770a57d57c167d45b0", + "name": "GreenHero", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "PlatformerCharacterAnimator", + "type": "PlatformerCharacterAnimator::PlatformerCharacterAnimator", + "EnableAnimationChanges": true, + "EnableHorizontalFlipping": true, + "IdleAnimationName": "Idle", + "RunAnimationName": "Run", + "JumpAnimationName": "Jump", + "FallAnimationName": "Fall", + "ClimbAnimationName": "Climb", + "PlatformerBehavior": "PlatformerObject" + }, + { + "name": "PlatformerGamepadMapper", + "type": "Gamepads::PlatformerGamepadMapper", + "PlatformerCharacter": "PlatformerObject", + "GamepadIdentifier": 1, + "UseArrows": true, + "UseLeftStick": true, + "UseRightStick": false, + "JumpButton": "A or Cross" + }, + { + "name": "PlatformerObject", + "type": "PlatformBehavior::PlatformerObjectBehavior", + "canGrabWithoutMoving": false, + "acceleration": 1500, + "canGoDownFromJumpthru": true, + "canGrabPlatforms": false, + "deceleration": 1500, + "gravity": 1000, + "ignoreDefaultControls": false, + "jumpSpeed": 600, + "jumpSustainTime": 0.2, + "ladderClimbingSpeed": 150, + "maxFallingSpeed": 700, + "maxSpeed": 250, + "slopeMaxAngle": 60, + "useLegacyTrajectory": false, + "xGrabTolerance": 10, + "yGrabOffset": 0 + }, + { + "name": "SmoothCamera", + "type": "SmoothCamera::SmoothCamera", + "LeftwardSpeed": 0.9, + "RightwardSpeed": 0.9, + "UpwardSpeed": 0.9, + "DownwardSpeed": 0.9, + "FollowOnX": false, + "FollowOnY": true, + "FollowFreeAreaLeft": 1, + "FollowFreeAreaRight": 0, + "FollowFreeAreaTop": 0, + "FollowFreeAreaBottom": 0, + "CameraOffsetX": 0, + "CameraOffsetY": -100, + "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": 8000, + "RightwardSpeedMax": 8000, + "UpwardSpeedMax": 8000, + "DownwardSpeedMax": 8000, + "OldX": 9000, + "OldY": 9000, + "IsCalledManually": false + }, + { + "name": "SmoothPlatformerCamera", + "type": "SmoothCamera::SmoothPlatformerCamera", + "PlatformerCharacter": "PlatformerObject", + "SmoothCamera": "SmoothCamera", + "JumpOriginY": 1.758268736427497e-308, + "AirFollowFreeAreaTop": 0, + "AirFollowFreeAreaBottom": 0, + "FloorFollowFreeAreaTop": 0, + "FloorFollowFreeAreaBottom": 0, + "AirUpwardSpeed": 0.95, + "AirDownwardSpeed": 0.95, + "FloorUpwardSpeed": 0.8, + "FloorDownwardSpeed": 0.8, + "AirUpwardSpeedMax": 0, + "AirDownwardSpeedMax": 1000, + "FloorUpwardSpeedMax": 8000, + "FloorDownwardSpeedMax": 8000 + } + ], + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Idle41", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle42", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle43", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle44", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle45", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle46", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle47", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle48", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle49", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle50", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle51", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle52", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle53", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle54", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle55", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle56", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle57", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle58", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle59", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Idle60", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Run", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Run29", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run30", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run31", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run32", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run33", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run34", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run35", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run36", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run37", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run38", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run39", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run40", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run41", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Run42", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Jump", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Jump35", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump36", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump37", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump38", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump39", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump40", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump41", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump42", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump43", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump44", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump45", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump46", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump47", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump48", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump49", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump50", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Jump51", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Punch", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.0417, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Punch14", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch15", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch16", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch17", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch18", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch19", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch20", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch21", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch22", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch23", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch24", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch25", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Punch26", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Climb", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "metadata": "{\"pskl\":{}}", + "timeBetweenFrames": 0.0625, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Climb", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb2", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb3", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb4", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb5", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb6", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb7", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb8", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb9", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb10", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb11", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb12", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb13", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb14", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb15", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Climb16", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + }, + { + "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": 20, + "y": 20 + }, + { + "x": 50, + "y": 20 + }, + { + "x": 50, + "y": 76 + }, + { + "x": 20, + "y": 76 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "8bcd8207b1c7873a2835910009fecb1b02fd3a3631b394de827730294dfe661c", + "name": "Trophy", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "Pressed", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.125, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_6.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_7.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "Trophy_Pressed_8.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Trophy_Idle.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 16, + "y": 20.5 + }, + { + "x": 48, + "y": 20.5 + }, + { + "x": 48.5, + "y": 56 + }, + { + "x": 15.5, + "y": 56.5 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "07851d5ddd8737ffd3f69bcfb6884be8bd69c04e2f4d2aa45cdfcfc15206d49d", + "name": "BluePlayer", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "176;213;255" + }, + "booleanParameters": {} + } + ], + "behaviors": [ + { + "name": "EllipseMovement", + "type": "EllipseMovement::EllipseMovement", + "RadiusX": 0, + "RadiusY": 200, + "LoopDuration": 1.5, + "InitialTurningLeft": false, + "InitialDirectionAngle": 0, + "ShouldRotate": false, + "RotationOffset": 0, + "CenterX": 0, + "CenterY": 0, + "MovementAngle": 0, + "OldX": 0, + "OldY": 0 + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement", + "Width": 100, + "Height": 100, + "Clockwise": true, + "HorizontalEdgeDuration": 4, + "VerticalEdgeDuration": 1, + "Left": 1, + "Top": 1, + "Progress": 1, + "OldX": 1, + "OldY": 1, + "Easing": "easeInOutSine", + "InitialPosition": "Top-left corner", + "ToogleClockwise": false + } + ], + "animations": [ + { + "name": "walk", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.2, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_5.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_4.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_walk_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "swim", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.1, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_swim_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_swim_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "stand", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_stand.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "duck", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_duck.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "fall", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_fall.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "hit", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_hit.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "dead", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_dead.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "roll", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_roll.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "switch", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_switch_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_switch_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + }, + { + "name": "up", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.025, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Blue player_up_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_up_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + }, + { + "hasCustomCollisionMask": false, + "image": "Blue player_up_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "603d81772c22a6401f0bb19588cb7bb6f384ae840c9e03391874c15a049ade25", + "bottomMargin": 12, + "height": 26, + "leftMargin": 10, + "name": "HiddenPathMarker", + "rightMargin": 10, + "tags": "", + "texture": "Energy Bar.png", + "tiled": true, + "topMargin": 13, + "type": "PanelSpriteObject::PanelSprite", + "width": 78, + "variables": [], + "effects": [], + "behaviors": [] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Game logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "GameOver_Text" + ] + }, + { + "type": { + "value": "ZoomCamera" + }, + "parameters": [ + "", + "0.8", + "", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "HiddenPathMarker" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "FlyerTrail", + "Sticker", + "BluePlayer", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlatformBehavior::PlatformerObjectBehavior::IsMovingEvenALittle" + }, + "parameters": [ + "GreenHero", + "PlatformerObject" + ] + }, + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "GameStarted", + "False" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"Timer\"" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "GameStarted", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "GreenHero", + "Saw", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PauseTimer" + }, + "parameters": [ + "", + "\"Timer\"" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Saw" + ] + }, + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Saw" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Saw", + "RectangleMovement", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "MovingPlatform", + "RectangleMovement", + "" + ] + }, + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "GreenHero" + ] + }, + { + "type": { + "value": "Tween::TweenCameraPosition" + }, + "parameters": [ + "", + "\"CenterOnHero\"", + "GreenHero.BoundingBoxCenterX()", + "GreenHero.BoundingBoxCenterY()", + "\"\"", + "500", + "\"easeOutQuad\"" + ] + }, + { + "type": { + "value": "Tween::TweenCameraZoom" + }, + "parameters": [ + "", + "\"ZoomIn\"", + "1.5", + "", + "1000", + "\"easeOutQuad\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GameOver_Text", + "" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "GameOver", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "GreenHero", + "Trophy", + "", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PauseTimer" + }, + "parameters": [ + "", + "\"Timer\"" + ] + }, + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Saw" + ] + }, + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Saw" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "GreenHero", + "PlatformerObject", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Saw", + "RectangleMovement", + "" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "MovingPlatform", + "RectangleMovement", + "" + ] + }, + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "GreenHero" + ] + }, + { + "type": { + "value": "Tween::TweenCameraPosition" + }, + "parameters": [ + "", + "\"CenterOnHero\"", + "GreenHero.BoundingBoxCenterX()", + "GreenHero.BoundingBoxCenterY()", + "\"\"", + "500", + "\"easeOutQuad\"" + ] + }, + { + "type": { + "value": "Tween::TweenCameraZoom" + }, + "parameters": [ + "", + "\"ZoomIn\"", + "1.5", + "", + "1000", + "\"easeOutQuad\"" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "1" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "GameOver_Text", + "=", + "\"You won!\"" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "GameOver_Text", + "" + ] + }, + { + "type": { + "value": "SetSceneVariableAsBoolean" + }, + "parameters": [ + "GameOver", + "True" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move saw around objects", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangleMovement::MoveToNearestCorner" + }, + "parameters": [ + "", + "Saw", + "RectangleMovement", + "Platforms", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::MoveToNearestCorner" + }, + "parameters": [ + "", + "BluePlayer", + "RectangleMovement", + "HiddenPathMarker", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangleMovement::MoveAlongBorderOfObject" + }, + "parameters": [ + "", + "Saw", + "RectangleMovement", + "Platforms", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::MoveAlongBorderOfObject" + }, + "parameters": [ + "", + "BluePlayer", + "RectangleMovement", + "HiddenPathMarker", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Timer_Text", + "=", + "\"Time: \" + ToString(roundTo(TimerElapsedTime(\"Timer\"),2))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SceneVariableAsBoolean" + }, + "parameters": [ + "GameOver", + "True" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "AnyKeyReleased" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Gamepads::C_any_button_released" + }, + "parameters": [ + "", + "1", + "" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Moving Saw Platformer\"", + "" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 0, + "ambientLightColorG": 7893896, + "ambientLightColorR": 16, + "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": "EllipseMovement", + "type": "EllipseMovement::EllipseMovement" + }, + { + "name": "Platform", + "type": "PlatformBehavior::PlatformBehavior" + }, + { + "name": "PlatformerCharacterAnimator", + "type": "PlatformerCharacterAnimator::PlatformerCharacterAnimator" + }, + { + "name": "PlatformerGamepadMapper", + "type": "Gamepads::PlatformerGamepadMapper" + }, + { + "name": "PlatformerObject", + "type": "PlatformBehavior::PlatformerObjectBehavior" + }, + { + "name": "RectangleMovement", + "type": "RectangleMovement::RectangleMovement" + }, + { + "name": "SmoothCamera", + "type": "SmoothCamera::SmoothCamera" + }, + { + "name": "SmoothPlatformerCamera", + "type": "SmoothCamera::SmoothPlatformerCamera" + }, + { + "name": "Sticker", + "type": "Sticker::Sticker" + } + ] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "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": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Ellipse movement", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=", + "name": "EllipseMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sine-wave.svg", + "shortDescription": "Move objects on ellipses or smoothly back and forth in one direction.", + "version": "1.0.2", + "description": [ + "It allows objects to move:", + "- on an ellipsis or arcs", + "- smoothly vertically or horizontally (by setting one radius to 0)", + "- on a sine wave (by adding a force)", + "", + "It can be used for:", + "- Making objects float, such as powerups or coins", + "- Moving platforms", + "- Enemy movement patterns", + "- Making a player constantly turn right or left ([open the project online](https://editor.gdevelop.io/?project=example://star-seeker))" + ], + "origin": { + "identifier": "EllipseMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "sine", + "ellipse", + "movement", + "circular", + "circle", + "floating", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Move objects on ellipses or smoothly back and forth in one direction.", + "fullName": "Ellipse movement", + "name": "EllipseMovement", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Evaluate the center of movement from the object position and properties." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyInitialTurningLeft" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "*", + "-1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyMovementAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyInitialDirectionAngle() + 90" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyMovementAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyInitialDirectionAngle() - 90" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X() - Object.Behavior::DeltaX()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y() - Object.Behavior::DeltaY()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "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 center when the object is moved outside of the behavior." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.X() - Object.Behavior::PropertyOldX()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterY" + }, + "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": "Place the object according to the movement angle." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyRadiusX" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterX() + Object.Behavior::DeltaX()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyRadiusY" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterY() + Object.Behavior::DeltaY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyShouldRotate" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::DirectionAngle() + Object.Behavior::PropertyRotationOffset()" + ] + } + ] + }, + { + "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": "EllipseMovement::EllipseMovement::SetPropertyOldX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyOldY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "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": "Update the movement angle for the next frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyMovementAngle" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "360 * TimeDelta() / Object.Behavior::PropertyLoopDuration()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the turning direction (left or right).", + "fullName": "Turn the other way", + "functionType": "Action", + "name": "ToggleTurningLeft", + "sentence": "_PARAM0_ turn the other way", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "2 * Object.X() - Object.Behavior::CenterX()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyCenterY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "2 * Object.Y() - Object.Behavior::CenterY()" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyMovementAngle" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "180" + ] + }, + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "*", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the in which side the object is turning (left or right).", + "fullName": "Turn left or right", + "functionType": "Action", + "name": "SetTurningLeft", + "sentence": "_PARAM0_ turn left: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::IsTurningLeft" + }, + "parameters": [ + "Object", + "Behavior", + "yes", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"TurnLeft\"" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::And" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "inverted": true, + "value": "EllipseMovement::EllipseMovement::IsTurningLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"TurnLeft\"" + ] + } + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::ToggleTurningLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + }, + { + "description": "Turn left", + "name": "TurnLeft", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is turning left.", + "fullName": "Is turning left", + "functionType": "Condition", + "name": "IsTurningLeft", + "sentence": "_PARAM0_ is turning left", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the movement angle of the object.", + "fullName": "Movement angle", + "functionType": "Expression", + "name": "MovementAngle", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMovementAngle()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the loop duration (in seconds).", + "fullName": "Loop duration", + "functionType": "Expression", + "group": "Configuration", + "name": "LoopDuration", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "abs(Object.Behavior::PropertyLoopDuration())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the ellipse radius on X axis.", + "fullName": "Radius X", + "functionType": "Expression", + "group": "Configuration", + "name": "RadiusX", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyRadiusX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the ellipse radius on X axis.", + "fullName": "Radius Y", + "functionType": "Expression", + "group": "Configuration", + "name": "RadiusY", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyRadiusY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the movement center position on X axis.", + "fullName": "Movement center X", + "functionType": "Expression", + "group": "Configuration", + "name": "CenterX", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the movement center position on Y axis.", + "fullName": "Movement center Y", + "functionType": "Expression", + "group": "Configuration", + "name": "CenterY", + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the radius on X axis of the movement.", + "fullName": "Radius X", + "functionType": "Action", + "group": "Elliptical movement configuration", + "name": "SetRadiusX", + "sentence": "Change the radius on X axis of the movement of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyRadiusX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + }, + { + "description": "Radius X", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the radius on Y axis of the movement.", + "fullName": "Radius Y", + "functionType": "Action", + "group": "Elliptical movement configuration", + "name": "SetRadiusY", + "sentence": "Change the radius on Y axis of the movement of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyRadiusY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + }, + { + "description": "Radius Y", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the loop duration.", + "fullName": "Loop duration", + "functionType": "Action", + "group": "Elliptical movement configuration", + "name": "SetLoopDuration", + "sentence": "Change the loop duration of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::IsTurningLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "-GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "EllipseMovement::EllipseMovement::IsTurningLeft" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + }, + { + "description": "Speed (in degrees per second)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the movement angle. The object is teleported according to the angle.", + "fullName": "Teleport at an angle", + "functionType": "Action", + "name": "SetMovementAngle", + "sentence": "Teleport _PARAM0_ on the ellipse at _PARAM2_°", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::SetPropertyMovementAngle" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + }, + { + "description": "Movement angle", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Delta X", + "functionType": "Expression", + "name": "DeltaX", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "cos(ToRad(Object.Behavior::PropertyMovementAngle())) * Object.Behavior::PropertyRadiusX()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Delta Y", + "functionType": "Expression", + "name": "DeltaY", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "sin(ToRad(Object.Behavior::PropertyMovementAngle())) * Object.Behavior::PropertyRadiusY()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Direction angle", + "functionType": "Expression", + "name": "DirectionAngle", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMovementAngle() + 90" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "EllipseMovement::EllipseMovement::PropertyLoopDuration" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyMovementAngle() - 90" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EllipseMovement::EllipseMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "100", + "type": "Number", + "unit": "Pixel", + "label": "Radius of the movement on X axis", + "description": "", + "group": "Ellipse", + "extraInformation": [], + "hidden": false, + "name": "RadiusX" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Radius of the movement on Y axis", + "description": "", + "group": "Ellipse", + "extraInformation": [], + "hidden": false, + "name": "RadiusY" + }, + { + "value": "6", + "type": "Number", + "unit": "Second", + "label": "Loop duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "LoopDuration" + }, + { + "value": "", + "type": "Boolean", + "label": "Turn left", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "InitialTurningLeft" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Initial direction", + "description": "", + "group": "Speed", + "extraInformation": [], + "hidden": false, + "name": "InitialDirectionAngle" + }, + { + "value": "", + "type": "Boolean", + "label": "Rotate", + "description": "", + "group": "Rotation", + "extraInformation": [], + "hidden": false, + "name": "ShouldRotate" + }, + { + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Rotation offset", + "description": "", + "group": "Rotation", + "extraInformation": [], + "hidden": false, + "name": "RotationOffset" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CenterX" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CenterY" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MovementAngle" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OldY" + } + ], + "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": "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": "", + "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": "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": "Tristan Rhodes (https://victrisgames.itch.io/), D8H", + "category": "Input", + "extensionNamespace": "", + "fullName": "Draggable slider", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSI3IiByPSIzIi8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMyIgeTE9IjciIHgyPSIyMCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjciIHgyPSIyNiIgeTI9IjciLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjEyIiBjeT0iMTYiIHI9IjMiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIzIiB5MT0iMTYiIHgyPSI5IiB5Mj0iMTYiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjE2IiB4Mj0iMTUiIHkyPSIxNiIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjMiIGN5PSIyNSIgcj0iMyIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjMiIHkxPSIyNSIgeDI9IjIwIiB5Mj0iMjUiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyOSIgeTE9IjI1IiB4Mj0iMjYiIHkyPSIyNSIvPg0KPC9zdmc+DQo=", + "name": "DraggableSliderControl", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/UI Essentials/UI Essentials_sliders_options.svg", + "shortDescription": "A draggable slider that users can move to select a numerical value.", + "version": "1.0.5", + "description": [ + "Draws a draggable slider that users can move to select a numerical value.", + "The value range, tick spacing, and the appearance of the slider can be defined with properties.", + "", + "How to use:", + "- Add this behavior a **Shape Painter** object", + "- Place an instance of that shape painter on the screen where you want the slider to appear", + "- Use the \"Value\" expression to find the Value based on the position of the slider", + "", + "Tips:", + "- You can disable the slider to prevent a user from interacting with it", + "- You can set the Value of the slider and the slider will move to the correct position", + "", + "Further details can be found in [this tutorial video](https://youtu.be/iiTUwdAT_hs).", + "", + "Breaking changes (1.0.0)", + "- Track thickness and length properties replaced track width and height. These 2 properties must be set again if they were different from the default size.", + "- Hidden sliders can be dragged. The \"enable\" action must be used to disable them.", + "" + ], + "origin": { + "identifier": "DraggableSliderControl", + "name": "gdevelop-extension-store" + }, + "tags": [ + "draggable", + "slider", + "shape painter", + "ui", + "widget" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Let users select a numerical value by dragging a slider.", + "fullName": "Draggable slider", + "name": "DraggableSliderControl", + "objectType": "PrimitiveDrawing::Drawer", + "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": "Make sure object doesn't get re-drawn every frame" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::ClearBetweenFrames" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use correct min value (instead of always starting at 0)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMin()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set track height function (which enforces valid thumb sizes)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTrackThickness()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start halo at same size as thumb" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight()/2,Object.Behavior::PropertyThumbWidth()/2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider logic", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::IsEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Track where the mouse is (in relation to object)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingX(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyMouseY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.ToDrawingY(MouseX(Object.Layer(), 0), MouseY(Object.Layer(), 0))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move slider when being dragged" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyMouseX()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "End sliding and update variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Update \"Value\" based on the location of the thumb" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyValueMin() + (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin()) * Object.Behavior::PropertyThumbOffset() / Object.Behavior::PropertyTrackLength()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo even more when pressed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1.25 * Object.Behavior::PropertyHaloRadius()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect hover/touch/click (but only if the layer and object is visible, and the object is not already being dragged)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect mouse clicks near track, start dragging" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "-Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset hover detection " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Grow halo when hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisBouton" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + ">=", + "Object.Behavior::PropertyThumbOffset() - Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseX()", + "<=", + "Object.Behavior::PropertyThumbOffset() + Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + ">=", + "- Object.Behavior::PropertyHaloRadius()" + ] + }, + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Behavior::PropertyMouseY()", + "<=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Shrink halo to zero when not hovered" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsHovered" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Redraw slider only when halo is not at final size" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "abs(Object.Behavior::PropertyCurrentHaloRadius() - Object.Behavior::PropertyTargetHaloRadius())", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "Object.Behavior::PropertyTargetHaloRadius()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "lerp(Object.Behavior::PropertyCurrentHaloRadius(), Object.Behavior::PropertyTargetHaloRadius(), Object.Behavior::PropertyHaloGrowSpeed())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Slider drawing", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "Visible" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "Object.Layer()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Drawer::ClearShapes" + }, + "parameters": [ + "Object" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Inactive track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set inactive track parameters (by default, use thumb color)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyInactiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyInactiveTrackOpacity()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw inactive track" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "-Object.Behavior::PropertyTrackThickness() / 2", + "Object.Behavior::PropertyTrackLength()", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (inactive side)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTrackLength()", + "0", + "Object.Behavior::PropertyTrackThickness() / 2", + "270", + "90", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Active track", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set active track parameters (by default, use thumb color)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyActiveTrackColor()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyActiveTrackOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw active track (2 pixels bigger than property) " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "0", + "-(Object.Behavior::PropertyTrackThickness() / 2 + 1)", + "Object.Behavior::PropertyThumbOffset()", + "Object.Behavior::PropertyTrackThickness() / 2 + 1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw half circle at end of track (active side)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Arc" + }, + "parameters": [ + "Object", + "0", + "0", + "1 + Object.Behavior::PropertyTrackThickness() / 2", + "90", + "270", + "", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Halo", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyCurrentHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare halo" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::OutlineOpacity" + }, + "parameters": [ + "Object", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw halo (it will grow or shrink as needed)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityHover()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use a more opaque halo while being dragged (it will grow or shrink as needed)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyHaloOpacityClick()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "Object.Behavior::PropertyCurrentHaloRadius()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Thumb", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Prepare thumb settings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::FillColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbColor()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::FillOpacity" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyThumbOpacity()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Circle thumb" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"circle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Circle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset()", + "0", + "ceil(max(Object.Behavior::PropertyThumbWidth(),Object.Behavior::PropertyThumbHeight())/2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Draw Rectangle thumb" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyThumbOffset() - (Object.Behavior::PropertyThumbWidth() / 2)", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyThumbOffset() + (Object.Behavior::PropertyThumbWidth() / 2)", + "Object.Behavior::PropertyThumbHeight() / 2" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "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": "DraggableSliderControl::DraggableSliderControl::PropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the slider interactions are enabled.", + "fullName": "Interactions enabled", + "functionType": "Condition", + "group": "Slider", + "name": "IsEnabled", + "sentence": "Interactions of _PARAM0_ are enabled", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Enable or disable the slider. Users cannot interact while it is disabled.", + "fullName": "Enable interactions", + "functionType": "Action", + "group": "Slider", + "name": "SetEnabled", + "sentence": "Enable interactions of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop dragging (so the slider won't be dragging when it gets enabled)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyIsBeingDragged" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset halo size (so halo won't appear when slider gets enabled)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTargetHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "min(Object.Behavior::PropertyThumbHeight(), Object.Behavior::PropertyThumbWidth()) / 2" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Enable\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyEnabled" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Enable", + "name": "Enable", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "The value of the slider (based on position of the thumb).", + "fullName": "Slider value", + "functionType": "Expression", + "group": "Slider", + "name": "Value", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the value of a slider (this will move the thumb to the correct position).", + "fullName": "Slider value", + "functionType": "Action", + "group": "Slider", + "name": "SetValue", + "sentence": "Change the value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + "<=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "round(GetArgumentAsNumber(\"Value\") / Object.Behavior::PropertyTickSpacing()) * Object.Behavior::PropertyTickSpacing()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyValueMin()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMin()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + ">", + "Object.Behavior::PropertyValueMax()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyValueMax()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the proper offset (it moves the slider)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOffset" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTrackLength() * (Object.Behavior::PropertyValue() - Object.Behavior::PropertyValueMin()) / (Object.Behavior::PropertyValueMax() - Object.Behavior::PropertyValueMin())" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Slider value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "ValueMin", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValueMin()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the minimum value of a slider.", + "fullName": "Slider minimum value", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetValueMin", + "sentence": "Change the minimum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMin" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMin\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Minimum value", + "name": "ValueMin", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The maximum value of a slider.", + "fullName": "Slider maximum value", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "ValueMax", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyValueMax()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Thickness of track.", + "fullName": "Slider track thickness", + "functionType": "Expression", + "group": "Slider track configuration", + "name": "TrackThickness", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTrackThickness()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Length of track.", + "fullName": "Slider track length", + "functionType": "Expression", + "group": "Slider track configuration", + "name": "TrackLength", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTrackLength()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Height of thumb.", + "fullName": "Slider thumb height", + "functionType": "Expression", + "group": "Slider thumb configuration", + "name": "ThumbHeight", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyThumbHeight()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the maximum value of a slider.", + "fullName": "Slider maximum value", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetValueMax", + "sentence": "Change the maximum value of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyValueMax" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"ValueMax\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Maximum value", + "name": "ValueMax", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "The tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Expression", + "group": "Slider value configuration", + "name": "TickSpacing", + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyTickSpacing()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Tick spacing", + "name": "TickSpacing", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the tick spacing of a slider.", + "fullName": "Tick spacing", + "functionType": "Action", + "group": "Slider value configuration", + "name": "SetTickSpacing", + "sentence": "Change the tick spacing of _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTickSpacing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"TickSpacing\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Value()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Tick spacing", + "name": "TickSpacing", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change length of track.", + "fullName": "Track length", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackLength", + "sentence": "Change track length of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackLength" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move thumb to correct place (based on new track size)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetValue" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyValue()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Track width", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change thickness of track.", + "fullName": "Track thickness", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetTrackThickness", + "sentence": "Change track thickness of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyTrackThickness" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure thumb width is not smaller than track height + 2 pixels (to prevent track ends from showing)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness() + 2" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness() + 2", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Track thickness", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change width of thumb.", + "fullName": "Thumb width", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbWidth", + "sentence": "Change thumb width of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Thumb width", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change height of thumb.", + "fullName": "Thumb height", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbHeight", + "sentence": "Change thumb height of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Thumb cannot be less than track thickness (plus 2 pixels)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbHeight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "max(GetArgumentAsNumber(\"Value\"), Object.Behavior::PropertyTrackThickness() + 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::UpdateHitbox" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Thumb height", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change radius of the halo around the thumb. This size is also used to detect interaction with the slider.", + "fullName": "Halo radius", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloRadius", + "sentence": "Change halo radius of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloRadius" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Halo radius", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the halo opacity when the thumb is hovered.", + "fullName": "Halo opacity (hover)", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloOpacityHover", + "sentence": "Change the halo opacity when hovered of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloOpacityHover" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Halo opacity (hover)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of halo when pressed.", + "fullName": "Halo opacity (pressed)", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetHaloOpacityPressed", + "sentence": "Change halo opacity when pressed of _PARAM0_ to _PARAM2_ px", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyHaloOpacityClick" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Halo opacity (pressed)", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change shape of thumb (circle or rectangle).", + "fullName": "Thumb shape", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbShape", + "sentence": "Change shape of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Shape\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure thumb width is not smaller than track height (to prevent track ends from showing)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbShape" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"rectangle\"" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::PropertyThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Object.Behavior::PropertyTrackThickness()" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetThumbWidth" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyTrackThickness()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "New thumb shape", + "name": "Shape", + "supplementaryInformation": "[\"circle\",\"rectangle\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Make track use rounded ends.", + "fullName": "Rounded track ends", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetRoundedTrack", + "sentence": "Draw _PARAM0_ with a rounded track: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "GetArgumentAsNumber(\"Value\")", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyRoundedTrack" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Rounded track", + "name": "Value", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of thumb.", + "fullName": "Thumb opacity", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbOpacity", + "sentence": "Change thumb opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Thumb opacity", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of inactive track.", + "fullName": "Inactive track opacity", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetInactiveTrackOpacity", + "sentence": "Change inactive track opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Inactive track opacity", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change opacity of active track.", + "fullName": "Active track opacity", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetActiveTrackOpacity", + "sentence": "Change active track opacity of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackOpacity" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Active track opacity", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the color of the track that is LEFT of the thumb.", + "fullName": "Active track color ", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetActiveTrackColor", + "sentence": "Change active track color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyActiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Active track color", + "name": "Color", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the color of the track that is RIGHT of the thumb.", + "fullName": "Inactive track color", + "functionType": "Action", + "group": "Slider track configuration", + "name": "SetInactiveTrackColor", + "sentence": "Change inactive track color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyInactiveTrackColor" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Inactive track color", + "name": "Color", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Change the thumb color to a specific value.", + "fullName": "Thumb color", + "functionType": "Action", + "group": "Slider thumb configuration", + "name": "SetThumbColor", + "sentence": "Change thumb color of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyThumbColor" + }, + "parameters": [ + "Object", + "Behavior", + "GetArgumentAsString(\"Color\")" + ] + }, + { + "type": { + "value": "DraggableSliderControl::DraggableSliderControl::SetPropertyNeedRedraw" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + }, + { + "description": "Thumb color", + "name": "Color", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "Update the hitbox.", + "fullName": "Update hitbox", + "functionType": "Action", + "group": "Private", + "name": "UpdateHitbox", + "private": true, + "sentence": "Update the hitbox of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PrimitiveDrawing::SetRotationCenter" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyTrackLength() / 2", + "Object.Behavior::PropertyTrackThickness() / 2" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::SetRectangularCollisionMask" + }, + "parameters": [ + "Object", + "-Object.Behavior::PropertyThumbWidth() / 2", + "-Object.Behavior::PropertyThumbHeight() / 2", + "Object.Behavior::PropertyTrackLength() + Object.Behavior::PropertyThumbWidth() / 2", + "Object.Behavior::PropertyThumbHeight() / 2" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "PrimitiveDrawing::Drawer", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "DraggableSliderControl::DraggableSliderControl", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "Minimum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ValueMin" + }, + { + "value": "1", + "type": "Number", + "label": "Maximum value", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ValueMax" + }, + { + "value": "0", + "type": "Number", + "label": "Tick spacing", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "TickSpacing" + }, + { + "value": "circle", + "type": "Choice", + "label": "Thumb shape", + "description": "", + "group": "Thumb", + "extraInformation": [ + "circle", + "rectangle" + ], + "hidden": false, + "name": "ThumbShape" + }, + { + "value": "20", + "type": "Number", + "label": "Thumb width", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbWidth" + }, + { + "value": "20", + "type": "Number", + "label": "Thumb height", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbHeight" + }, + { + "value": " 24;119;211", + "type": "Color", + "label": "Thumb Color", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbColor" + }, + { + "value": "255", + "type": "Number", + "label": "Thumb opacity", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "ThumbOpacity" + }, + { + "value": "200", + "type": "Number", + "label": "Track length", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "TrackLength" + }, + { + "value": "4", + "type": "Number", + "label": "Track thickness", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "TrackThickness" + }, + { + "value": "", + "type": "String", + "label": "Inactive track color (thumb color by default)", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "InactiveTrackColor" + }, + { + "value": "96", + "type": "Number", + "label": "Inactive track opacity", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "InactiveTrackOpacity" + }, + { + "value": " ", + "type": "String", + "label": "Active track color (thumb color by default)", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "ActiveTrackColor" + }, + { + "value": "255", + "type": "Number", + "label": "Active track opacity", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "ActiveTrackOpacity" + }, + { + "value": "24", + "type": "Number", + "label": "Halo size (hover)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloRadius" + }, + { + "value": "32", + "type": "Number", + "label": "Halo opacity (hover)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityHover" + }, + { + "value": "64", + "type": "Number", + "label": "Halo opacity (pressed)", + "description": "", + "group": "Thumb", + "extraInformation": [], + "hidden": false, + "name": "HaloOpacityClick" + }, + { + "value": "true", + "type": "Boolean", + "label": "Rounded track ends", + "description": "", + "group": "Track", + "extraInformation": [], + "hidden": false, + "name": "RoundedTrack" + }, + { + "value": "true", + "type": "Boolean", + "label": "Enable interactions", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Enabled" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsBeingDragged" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Value" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ThumbOffset" + }, + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "NeedRedraw" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsHovered" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseX" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseY" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "CurrentHaloRadius" + }, + { + "value": "0.2", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HaloGrowSpeed" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TargetHaloRadius" + } + ], + "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.1.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", + "", + "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer)).", + "", + "This example can be used to check some 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_", + "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": [ + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetTop" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxTop()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetBottom" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxBottom()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetLeft" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxLeft()", + "" + ] + }, + { + "type": { + "value": "RectangleMovement::RectangleMovement::SetRight" + }, + "parameters": [ + "MovingObject", + "RectangleMovement", + "CenterObject.BoundingBoxRight()", + "" + ] + } + ] + } + ] + } + ], + "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": [] + }, + { + "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": [] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file