diff --git a/examples/starting-3D-platformer/starting-3D-platformer.json b/examples/starting-3D-platformer/starting-3D-platformer.json index 8c8e2cce7..89d30c48c 100644 --- a/examples/starting-3D-platformer/starting-3D-platformer.json +++ b/examples/starting-3D-platformer/starting-3D-platformer.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -2623,9 +2623,9 @@ "externalEvents": [], "tests": [ { + "description": "Pressing Space makes the 3D character jump off the ground, and gravity brings it back down.", "name": "Jumping with Space", "type": "gameplay", - "description": "Pressing Space makes the 3D character jump off the ground, and gravity brings it back down.", "source": [ "// Space must make the physics character jump off the ground", "// (PhysicsCharacter3D, mapped to Space by Platformer3DKeyboardMapper).", @@ -2686,9 +2686,9 @@ ] }, { + "description": "The player walks forward into a coin lying on the ground: the coin is picked up.", "name": "Collecting a coin by walking into it", "type": "gameplay", - "description": "The player walks forward into a coin lying on the ground: the coin is picked up.", "source": [ "// Walking into a coin must collect it: the events delete a Coin as soon as", "// it is within 50 units of the Player.", diff --git a/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json b/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json index ee1a6560c..ae0f8fa39 100644 --- a/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json +++ b/examples/starting-3d-top-down-rpg/starting-3d-top-down-rpg.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 278, "major": 5, "minor": 6, "revision": 0 @@ -46396,4 +46396,4 @@ } ], "externalLayouts": [] -} \ No newline at end of file +} diff --git a/examples/starting-physics-pixel/assets/PixelBackground.png b/examples/starting-physics-pixel/assets/PixelBackground.png index e6cf9b1c0..bd6e0296c 100644 Binary files a/examples/starting-physics-pixel/assets/PixelBackground.png and b/examples/starting-physics-pixel/assets/PixelBackground.png differ diff --git a/examples/starting-physics-pixel/assets/StartingPixelBall.png b/examples/starting-physics-pixel/assets/StartingPixelBall.png index 6a60b7039..2f82fb9d1 100644 Binary files a/examples/starting-physics-pixel/assets/StartingPixelBall.png and b/examples/starting-physics-pixel/assets/StartingPixelBall.png differ diff --git a/examples/starting-physics-pixel/assets/StartingPixelBlock.png b/examples/starting-physics-pixel/assets/StartingPixelBlock.png index f6cf2ded0..8ed055c68 100644 Binary files a/examples/starting-physics-pixel/assets/StartingPixelBlock.png and b/examples/starting-physics-pixel/assets/StartingPixelBlock.png differ diff --git a/examples/starting-physics-pixel/assets/StartingPixelGround.png b/examples/starting-physics-pixel/assets/StartingPixelGround.png index 0ce296460..59f727af0 100644 Binary files a/examples/starting-physics-pixel/assets/StartingPixelGround.png and b/examples/starting-physics-pixel/assets/StartingPixelGround.png differ diff --git a/examples/starting-physics-pixel/assets/StartingPixelWall.png b/examples/starting-physics-pixel/assets/StartingPixelWall.png index 5de6947d5..aff9da991 100644 Binary files a/examples/starting-physics-pixel/assets/StartingPixelWall.png and b/examples/starting-physics-pixel/assets/StartingPixelWall.png differ diff --git a/examples/starting-physics-pixel/starting-physics-pixel.json b/examples/starting-physics-pixel/starting-physics-pixel.json index 3b2526ecc..dff2f844a 100644 --- a/examples/starting-physics-pixel/starting-physics-pixel.json +++ b/examples/starting-physics-pixel/starting-physics-pixel.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -162,7 +162,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.1343715797161202, + "zoomFactor": 1.4307927813134582, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -598,6 +598,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Ball", + "persistentUuid": "a126d55d-3144-44cc-aa54-323a07e2461a", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -674,6 +675,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Block_Light", + "persistentUuid": "dff00418-f1d0-44c0-bbce-50a92b39e202", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -924,9 +926,9 @@ "externalEvents": [], "tests": [ { + "description": "The physics simulation makes the ball fall and come to rest on top of the ground instead of going through it.", "name": "The ball falls and rests on the ground", "type": "gameplay", - "description": "The physics simulation makes the ball fall and come to rest on top of the ground instead of going through it.", "source": [ "// The whole game is the physics simulation: this game has no events at all.", "// The ball must fall, land on the ground and come to rest on top of it.", @@ -970,9 +972,9 @@ ] }, { + "description": "The ball follows the mouse while it is held, and falls again once released.", "name": "Dragging the ball with the mouse", "type": "gameplay", - "description": "The ball follows the mouse while it is held, and falls again once released.", "source": [ "// The ball can be picked up and moved with the mouse (the DraggablePhysics", "// behavior), and physics takes over again once it is released.", diff --git a/examples/starting-platformer-pixel/assets/Flat dark joystick border.png b/examples/starting-platformer-pixel/assets/Flat dark joystick border.png index 606bf85b2..b4e83e112 100644 Binary files a/examples/starting-platformer-pixel/assets/Flat dark joystick border.png and b/examples/starting-platformer-pixel/assets/Flat dark joystick border.png differ diff --git a/examples/starting-platformer-pixel/assets/Flat dark joystick thumb.png b/examples/starting-platformer-pixel/assets/Flat dark joystick thumb.png index acd005cc0..8acf179f8 100644 Binary files a/examples/starting-platformer-pixel/assets/Flat dark joystick thumb.png and b/examples/starting-platformer-pixel/assets/Flat dark joystick thumb.png differ diff --git a/examples/starting-platformer-pixel/assets/PixelBackground.png b/examples/starting-platformer-pixel/assets/PixelBackground.png index e6cf9b1c0..bd6e0296c 100644 Binary files a/examples/starting-platformer-pixel/assets/PixelBackground.png and b/examples/starting-platformer-pixel/assets/PixelBackground.png differ diff --git a/examples/starting-platformer-pixel/assets/StartingPixelCoin.png b/examples/starting-platformer-pixel/assets/StartingPixelCoin.png index b8884481f..4450cd0e8 100644 Binary files a/examples/starting-platformer-pixel/assets/StartingPixelCoin.png and b/examples/starting-platformer-pixel/assets/StartingPixelCoin.png differ diff --git a/examples/starting-platformer-pixel/assets/StartingPixelGround.png b/examples/starting-platformer-pixel/assets/StartingPixelGround.png index 0ce296460..59f727af0 100644 Binary files a/examples/starting-platformer-pixel/assets/StartingPixelGround.png and b/examples/starting-platformer-pixel/assets/StartingPixelGround.png differ diff --git a/examples/starting-platformer-pixel/assets/StartingPixelPlayer.png b/examples/starting-platformer-pixel/assets/StartingPixelPlayer.png index dfcded599..b88c010d7 100644 Binary files a/examples/starting-platformer-pixel/assets/StartingPixelPlayer.png and b/examples/starting-platformer-pixel/assets/StartingPixelPlayer.png differ diff --git a/examples/starting-platformer-pixel/assets/Top arrow button.png b/examples/starting-platformer-pixel/assets/Top arrow button.png index 9e80fc0d8..e69188046 100644 Binary files a/examples/starting-platformer-pixel/assets/Top arrow button.png and b/examples/starting-platformer-pixel/assets/Top arrow button.png differ diff --git a/examples/starting-platformer-pixel/starting-platformer-pixel.json b/examples/starting-platformer-pixel/starting-platformer-pixel.json index 873ef716e..0d4ccb872 100644 --- a/examples/starting-platformer-pixel/starting-platformer-pixel.json +++ b/examples/starting-platformer-pixel/starting-platformer-pixel.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -165,7 +165,7 @@ "metadata": "", "name": "assets/CoinPickUp.wav", "preloadAsMusic": false, - "preloadAsSound": false, + "preloadAsSound": true, "preloadInCache": false, "userAdded": false } @@ -200,13 +200,20 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.2121641972173838, + "zoomFactor": 0.7876290101673883, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" }, "objectsGroups": [], - "variables": [], + "variables": [ + { + "name": "CoinPitch", + "persistentUuid": "7c6536b0-2e42-4480-a6c8-d80583dbe392", + "type": "number", + "value": 1 + } + ], "instances": [ { "angle": 0, @@ -261,12 +268,12 @@ "angle": 0, "customSize": true, "depth": 0, - "height": 120, + "height": 104, "keepRatio": true, "layer": "MobileControls", "name": "JumpButton", "persistentUuid": "b1d437ce-f3b4-4799-875e-bb51f731cef0", - "width": 120, + "width": 104, "x": 1104, "y": 576, "zOrder": 3, @@ -404,6 +411,86 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Coins", + "persistentUuid": "f6b391ed-3293-437a-91c2-b0325153bd9c", + "width": 0, + "x": 436, + "y": 428, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Coins", + "persistentUuid": "f7e2818a-b9f0-43a9-ba6e-135de0e4eb70", + "width": 0, + "x": 388, + "y": 428, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Coins", + "persistentUuid": "fe3a8599-ae9a-4018-bbf3-c2ae2283b92d", + "width": 0, + "x": 412, + "y": 428, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Coins", + "persistentUuid": "6723e19a-02e9-437d-a2b1-e33067575ecd", + "width": 0, + "x": 460, + "y": 428, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Coins", + "persistentUuid": "47e2b512-edcc-4edf-8975-e5f35b881b08", + "width": 0, + "x": 364, + "y": 428, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -411,6 +498,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", + "persistentUuid": "5beda6c1-4165-41c0-8866-a345044d57a5", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -553,6 +641,7 @@ "assetStoreId": "", "height": 64, "name": "Background", + "persistentUuid": "874faafd-7221-4378-a25e-cca934c3e2a3", "texture": "assets\\PixelBackground.png", "type": "TiledSpriteObject::TiledSprite", "width": 64, @@ -564,6 +653,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Coins", + "persistentUuid": "6af60af9-4d31-4bc6-b425-7c8d9bbee817", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -605,6 +695,7 @@ "adaptCollisionMaskAutomatically": true, "assetStoreId": "9c727020616afdd6ba786b8af206a90481f07db0ca175ed6a4cc5b7e01c66d06", "name": "JumpButton", + "persistentUuid": "0ea7c391-2e7d-44c9-88f1-829a5c9b67d0", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -626,13 +717,13 @@ "Scale": "Scale", "ButtonFSM": "ButtonFSM", "Tween": "Tween", - "IdleScale": 1.5, - "FocusedScale": 1.45, - "FadeInDuration": 0.05, - "FadeOutDuration": 0.1, - "PressedScale": 1.45, - "FadeInEasing": "easeInOutQuad", - "FadeOutEasing": "easeInOutQuad", + "IdleScale": 1.3, + "FocusedScale": 1.25, + "FadeInDuration": 0.02, + "FadeOutDuration": 0.05, + "PressedScale": 1.2, + "FadeInEasing": "easeOutQuad", + "FadeOutEasing": "easeInQuad", "PreviousState": "Idle" }, { @@ -703,6 +794,7 @@ { "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", "name": "MoveJoystick", + "persistentUuid": "48a094f9-1be5-4f24-b0ae-9339bbf889e3", "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", "variant": "", "variables": [], @@ -868,6 +960,43 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"Coin_PitchTimer\"", + ">", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CoinPitch", + "=", + "RandomFloatInRange(0.8,1)" + ] + }, + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "", + "\"Coin_PitchTimer\"" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -903,7 +1032,26 @@ "assets/CoinPickUp.wav", "", "80", - "RandomFloatInRange(0.75,1)" + "CoinPitch" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"Coin_PitchTimer\"" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CoinPitch", + "+", + "RandomWithStep(0.050,0.1,0.025)" ] } ] @@ -1039,9 +1187,9 @@ "externalEvents": [], "tests": [ { + "description": "Pressing Space makes the player jump as high as its behavior is configured to, and gravity brings it back down at the same place.", "name": "Jumping with Space", "type": "gameplay", - "description": "Pressing Space makes the player jump as high as its behavior is configured to, and gravity brings it back down at the same place.", "source": [ "// The player must be able to jump off the platform it stands on. How high it", "// should go is taken from the behavior's own configuration, so this stays", @@ -1111,9 +1259,9 @@ ] }, { + "description": "The player runs to the ledge holding the coins, jumps onto it, and collects every coin it touches.", "name": "Collecting the coins by running into them", "type": "gameplay", - "description": "The player runs to the ledge holding the coins, jumps onto it, and collects every coin it touches.", "source": [ "// Coins are picked up by touching them. They sit on a ledge above the ground", "// the player starts on: it has to run there and jump onto it.", diff --git a/examples/starting-platformer/assets/StartingCoin.png b/examples/starting-platformer/assets/StartingCoin.png index 80aaaaa36..9a2b76e26 100644 Binary files a/examples/starting-platformer/assets/StartingCoin.png and b/examples/starting-platformer/assets/StartingCoin.png differ diff --git a/examples/starting-platformer/starting-platformer.json b/examples/starting-platformer/starting-platformer.json index f6fe1e2c6..9a916d6db 100644 --- a/examples/starting-platformer/starting-platformer.json +++ b/examples/starting-platformer/starting-platformer.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -200,7 +200,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.6040838749988914, + "zoomFactor": 0.7619362677197657, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -336,13 +336,14 @@ }, { "angle": 0, - "customSize": false, - "height": 0, + "customSize": true, + "depth": 0, + "height": 31, "keepRatio": true, "layer": "", "name": "Coins", "persistentUuid": "4c79f19c-996c-40e5-a8fb-fcaa13753abd", - "width": 0, + "width": 32, "x": 1152, "y": 352, "zOrder": 6, @@ -407,8 +408,8 @@ "name": "Coins", "persistentUuid": "c89b455a-90ee-4bdd-b31f-e28e45f6ebe9", "width": 0, - "x": 296, - "y": 481, + "x": 288, + "y": 480, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -423,8 +424,8 @@ "name": "Coins", "persistentUuid": "06a18fa6-e103-4ac4-8498-286721071ebf", "width": 0, - "x": 104, - "y": 481, + "x": 96, + "y": 480, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -439,8 +440,8 @@ "name": "Coins", "persistentUuid": "80bc1e19-cbb1-44c9-9787-6ff9d64b0c9b", "width": 0, - "x": 168, - "y": 481, + "x": 160, + "y": 480, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -455,8 +456,8 @@ "name": "Coins", "persistentUuid": "541cc5a3-eb1b-4ccd-97ec-4a2c0c2278fc", "width": 0, - "x": 232, - "y": 481, + "x": 224, + "y": 480, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -617,7 +618,7 @@ "behaviors": [] }, { - "adaptCollisionMaskAutomatically": true, + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Coins", "persistentUuid": "039c827f-a216-4ae1-966c-af24e56a91ca", @@ -636,7 +637,7 @@ "timeBetweenFrames": 0.08, "sprites": [ { - "hasCustomCollisionMask": true, + "hasCustomCollisionMask": false, "image": "assets\\StartingCoin.png", "points": [], "originPoint": { @@ -650,26 +651,7 @@ "x": 0, "y": 0 }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 19, - "y": 0 - }, - { - "x": 19, - "y": 18 - }, - { - "x": 0, - "y": 18 - } - ] - ] + "customCollisionMask": [] } ] } @@ -1135,9 +1117,9 @@ "externalEvents": [], "tests": [ { + "description": "Pressing Space makes the player jump off the platform it stands on, and gravity brings it back down at the same place.", "name": "Jumping with Space", "type": "gameplay", - "description": "Pressing Space makes the player jump off the platform it stands on, and gravity brings it back down at the same place.", "source": [ "// The player must be able to jump off the ground with the Space key", "// (PlatformerObject default controls, jumpSpeed 717 / gravity 1050).", @@ -1202,9 +1184,9 @@ ] }, { + "description": "The player drops down to the ground and runs over the row of coins: every coin it touches is collected.", "name": "Collecting the coins by running into them", "type": "gameplay", - "description": "The player drops down to the ground and runs over the row of coins: every coin it touches is collected.", "source": [ "// Coins are picked up by touching them: the player starts on a raised", "// platform and has to drop down to the ground to run over the coins there.", diff --git a/examples/starting-point-and-click-adventure/assets/Background.png b/examples/starting-point-and-click-adventure/assets/Background.png index a302951e5..f1a22e02e 100644 Binary files a/examples/starting-point-and-click-adventure/assets/Background.png and b/examples/starting-point-and-click-adventure/assets/Background.png differ diff --git a/examples/starting-point-and-click-adventure/assets/Border.png b/examples/starting-point-and-click-adventure/assets/Border.png index 043ea4c9a..fc209e345 100644 Binary files a/examples/starting-point-and-click-adventure/assets/Border.png and b/examples/starting-point-and-click-adventure/assets/Border.png differ diff --git a/examples/starting-point-and-click-adventure/assets/Border2.png b/examples/starting-point-and-click-adventure/assets/Border2.png index d5ee02253..5d5ab796a 100644 Binary files a/examples/starting-point-and-click-adventure/assets/Border2.png and b/examples/starting-point-and-click-adventure/assets/Border2.png differ diff --git a/examples/starting-point-and-click-adventure/assets/DirtParticle.png b/examples/starting-point-and-click-adventure/assets/DirtParticle.png new file mode 100644 index 000000000..07db099a3 Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/DirtParticle.png differ diff --git a/examples/starting-point-and-click-adventure/assets/QuestionBackdrop.png b/examples/starting-point-and-click-adventure/assets/QuestionBackdrop.png index d7c5d6513..f93f37cf0 100644 Binary files a/examples/starting-point-and-click-adventure/assets/QuestionBackdrop.png and b/examples/starting-point-and-click-adventure/assets/QuestionBackdrop.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingCollisionArea.png b/examples/starting-point-and-click-adventure/assets/StartingCollisionArea.png index 4166440ad..443292ad3 100644 Binary files a/examples/starting-point-and-click-adventure/assets/StartingCollisionArea.png and b/examples/starting-point-and-click-adventure/assets/StartingCollisionArea.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingNPC.png b/examples/starting-point-and-click-adventure/assets/StartingNPC.png index e037cd54d..3cf06dd87 100644 Binary files a/examples/starting-point-and-click-adventure/assets/StartingNPC.png and b/examples/starting-point-and-click-adventure/assets/StartingNPC.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingPlayer.png b/examples/starting-point-and-click-adventure/assets/StartingPlayer.png deleted file mode 100644 index ca4026e5f..000000000 Binary files a/examples/starting-point-and-click-adventure/assets/StartingPlayer.png and /dev/null differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingPlayer_Down.png b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Down.png new file mode 100644 index 000000000..c4ac1d3de Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Down.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingPlayer_Left.png b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Left.png new file mode 100644 index 000000000..5b7451d24 Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Left.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingPlayer_Right.png b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Right.png new file mode 100644 index 000000000..e8a83ac94 Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Right.png differ diff --git a/examples/starting-point-and-click-adventure/assets/StartingPlayer_Up.png b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Up.png new file mode 100644 index 000000000..f3e7a7e03 Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/StartingPlayer_Up.png differ diff --git a/examples/starting-point-and-click-adventure/assets/starter_pop.wav b/examples/starting-point-and-click-adventure/assets/starter_pop.wav new file mode 100644 index 000000000..5bc547262 Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/starter_pop.wav differ diff --git a/examples/starting-point-and-click-adventure/assets/starting_bookopen.wav b/examples/starting-point-and-click-adventure/assets/starting_bookopen.wav new file mode 100644 index 000000000..a63e2783f Binary files /dev/null and b/examples/starting-point-and-click-adventure/assets/starting_bookopen.wav differ diff --git a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json index 26cff557b..0b9aaed51 100644 --- a/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json +++ b/examples/starting-point-and-click-adventure/starting-point-and-click-adventure.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -91,14 +91,6 @@ }, "resources": { "resources": [ - { - "file": "assets/StartingPlayer.png", - "kind": "image", - "metadata": "", - "name": "assets\\StartingPlayer.png", - "smoothed": true, - "userAdded": false - }, { "file": "assets/StartingCollisionArea.png", "kind": "image", @@ -169,6 +161,66 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/Dialog Boxes/6b410f07a3a02e721a49d41795e84b56707ef28ac4d095d55f1fd1093760e134_8BitOperatorPlus8Regular_Edited.fnt", "name": "8BitOperatorPlus8Regular_Edited.fnt" } + }, + { + "file": "assets/StartingPlayer_Right.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingPlayer_Right.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/StartingPlayer_Down.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingPlayer_Down.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/StartingPlayer_Left.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingPlayer_Left.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/StartingPlayer_Up.png", + "kind": "image", + "metadata": "", + "name": "assets/StartingPlayer_Up.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/DirtParticle.png", + "kind": "image", + "metadata": "", + "name": "assets/DirtParticle.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/starting_bookopen.wav", + "kind": "audio", + "metadata": "", + "name": "assets/starting_bookopen.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false + }, + { + "file": "assets/starter_pop.wav", + "kind": "audio", + "metadata": "", + "name": "assets/starter_pop.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false } ] }, @@ -201,7 +253,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5468750000000111, + "zoomFactor": 0.7619362677197756, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -211,10 +263,10 @@ "name": "Characters", "objects": [ { - "name": "Player" + "name": "NPC" }, { - "name": "NPC" + "name": "Player" } ] } @@ -224,7 +276,7 @@ "name": "SceneScaling", "persistentUuid": "3c812502-8393-4d83-9ff8-57ed7c1b9330", "type": "number", - "value": 0.75 + "value": 0.8 } ], "instances": [ @@ -253,9 +305,9 @@ "layer": "", "name": "PathfindingObstacle", "persistentUuid": "e8c3487a-80e5-465b-b3a8-8feada71d5fe", - "width": 271, - "x": 689, - "y": 507, + "width": 288, + "x": 681, + "y": 508, "zOrder": 2, "numberProperties": [], "stringProperties": [], @@ -270,7 +322,7 @@ "name": "PathfindingObstacle", "persistentUuid": "37508cd7-0278-4982-be39-c37f7544c16a", "width": 64, - "x": 944, + "x": 951, "y": 640, "zOrder": 2, "numberProperties": [], @@ -286,7 +338,7 @@ "name": "PathfindingObstacle", "persistentUuid": "ef37aabf-9ae6-4836-931e-30e9fc5511cd", "width": 64, - "x": 689, + "x": 684, "y": 544, "zOrder": 2, "numberProperties": [], @@ -361,22 +413,6 @@ "stringProperties": [], "initialVariables": [] }, - { - "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, - "layer": "", - "name": "Player", - "persistentUuid": "1375f3d2-9441-4452-a57e-48f5841b70dc", - "width": 0, - "x": 360, - "y": 475, - "zOrder": 6, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": true, @@ -522,8 +558,8 @@ "name": "PathfindingObstacle", "persistentUuid": "f8399add-f0d6-4245-b651-8d0ab194935c", "width": 64, - "x": 912, - "y": 512, + "x": 923, + "y": 541, "zOrder": 2, "numberProperties": [], "stringProperties": [], @@ -538,8 +574,8 @@ "name": "PathfindingObstacle", "persistentUuid": "f040d246-9627-49ff-81a1-5cdc40b64191", "width": 64, - "x": 928, - "y": 576, + "x": 940, + "y": 591, "zOrder": 2, "numberProperties": [], "stringProperties": [], @@ -588,8 +624,8 @@ "name": "NPC", "persistentUuid": "8ea20f0b-0cde-4638-9fd0-d1aa06a61654", "width": 0, - "x": 1024, - "y": 328, + "x": 1009, + "y": 307, "zOrder": 7, "numberProperties": [], "stringProperties": [], @@ -620,41 +656,84 @@ "name": "NPC", "persistentUuid": "06f12367-b7ac-4b92-9370-d63a537d8474", "width": 0, - "x": 128, - "y": 648, + "x": 152, + "y": 658, "zOrder": 7, "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Player", + "persistentUuid": "d2ffca6b-8de2-42c2-ab5d-90c7e9a6c447", + "width": 0, + "x": 407, + "y": 455, + "zOrder": 9, + "numberProperties": [ + { + "name": "animation", + "value": 1 + } + ], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ { - "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "Player", - "type": "Sprite", - "updateIfNotVisible": false, + "height": 720, + "name": "Background", + "persistentUuid": "a5e91b1d-3caa-4d0d-b9c4-b711eb60a0ee", + "texture": "assets\\Background.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 1280, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "height": 64, + "name": "PathfindingObstacle", + "persistentUuid": "63679285-9e1c-4afb-9434-4aef7ceebd61", + "texture": "assets\\StartingCollisionArea.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 64, "variables": [], "effects": [], "behaviors": [ { - "name": "Pathfinding", - "type": "PathfindingBehavior::PathfindingBehavior", - "acceleration": 2000, - "allowDiagonals": true, - "angleOffset": 0, - "angularMaxSpeed": 180, - "cellHeight": 5, - "cellWidth": 5, - "extraBorder": 0, - "gridOffsetX": 0, - "gridOffsetY": 0, - "maxSpeed": 200, - "rotateObject": false, - "smoothingMaxCellGap": 1 + "name": "PathfindingObstacle", + "type": "PathfindingBehavior::PathfindingObstacleBehavior", + "cost": 2, + "impassable": true + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "NPC", + "persistentUuid": "55982d09-b674-4f39-a74d-cee4c65e32b4", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "name": "Selected", + "persistentUuid": "2378316c-7793-4844-8e78-c83d98580070", + "type": "boolean", + "value": false } ], + "effects": [], + "behaviors": [], "animations": [ { "name": "", @@ -666,7 +745,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingPlayer.png", + "image": "assets\\StartingNPC.png", "points": [], "originPoint": { "name": "origine", @@ -682,20 +761,20 @@ "customCollisionMask": [ [ { - "x": 70, - "y": 160 + "x": 20, + "y": 120 }, { - "x": 186, - "y": 160 + "x": 119, + "y": 120 }, { - "x": 186, - "y": 240 + "x": 119, + "y": 223 }, { - "x": 70, - "y": 240 + "x": 20, + "y": 223 } ] ] @@ -707,52 +786,58 @@ ] }, { - "assetStoreId": "", - "height": 720, - "name": "Background", - "texture": "assets\\Background.png", - "type": "TiledSpriteObject::TiledSprite", - "width": 1280, - "variables": [], - "effects": [], - "behaviors": [] - }, - { - "assetStoreId": "", - "height": 64, - "name": "PathfindingObstacle", - "texture": "assets\\StartingCollisionArea.png", - "type": "TiledSpriteObject::TiledSprite", - "width": 64, + "assetStoreId": "9d5de415b6e469c681701ea42d3b1c486fee31d6ef591a2d3e226f639ab486ff", + "name": "TwoChoicesDialogBox", + "persistentUuid": "43dcc83b-4f79-4a52-804b-5580645ea985", + "type": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", + "variant": "DialogBox", "variables": [], "effects": [], - "behaviors": [ - { - "name": "PathfindingObstacle", - "type": "PathfindingBehavior::PathfindingObstacleBehavior", - "cost": 2, - "impassable": true - } - ] + "behaviors": [], + "content": { + "LabelButtonID0": "Yes", + "TextMessage": "Want me to go away?", + "EnableEscape": false + } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "NPC", + "name": "Player", + "persistentUuid": "0965c535-d7d6-47e2-b4a7-2e41f9517bfe", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "Selected", + "persistentUuid": "2378316c-7793-4844-8e78-c83d98580070", "type": "boolean", "value": false } ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "isFolded": true, + "name": "Pathfinding", + "type": "PathfindingBehavior::PathfindingBehavior", + "acceleration": 2000, + "allowDiagonals": true, + "angleOffset": 0, + "angularMaxSpeed": 180, + "cellHeight": 5, + "cellWidth": 5, + "extraBorder": 0, + "gridOffsetX": 0, + "gridOffsetY": 0, + "maxSpeed": 200, + "rotateObject": false, + "smoothingMaxCellGap": 1 + } + ], "animations": [ { - "name": "", + "name": "Walk0", "useMultipleDirections": false, "directions": [ { @@ -761,7 +846,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingNPC.png", + "image": "assets/StartingPlayer_Right.png", "points": [], "originPoint": { "name": "origine", @@ -771,26 +856,170 @@ "centerPoint": { "automatic": true, "name": "centre", - "x": 0, - "y": 0 + "x": 32, + "y": 64 }, "customCollisionMask": [ [ { - "x": 40, - "y": 140 + "x": 20, + "y": 223 }, { - "x": 216, - "y": 140 + "x": 20, + "y": 176 }, { - "x": 216, - "y": 256 + "x": 119, + "y": 176 }, { - "x": 40, - "y": 256 + "x": 119, + "y": 223 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Walk1", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/StartingPlayer_Down.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 69.5, + "y": 195 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 32, + "y": 64 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 223 + }, + { + "x": 20, + "y": 176 + }, + { + "x": 119, + "y": 176 + }, + { + "x": 119, + "y": 223 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Walk2", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/StartingPlayer_Left.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 69.5, + "y": 195 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 32, + "y": 64 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 223 + }, + { + "x": 20, + "y": 176 + }, + { + "x": 119, + "y": 176 + }, + { + "x": 119, + "y": 223 + } + ] + ] + } + ] + } + ] + }, + { + "name": "Walk3", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/StartingPlayer_Up.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 69.5, + "y": 195 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 32, + "y": 64 + }, + "customCollisionMask": [ + [ + { + "x": 20, + "y": 223 + }, + { + "x": 20, + "y": 176 + }, + { + "x": 119, + "y": 176 + }, + { + "x": 119, + "y": 223 } ] ] @@ -802,28 +1031,62 @@ ] }, { - "assetStoreId": "9d5de415b6e469c681701ea42d3b1c486fee31d6ef591a2d3e226f639ab486ff", - "name": "TwoChoicesDialogBox", - "type": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", - "variant": "DialogBox", + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 130, + "emitterForceMin": 100, + "flow": 800, + "jumpForwardInTimeOnCreation": 0.3, + "maxParticleNb": 300, + "name": "DebrisParticle", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 231, + "particleColor1": "255;255;255", + "particleColor2": "231;231;231", + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 255, + "particleGreen2": 231, + "particleLifeTimeMax": 0.6, + "particleLifeTimeMin": 0.4, + "particleRed1": 255, + "particleRed2": 231, + "particleSize1": 100, + "particleSize2": 75, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "persistentUuid": "b978f0b7-ee5f-41ae-a352-514b4cbbb7ca", + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tank": 28, + "textureParticleName": "assets/DirtParticle.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, "variables": [], "effects": [], - "behaviors": [], - "content": { - "LabelButtonID0": "Yes", - "TextMessage": "Want me to go away?", - "EnableEscape": false - } + "behaviors": [] } ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ { - "objectName": "Player" + "objectName": "NPC" }, { - "objectName": "NPC" + "objectName": "Player" }, { "objectName": "Background" @@ -831,6 +1094,9 @@ { "objectName": "PathfindingObstacle" }, + { + "objectName": "DebrisParticle" + }, { "objectName": "TwoChoicesDialogBox" } @@ -1016,6 +1282,141 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PathfindingBehavior::Speed" + }, + "parameters": [ + "Player", + "Pathfinding", + ">", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PathfindingBehavior::PathfindingBehavior::MovementAngleIsAround" + }, + "parameters": [ + "Player", + "Pathfinding", + "0", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetIndex" + }, + "parameters": [ + "Player", + "Animation", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PathfindingBehavior::PathfindingBehavior::MovementAngleIsAround" + }, + "parameters": [ + "Player", + "Pathfinding", + "90", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetIndex" + }, + "parameters": [ + "Player", + "Animation", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PathfindingBehavior::PathfindingBehavior::MovementAngleIsAround" + }, + "parameters": [ + "Player", + "Pathfinding", + "180", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetIndex" + }, + "parameters": [ + "Player", + "Animation", + "=", + "2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PathfindingBehavior::PathfindingBehavior::MovementAngleIsAround" + }, + "parameters": [ + "Player", + "Pathfinding", + "270", + "45" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetIndex" + }, + "parameters": [ + "Player", + "Animation", + "=", + "3" + ] + } + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -1044,6 +1445,18 @@ } ], "actions": [ + { + "type": { + "value": "PathfindingBehavior::SetDestination" + }, + "parameters": [ + "Player", + "Pathfinding", + "", + "Player.X()", + "Player.Y()" + ] + }, { "type": { "value": "ActivateBehavior" @@ -1062,6 +1475,18 @@ "", "\"Dialog layer\"" ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starting_bookopen.wav", + "", + "80", + "1.1" + ] } ] } @@ -1125,6 +1550,40 @@ } ], "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "DebrisParticle", + "NPC.CenterX()", + "NPC.CenterY()", + "" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "DebrisParticle", + "=", + "NPC.ZOrder()-1" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starter_pop.wav", + "", + "80", + "RandomFloatInRange(0.7,0.9)" + ] + }, { "type": { "value": "Delete" @@ -1196,6 +1655,18 @@ "False", "" ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starting_bookopen.wav", + "", + "80", + "0.8" + ] } ] } @@ -1314,9 +1785,9 @@ "externalEvents": [], "tests": [ { + "description": "Clicking a spot gives the player a path and it walks toward it; it stands still while nothing is clicked.", "name": "Clicking sends the player walking there", "type": "gameplay", - "description": "Clicking a spot gives the player a path and it walks toward it; it stands still while nothing is clicked.", "source": [ "// The core of the game: clicking somewhere sends the player walking there.", "await harness.goToScene('Game Scene');", @@ -1423,9 +1894,9 @@ ] }, { + "description": "Clicking an NPC next to the player opens the dialog, and saying yes makes that NPC leave.", "name": "Talking to an NPC and saying yes", "type": "gameplay", - "description": "Clicking an NPC next to the player opens the dialog, and saying yes makes that NPC leave.", "source": [ "// Talking to an NPC: clicking one picks it, walking into it opens the", "// dialog, and saying yes makes it leave.", @@ -18320,6 +18791,7 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "NoButton", + "persistentUuid": "c52cbb10-4c81-4902-b6f3-868a0a1f7e44", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "OptionButton", "variables": [ @@ -18368,11 +18840,13 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "YesButton", + "persistentUuid": "90f29c7b-6b95-4eae-b4c6-aada4f5798ea", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "OptionButton", "variables": [ { "name": "ID", + "persistentUuid": "b12c7a4a-1672-491a-838d-38e6803979a9", "type": "number", "value": 0 } @@ -18419,6 +18893,7 @@ "height": 48, "leftMargin": 16, "name": "TextBorder", + "persistentUuid": "bc80fadf-0c09-4e82-87ad-572194e4de77", "rightMargin": 16, "texture": "Border.png", "tiled": true, @@ -18570,13 +19045,13 @@ "angle": 0, "customSize": true, "depth": 32, - "height": 36, + "height": 42, "layer": "", "name": "YesButton", "persistentUuid": "a0ca78d3-0a23-4bbe-89de-fb2d0a53996c", "width": 105, "x": 350, - "y": 160, + "y": 154, "zOrder": 510, "numberProperties": [], "stringProperties": [], @@ -18586,13 +19061,13 @@ "angle": 0, "customSize": true, "depth": 32, - "height": 36, + "height": 42, "layer": "", "name": "NoButton", "persistentUuid": "6781aafa-3ae9-4820-bb97-682a524a0cf6", "width": 103, "x": 471, - "y": 160, + "y": 154, "zOrder": 510, "numberProperties": [], "stringProperties": [], @@ -18606,7 +19081,23 @@ ] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.3321680696746645, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } }, { "areaMaxX": 600, @@ -22967,20 +23458,22 @@ }, { "assetStoreId": "", - "bottomMargin": 11, + "bottomMargin": 18, "height": 106, - "leftMargin": 11, + "leftMargin": 18, "name": "Idle", - "rightMargin": 11, + "persistentUuid": "e48868d8-f6f1-4f7b-82ad-d6d37bffe527", + "rightMargin": 18, "texture": "Border.png", "tiled": false, - "topMargin": 11, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [ { "folded": true, "name": "State", + "persistentUuid": "a413a890-6ee0-4dc3-95eb-e65ba1f5587d", "type": "string", "value": "Idle" } @@ -23006,14 +23499,15 @@ }, { "assetStoreId": "", - "bottomMargin": 8, + "bottomMargin": 18, "height": 106, - "leftMargin": 8, + "leftMargin": 18, "name": "Hovered", - "rightMargin": 8, + "persistentUuid": "e0b0a88e-03e0-422e-9633-1d8b4a47cb3e", + "rightMargin": 18, "texture": "Border2.png", "tiled": false, - "topMargin": 8, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [], @@ -23037,14 +23531,15 @@ }, { "assetStoreId": "", - "bottomMargin": 8, + "bottomMargin": 18, "height": 106, - "leftMargin": 8, + "leftMargin": 18, "name": "Pressed", - "rightMargin": 8, + "persistentUuid": "0fb9735f-a19e-4561-8086-4b0a941bcf14", + "rightMargin": 18, "texture": "Border2.png", "tiled": false, - "topMargin": 8, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [], @@ -23215,7 +23710,23 @@ "initialVariables": [] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } }, { "areaMaxX": 256, diff --git a/examples/starting-point-and-click-pixel/assets/StartingPixelGroundTilemap.png b/examples/starting-point-and-click-pixel/assets/StartingPixelGroundTilemap.png index c8df79022..8f14e1a30 100644 Binary files a/examples/starting-point-and-click-pixel/assets/StartingPixelGroundTilemap.png and b/examples/starting-point-and-click-pixel/assets/StartingPixelGroundTilemap.png differ diff --git a/examples/starting-point-and-click-pixel/assets/StartingPixelPlayer.png b/examples/starting-point-and-click-pixel/assets/StartingPixelPlayer.png index 92b76c0b8..72c9eefa5 100644 Binary files a/examples/starting-point-and-click-pixel/assets/StartingPixelPlayer.png and b/examples/starting-point-and-click-pixel/assets/StartingPixelPlayer.png differ diff --git a/examples/starting-point-and-click-pixel/assets/StartingPixelWall.png b/examples/starting-point-and-click-pixel/assets/StartingPixelWall.png index 9ed3a407a..aff9da991 100644 Binary files a/examples/starting-point-and-click-pixel/assets/StartingPixelWall.png and b/examples/starting-point-and-click-pixel/assets/StartingPixelWall.png differ diff --git a/examples/starting-point-and-click-pixel/assets/StartingPixelWater.png b/examples/starting-point-and-click-pixel/assets/StartingPixelWater.png index f1076eec1..ad4d23cd4 100644 Binary files a/examples/starting-point-and-click-pixel/assets/StartingPixelWater.png and b/examples/starting-point-and-click-pixel/assets/StartingPixelWater.png differ diff --git a/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json b/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json index 7ef03eba3..35b0bdef7 100644 --- a/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json +++ b/examples/starting-point-and-click-pixel/starting-point-and-click-pixel.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -154,7 +154,7 @@ "gridColor": 10401023, "gridAlpha": 0.4, "snap": false, - "zoomFactor": 1.1726229638177708, + "zoomFactor": 1.5289132892233352, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -369,6 +369,7 @@ "height": 96, "leftMargin": 32, "name": "Water_Passable", + "persistentUuid": "d306ebf1-c4dc-4bad-b405-fd9ada4ef991", "rightMargin": 32, "texture": "assets\\StartingPixelWater.png", "tiled": true, @@ -603,9 +604,9 @@ "externalEvents": [], "tests": [ { + "description": "The player walks to where the mouse clicked and stops once it has arrived.", "name": "Clicking sends the player there", "type": "gameplay", - "description": "The player walks to where the mouse clicked and stops once it has arrived.", "source": [ "// The only control of the game: clicking somewhere sends the player walking", "// there, using the Pathfinding behavior.", @@ -680,9 +681,9 @@ ] }, { + "description": "Sent to the other side of an impassable obstacle, the player finds a way around instead of going through it.", "name": "The player walks around obstacles", "type": "gameplay", - "description": "Sent to the other side of an impassable obstacle, the player finds a way around instead of going through it.", "source": [ "// The pathfinding must walk around the impassable obstacles instead of", "// through them.", diff --git a/examples/starting-top-down-farming/assets/A button.png b/examples/starting-top-down-farming/assets/A button.png index 23ac10d53..644bce1a3 100644 Binary files a/examples/starting-top-down-farming/assets/A button.png and b/examples/starting-top-down-farming/assets/A button.png differ diff --git a/examples/starting-top-down-farming/assets/Beet_Planted.png b/examples/starting-top-down-farming/assets/Beet_Planted.png index d4b3145ab..1b2509d26 100644 Binary files a/examples/starting-top-down-farming/assets/Beet_Planted.png and b/examples/starting-top-down-farming/assets/Beet_Planted.png differ diff --git a/examples/starting-top-down-farming/assets/Boulder.png b/examples/starting-top-down-farming/assets/Boulder.png new file mode 100644 index 000000000..8b99f9232 Binary files /dev/null and b/examples/starting-top-down-farming/assets/Boulder.png differ diff --git a/examples/starting-top-down-farming/assets/Carrot_Planted.png b/examples/starting-top-down-farming/assets/Carrot_Planted.png index 6cc85a84f..e7dfa0029 100644 Binary files a/examples/starting-top-down-farming/assets/Carrot_Planted.png and b/examples/starting-top-down-farming/assets/Carrot_Planted.png differ diff --git a/examples/starting-top-down-farming/assets/DirtParticle.png b/examples/starting-top-down-farming/assets/DirtParticle.png index 28066216a..07db099a3 100644 Binary files a/examples/starting-top-down-farming/assets/DirtParticle.png and b/examples/starting-top-down-farming/assets/DirtParticle.png differ diff --git a/examples/starting-top-down-farming/assets/Flat dark joystick border.png b/examples/starting-top-down-farming/assets/Flat dark joystick border.png index 606bf85b2..b4e83e112 100644 Binary files a/examples/starting-top-down-farming/assets/Flat dark joystick border.png and b/examples/starting-top-down-farming/assets/Flat dark joystick border.png differ diff --git a/examples/starting-top-down-farming/assets/Flat dark joystick thumb.png b/examples/starting-top-down-farming/assets/Flat dark joystick thumb.png index acd005cc0..8acf179f8 100644 Binary files a/examples/starting-top-down-farming/assets/Flat dark joystick thumb.png and b/examples/starting-top-down-farming/assets/Flat dark joystick thumb.png differ diff --git a/examples/starting-top-down-farming/assets/Harvest_Seed_Beet.png b/examples/starting-top-down-farming/assets/Harvest_Seed_Beet.png index d9378995d..4c85637ea 100644 Binary files a/examples/starting-top-down-farming/assets/Harvest_Seed_Beet.png and b/examples/starting-top-down-farming/assets/Harvest_Seed_Beet.png differ diff --git a/examples/starting-top-down-farming/assets/Harvest_Seed_Carrot.png b/examples/starting-top-down-farming/assets/Harvest_Seed_Carrot.png index 68ef85ae7..1a3c2f4a6 100644 Binary files a/examples/starting-top-down-farming/assets/Harvest_Seed_Carrot.png and b/examples/starting-top-down-farming/assets/Harvest_Seed_Carrot.png differ diff --git a/examples/starting-top-down-farming/assets/Seed_beet.png b/examples/starting-top-down-farming/assets/Seed_beet.png index a19e6f058..fe24683da 100644 Binary files a/examples/starting-top-down-farming/assets/Seed_beet.png and b/examples/starting-top-down-farming/assets/Seed_beet.png differ diff --git a/examples/starting-top-down-farming/assets/Seed_carrot.png b/examples/starting-top-down-farming/assets/Seed_carrot.png index 897d18ad6..9682c5968 100644 Binary files a/examples/starting-top-down-farming/assets/Seed_carrot.png and b/examples/starting-top-down-farming/assets/Seed_carrot.png differ diff --git a/examples/starting-top-down-farming/assets/StartingGroundTilemap.png b/examples/starting-top-down-farming/assets/StartingGroundTilemap.png index 42e448154..ec7e0f2d1 100644 Binary files a/examples/starting-top-down-farming/assets/StartingGroundTilemap.png and b/examples/starting-top-down-farming/assets/StartingGroundTilemap.png differ diff --git a/examples/starting-top-down-farming/assets/StartingInventorySlot.png b/examples/starting-top-down-farming/assets/StartingInventorySlot.png index 8d845d339..f93f37cf0 100644 Binary files a/examples/starting-top-down-farming/assets/StartingInventorySlot.png and b/examples/starting-top-down-farming/assets/StartingInventorySlot.png differ diff --git a/examples/starting-top-down-farming/assets/StartingPlayer_Down.png b/examples/starting-top-down-farming/assets/StartingPlayer_Down.png index a8dc0b4ad..a267c7ebb 100644 Binary files a/examples/starting-top-down-farming/assets/StartingPlayer_Down.png and b/examples/starting-top-down-farming/assets/StartingPlayer_Down.png differ diff --git a/examples/starting-top-down-farming/assets/StartingPlayer_Left.png b/examples/starting-top-down-farming/assets/StartingPlayer_Left.png index f23250710..c0659c1fc 100644 Binary files a/examples/starting-top-down-farming/assets/StartingPlayer_Left.png and b/examples/starting-top-down-farming/assets/StartingPlayer_Left.png differ diff --git a/examples/starting-top-down-farming/assets/StartingPlayer_Right.png b/examples/starting-top-down-farming/assets/StartingPlayer_Right.png index 5e1b2ee32..17810fc15 100644 Binary files a/examples/starting-top-down-farming/assets/StartingPlayer_Right.png and b/examples/starting-top-down-farming/assets/StartingPlayer_Right.png differ diff --git a/examples/starting-top-down-farming/assets/StartingPlayer_Up.png b/examples/starting-top-down-farming/assets/StartingPlayer_Up.png index 6faa144c1..cc31659b9 100644 Binary files a/examples/starting-top-down-farming/assets/StartingPlayer_Up.png and b/examples/starting-top-down-farming/assets/StartingPlayer_Up.png differ diff --git a/examples/starting-top-down-farming/assets/StartingWall.png b/examples/starting-top-down-farming/assets/StartingWall.png index f86317a80..69b0063ed 100644 Binary files a/examples/starting-top-down-farming/assets/StartingWall.png and b/examples/starting-top-down-farming/assets/StartingWall.png differ diff --git a/examples/starting-top-down-farming/assets/Tree.png b/examples/starting-top-down-farming/assets/Tree.png new file mode 100644 index 000000000..a692eb000 Binary files /dev/null and b/examples/starting-top-down-farming/assets/Tree.png differ diff --git a/examples/starting-top-down-farming/assets/beet.png b/examples/starting-top-down-farming/assets/beet.png index a53523683..4ca89109c 100644 Binary files a/examples/starting-top-down-farming/assets/beet.png and b/examples/starting-top-down-farming/assets/beet.png differ diff --git a/examples/starting-top-down-farming/assets/carrot.png b/examples/starting-top-down-farming/assets/carrot.png index c142fe830..40c44f46b 100644 Binary files a/examples/starting-top-down-farming/assets/carrot.png and b/examples/starting-top-down-farming/assets/carrot.png differ diff --git a/examples/starting-top-down-farming/starting-top-down-farming.json b/examples/starting-top-down-farming/starting-top-down-farming.json index b9bf85079..44aa175e1 100644 --- a/examples/starting-top-down-farming/starting-top-down-farming.json +++ b/examples/starting-top-down-farming/starting-top-down-farming.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -325,7 +325,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.43357743047024244, + "zoomFactor": 0.6244537826600064, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -395,22 +395,6 @@ } ], "instances": [ - { - "angle": 0, - "customSize": false, - "height": 64, - "keepRatio": true, - "layer": "", - "name": "Player", - "persistentUuid": "ebd4e918-fdc8-4c06-baef-2e0f46c2cfd5", - "width": 64, - "x": 640, - "y": 400, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, { "angle": 0, "customSize": false, @@ -731,113 +715,135 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Player", + "persistentUuid": "106a31ab-8cae-4fd4-9216-cfee1ac022dd", + "width": 0, + "x": 640, + "y": 381, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ + { + "assetStoreId": "", + "name": "Ground_Tilemap", + "persistentUuid": "7becc408-3008-4fe3-aac4-c3401de0f8ed", + "type": "TileMap::SimpleTileMap", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "atlasImage": "assets\\StartingGroundTilemap.png", + "rowCount": 3, + "columnCount": 3, + "tileSize": 64, + "tilesWithHitBox": "4" + } + }, + { + "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", + "name": "MoveJoystick", + "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", + "variant": "", + "variables": [], + "effects": [], + "behaviors": [], + "content": {}, + "childrenContent": { + "Border": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Flat dark joystick border.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + "Thumb": { + "adaptCollisionMaskAutomatically": false, + "updateIfNotVisible": false, + "animations": [ + { + "name": "Idle", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Flat dark joystick thumb.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + } + } + }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "Player", + "name": "Building_Obstacle", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [ - { - "isFolded": true, - "name": "SmoothCamera", - "type": "SmoothCamera::SmoothCamera", - "LeftwardSpeed": 0.9, - "RightwardSpeed": 0.9, - "UpwardSpeed": 0.9, - "DownwardSpeed": 0.9, - "FollowOnX": true, - "FollowOnY": true, - "FollowFreeAreaLeft": 0, - "FollowFreeAreaRight": 0, - "FollowFreeAreaTop": 0, - "FollowFreeAreaBottom": 0, - "CameraOffsetX": 0, - "CameraOffsetY": 0, - "CameraDelay": 0, - "ForecastTime": 0, - "ForecastHistoryDuration": 0, - "LogLeftwardSpeed": 2.0247e-320, - "LogRightwardSpeed": 2.0247e-320, - "LogDownwardSpeed": 2.0247e-320, - "LogUpwardSpeed": 2.0247e-320, - "DelayedCenterX": 2.0247e-320, - "DelayedCenterY": 2.0247e-320, - "ForecastHistoryMeanX": 2.0247e-320, - "ForecastHistoryMeanY": 2.0247e-320, - "ForecastHistoryVarianceX": 2.0247e-320, - "ForecastHistoryCovariance": 2.0247e-320, - "ForecastHistoryLinearA": 2.0247e-320, - "ForecastHistoryLinearB": 2.0247e-320, - "ForecastedX": 2.0247e-320, - "ForecastedY": 2.0247e-320, - "ProjectedNewestX": 2.0247e-320, - "ProjectedNewestY": 2.0247e-320, - "ProjectedOldestX": 2.0247e-320, - "ProjectedOldestY": 2.0247e-320, - "ForecastHistoryVarianceY": 2.0247e-320, - "Index": 2.0247e-320, - "CameraDelayCatchUpSpeed": 0, - "CameraExtraDelay": 2.0247e-320, - "WaitingSpeedXMax": 2.0247e-320, - "WaitingSpeedYMax": 2.0247e-320, - "WaitingEnd": 2.0247e-320, - "CameraDelayCatchUpDuration": 2.0247e-320, - "LeftwardSpeedMax": 9000, - "RightwardSpeedMax": 9000, - "UpwardSpeedMax": 9000, - "DownwardSpeedMax": 9000, - "OldX": 9000.000000007454, - "OldY": 9000.000000007454, - "IsCalledManually": false - }, - { - "isFolded": true, - "name": "TopDownMovement", - "type": "TopDownMovementBehavior::TopDownMovementBehavior", - "acceleration": 2000, - "deceleration": 3000, - "maxSpeed": 200, - "allowDiagonals": false, - "rotateObject": false, - "angularMaxSpeed": 300, - "angleOffset": 0, - "customIsometryAngle": 30, - "ignoreDefaultControls": false, - "movementAngleOffset": 0, - "viewpoint": "TopDown" - }, - { - "isFolded": true, - "name": "TopDownMovementAnimator", - "type": "TopDownMovementAnimator::TopDownMovementAnimator", - "Animation": "Animation", - "TopDownMovement": "TopDownMovement", - "IsScalingAnimation": false, - "IsPausingAnimation": false, - "AnimationName": "Walk", - "DirectionCount": 4, - "AngleOffset": 0, - "AnimationDirection": 0 - }, - { - "isFolded": true, - "name": "TopDownMultitouchMapper", - "type": "SpriteMultitouchJoystick::TopDownMultitouchMapper", - "TopDownMovement": "TopDownMovement", - "ControllerIdentifier": 1, - "JoystickIdentifier": "Primary", - "StickMode": "Analog" - } - ], + "behaviors": [], "animations": [ { - "name": "Walk0", + "name": "", "useMultipleDirections": false, "directions": [ { @@ -846,36 +852,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingPlayer_Right.png", + "image": "assets\\StartingWall.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 128 }, "centerPoint": { - "automatic": false, + "automatic": true, "name": "centre", - "x": 32, - "y": 64 + "x": 0, + "y": 0 }, "customCollisionMask": [ [ { "x": 0, - "y": 80 + "y": 64 }, { - "x": 32, + "x": 64, "y": 64 }, { "x": 64, - "y": 80 + "y": 128 }, { - "x": 32, - "y": 96 + "x": 0, + "y": 128 } ] ] @@ -883,47 +889,90 @@ ] } ] - }, + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "ActionButton", + "persistentUuid": "58d857ec-0cda-4e42-9a64-266661faf52a", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ { - "name": "Walk1", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween", + "Scale": "Scale", + "ButtonFSM": "ButtonFSM", + "Tween": "Tween", + "IdleScale": 1.5, + "FocusedScale": 1.4, + "FadeInDuration": 0.02, + "FadeOutDuration": 0.05, + "PressedScale": 1.3, + "FadeInEasing": "easeOutQuad", + "FadeOutEasing": "easeInQuad", + "PreviousState": "Idle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingPlayer_Down.png", + "image": "assets\\A button.png", "points": [], "originPoint": { "name": "origine", - "x": 32, - "y": 80 + "x": 40, + "y": 40 }, "centerPoint": { - "automatic": false, + "automatic": true, "name": "centre", - "x": 32, - "y": 64 + "x": 0, + "y": 0 }, "customCollisionMask": [ [ { "x": 0, - "y": 80 + "y": 0 }, { - "x": 32, - "y": 64 + "x": 80, + "y": 0 }, { - "x": 64, + "x": 80, "y": 80 }, { - "x": 32, - "y": 96 + "x": 0, + "y": 80 } ] ] @@ -931,9 +980,32 @@ ] } ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Ground_SelectionBox", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "name": "LastAction_LocationX", + "type": "number", + "value": 0 }, { - "name": "Walk2", + "name": "LastAction_LocationY", + "type": "number", + "value": 0 + } + ], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", "useMultipleDirections": false, "directions": [ { @@ -942,36 +1014,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingPlayer_Left.png", + "image": "assets\\Ground_SelectionBox.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 32 }, "centerPoint": { - "automatic": false, + "automatic": true, "name": "centre", - "x": 32, - "y": 64 + "x": 0, + "y": 0 }, "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 1, + "y": 1 }, { - "x": 32, - "y": 64 + "x": 63, + "y": 1 }, { - "x": 64, - "y": 80 + "x": 63, + "y": 63 }, { - "x": 32, - "y": 96 + "x": 1, + "y": 63 } ] ] @@ -979,9 +1051,60 @@ ] } ] + } + ] + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 160, + "leftMargin": 32, + "name": "InventorySlot", + "persistentUuid": "f18b1f87-e38d-42a4-9c22-3f104a36b614", + "rightMargin": 32, + "texture": "assets\\StartingInventorySlot.png", + "tiled": false, + "topMargin": 32, + "type": "PanelSpriteObject::PanelSprite", + "width": 160, + "variables": [ + { + "name": "SlotNumber", + "type": "number", + "value": 0 }, { - "name": "Walk3", + "name": "Selected", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Inventory_SelectionBox", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", "useMultipleDirections": false, "directions": [ { @@ -990,36 +1113,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingPlayer_Up.png", + "image": "assets\\SelectionBox.png", "points": [], "originPoint": { "name": "origine", - "x": 32, - "y": 80 + "x": 64, + "y": 64 }, "centerPoint": { - "automatic": false, + "automatic": true, "name": "centre", - "x": 32, - "y": 64 + "x": 0, + "y": 0 }, "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 3, + "y": 3 }, { - "x": 32, - "y": 64 + "x": 125, + "y": 3 }, { - "x": 64, - "y": 80 + "x": 125, + "y": 125 }, { - "x": 32, - "y": 96 + "x": 3, + "y": 125 } ] ] @@ -1032,113 +1155,118 @@ }, { "assetStoreId": "", - "name": "Ground_Tilemap", - "type": "TileMap::SimpleTileMap", - "variables": [], + "bold": false, + "italic": false, + "name": "SlotText", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [ + { + "name": "TextToUse", + "type": "string", + "value": "" + } + ], "effects": [], "behaviors": [], + "string": "Slot text", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "characterSize": 16, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, "content": { - "atlasImage": "assets\\StartingGroundTilemap.png", - "rowCount": 3, - "columnCount": 3, - "tileSize": 64, - "tilesWithHitBox": "4" + "bold": false, + "isOutlineEnabled": true, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "0;0;0", + "outlineThickness": 4, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Slot text", + "font": "assets\\NotoSansArabicUI-Black.ttf", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 16, + "lineHeight": 0, + "color": "255;255;255" } }, { - "assetStoreId": "e71bd69f896d6c7531b48c65ceb5da25071d4fbdeb518aeceecba8d21f34ed8d", - "name": "MoveJoystick", - "type": "SpriteMultitouchJoystick::SpriteMultitouchJoystick", - "variant": "", - "variables": [], - "effects": [], - "behaviors": [], - "content": {}, - "childrenContent": { - "Border": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Flat dark joystick border.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - }, - "Thumb": { - "adaptCollisionMaskAutomatically": false, - "updateIfNotVisible": false, - "animations": [ - { - "name": "Idle", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "Flat dark joystick thumb.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] - } - ] - } - } - }, - { - "adaptCollisionMaskAutomatically": false, + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "Building_Obstacle", + "name": "Carrot", + "persistentUuid": "ec14052e-057e-41e6-a2a7-e01966f4baa8", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], + "variables": [ + { + "name": "ResultingObject", + "persistentUuid": "8a750d56-1b2f-4e48-ae5b-578c7724a850", + "type": "string", + "value": "" + }, + { + "name": "CanBePickedUp", + "persistentUuid": "53103ace-97e1-4277-adbe-672cf4653984", + "type": "boolean", + "value": true + }, + { + "name": "JustPlaced", + "persistentUuid": "ebdc0b98-daf3-4bd6-87de-f76d268f38f0", + "type": "boolean", + "value": false + }, + { + "name": "ItemType", + "persistentUuid": "8c768ba4-749c-4c73-a83e-970d14b44019", + "type": "string", + "value": "Food" + }, + { + "name": "PickUp", + "persistentUuid": "bedd99ce-0761-4dc3-b3d6-00a8a14dd36d", + "type": "boolean", + "value": false + }, + { + "name": "GrowthTime", + "persistentUuid": "fdfae308-d4ce-4e87-a3d0-77c8477ea791", + "type": "number", + "value": 10 + }, + { + "name": "Held", + "persistentUuid": "8f16d4a5-3ceb-411d-bbf7-e689c63cebcc", + "type": "boolean", + "value": false + } + ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], "animations": [ { - "name": "", + "name": "Food", "useMultipleDirections": false, "directions": [ { @@ -1147,12 +1275,12 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\StartingWall.png", + "image": "assets\\carrot.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 128 + "y": 32 }, "centerPoint": { "automatic": true, @@ -1163,20 +1291,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 64 + "x": 14, + "y": 5 }, { - "x": 64, - "y": 64 + "x": 74, + "y": 5 }, { - "x": 64, - "y": 128 + "x": 74, + "y": 89 }, { - "x": 0, - "y": 128 + "x": 14, + "y": 89 } ] ] @@ -1184,32 +1312,9 @@ ] } ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "ActionButton", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "ButtonStates::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 2.0247e-320 - } - ], - "animations": [ + }, { - "name": "", + "name": "Planted", "useMultipleDirections": false, "directions": [ { @@ -1218,12 +1323,12 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\A button.png", + "image": "assets\\Carrot_Planted.png", "points": [], "originPoint": { "name": "origine", - "x": 40, - "y": 40 + "x": 32, + "y": 32 }, "centerPoint": { "automatic": true, @@ -1234,20 +1339,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 0 + "x": 14, + "y": 5 }, { - "x": 80, - "y": 0 + "x": 74, + "y": 5 }, { - "x": 80, - "y": 80 + "x": 74, + "y": 89 }, { - "x": 0, - "y": 80 + "x": 14, + "y": 89 } ] ] @@ -1259,25 +1364,33 @@ ] }, { - "adaptCollisionMaskAutomatically": true, + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "Ground_SelectionBox", + "name": "Harvest_Seed_Carrot", + "persistentUuid": "6d675b26-9dc6-4ceb-aca8-07bf940926d0", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { - "name": "LastAction_LocationX", - "type": "number", - "value": 0 + "name": "ResultingObject", + "persistentUuid": "43a0633b-3d95-4641-8b36-3f40a223372d", + "type": "string", + "value": "Seed_Carrot" }, { - "name": "LastAction_LocationY", - "type": "number", - "value": 0 + "name": "Triggered", + "persistentUuid": "bd382710-15ec-4ae5-807a-0123f2dde3ea", + "type": "boolean", + "value": false } ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], "animations": [ { "name": "", @@ -1289,12 +1402,12 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Ground_SelectionBox.png", + "image": "assets\\Harvest_Seed_Carrot.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 32 + "y": 64 }, "centerPoint": { "automatic": true, @@ -1305,20 +1418,20 @@ "customCollisionMask": [ [ { - "x": 1, - "y": 1 + "x": 0, + "y": 32 }, { - "x": 63, - "y": 1 + "x": 64, + "y": 32 }, { - "x": 63, - "y": 63 + "x": 64, + "y": 96 }, { - "x": 1, - "y": 63 + "x": 0, + "y": 96 } ] ] @@ -1329,48 +1442,10 @@ } ] }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 160, - "leftMargin": 32, - "name": "InventorySlot", - "rightMargin": 32, - "texture": "assets\\StartingInventorySlot.png", - "tiled": false, - "topMargin": 32, - "type": "PanelSpriteObject::PanelSprite", - "width": 160, - "variables": [ - { - "name": "SlotNumber", - "type": "number", - "value": 0 - }, - { - "name": "Selected", - "type": "boolean", - "value": false - } - ], - "effects": [], - "behaviors": [ - { - "name": "ButtonFSM", - "type": "ButtonStates::ButtonFSM", - "ShouldCheckHovering": true, - "State": "Idle", - "TouchId": 0, - "TouchIsInside": false, - "MouseIsInside": false, - "Index": 2.0247e-320 - } - ] - }, { "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "Inventory_SelectionBox", + "name": "InventoryIcons", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1378,7 +1453,7 @@ "behaviors": [], "animations": [ { - "name": "", + "name": "Carrot", "useMultipleDirections": false, "directions": [ { @@ -1387,12 +1462,18 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\SelectionBox.png", - "points": [], + "image": "assets\\carrot.png", + "points": [ + { + "name": "QuantityText", + "x": 53, + "y": 51 + } + ], "originPoint": { "name": "origine", - "x": 64, - "y": 64 + "x": 32, + "y": 32 }, "centerPoint": { "automatic": true, @@ -1403,20 +1484,20 @@ "customCollisionMask": [ [ { - "x": 3, - "y": 3 + "x": 14, + "y": 5 }, { - "x": 125, - "y": 3 + "x": 74, + "y": 5 }, { - "x": 125, - "y": 125 + "x": 74, + "y": 89 }, { - "x": 3, - "y": 125 + "x": 14, + "y": 89 } ] ] @@ -1424,115 +1505,117 @@ ] } ] - } - ] - }, - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "SlotText", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [ - { - "name": "TextToUse", - "type": "string", - "value": "" - } - ], - "effects": [], - "behaviors": [], - "string": "Slot text", - "font": "assets\\NotoSansArabicUI-Black.ttf", - "textAlignment": "left", - "characterSize": 16, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": false, - "isOutlineEnabled": true, - "isShadowEnabled": false, - "italic": false, - "outlineColor": "0;0;0", - "outlineThickness": 4, - "shadowAngle": 90, - "shadowBlurRadius": 2, - "shadowColor": "0;0;0", - "shadowDistance": 4, - "shadowOpacity": 127, - "smoothed": true, - "underlined": false, - "text": "Slot text", - "font": "assets\\NotoSansArabicUI-Black.ttf", - "textAlignment": "left", - "verticalTextAlignment": "top", - "characterSize": 16, - "lineHeight": 0, - "color": "255;255;255" - } - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Carrot", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [ - { - "name": "ResultingObject", - "type": "string", - "value": "" - }, - { - "name": "CanBePickedUp", - "type": "boolean", - "value": true }, { - "name": "JustPlaced", - "type": "boolean", - "value": false - }, - { - "name": "ItemType", - "type": "string", - "value": "Food" - }, - { - "name": "PickUp", - "type": "boolean", - "value": false - }, - { - "name": "GrowthTime", - "type": "number", - "value": 10 + "name": "Seed_Carrot", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\Seed_carrot.png", + "points": [ + { + "name": "QuantityText", + "x": 53, + "y": 51 + } + ], + "originPoint": { + "name": "origine", + "x": 32, + "y": 32 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 14, + "y": 5 + }, + { + "x": 74, + "y": 5 + }, + { + "x": 74, + "y": 89 + }, + { + "x": 14, + "y": 89 + } + ] + ] + } + ] + } + ] }, { - "name": "Held", - "type": "boolean", - "value": false - } - ], - "effects": [], - "behaviors": [ - { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" + "name": "Beet", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets\\beet.png", + "points": [ + { + "name": "QuantityText", + "x": 53, + "y": 51 + } + ], + "originPoint": { + "name": "origine", + "x": 32, + "y": 32 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 14, + "y": 5 + }, + { + "x": 74, + "y": 5 + }, + { + "x": 74, + "y": 89 + }, + { + "x": 14, + "y": 89 + } + ] + ] + } + ] + } + ] }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "Food", + "name": "Seed_Beet", "useMultipleDirections": false, "directions": [ { @@ -1541,8 +1624,14 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\carrot.png", - "points": [], + "image": "assets\\Seed_beet.png", + "points": [ + { + "name": "QuantityText", + "x": 53, + "y": 51 + } + ], "originPoint": { "name": "origine", "x": 32, @@ -1578,9 +1667,114 @@ ] } ] + } + ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 145, + "emitterForceMax": 75, + "emitterForceMin": 20, + "flow": 450, + "jumpForwardInTimeOnCreation": 0, + "maxParticleNb": 60, + "name": "DirtParticle", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 64, + "particleBlue2": 98, + "particleColor1": "224;139;64", + "particleColor2": "255;174;98", + "particleGravityX": 0, + "particleGravityY": 50, + "particleGreen1": 139, + "particleGreen2": 174, + "particleLifeTimeMax": 0.75, + "particleLifeTimeMin": 0.2, + "particleRed1": 224, + "particleRed2": 255, + "particleSize1": 60, + "particleSize2": 20, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "persistentUuid": "c55de881-727a-4ac3-9beb-e21041dd179a", + "rendererParam1": 1, + "rendererParam2": 1, + "rendererType": "Quad", + "tank": 20, + "textureParticleName": "assets\\DirtParticle.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 8, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Seed_Carrot", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "name": "ResultingObject", + "type": "string", + "value": "Carrot" + }, + { + "name": "CanBePickedUp", + "type": "boolean", + "value": true }, { - "name": "Planted", + "name": "JustPlaced", + "type": "boolean", + "value": false + }, + { + "name": "ItemType", + "type": "string", + "value": "Seed" + }, + { + "name": "PickUp", + "type": "boolean", + "value": false + }, + { + "name": "GrowthTime", + "type": "number", + "value": 10 + }, + { + "name": "Held", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", "useMultipleDirections": false, "directions": [ { @@ -1589,7 +1783,7 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Carrot_Planted.png", + "image": "assets\\Seed_carrot.png", "points": [], "originPoint": { "name": "origine", @@ -1605,20 +1799,20 @@ "customCollisionMask": [ [ { - "x": 14, - "y": 5 + "x": 11, + "y": 11 }, { - "x": 74, - "y": 5 + "x": 52, + "y": 11 }, { - "x": 74, - "y": 89 + "x": 52, + "y": 53 }, { - "x": 14, - "y": 89 + "x": 11, + "y": 53 } ] ] @@ -1630,19 +1824,44 @@ ] }, { - "adaptCollisionMaskAutomatically": false, + "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "Harvest_Seed_Carrot", + "name": "Seed_Beet", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "ResultingObject", "type": "string", - "value": "Seed_Carrot" + "value": "Beet" }, { - "name": "Triggered", + "name": "CanBePickedUp", + "type": "boolean", + "value": true + }, + { + "name": "JustPlaced", + "type": "boolean", + "value": false + }, + { + "name": "ItemType", + "type": "string", + "value": "Seed" + }, + { + "name": "PickUp", + "type": "boolean", + "value": false + }, + { + "name": "GrowthTime", + "type": "number", + "value": 10 + }, + { + "name": "Held", "type": "boolean", "value": false } @@ -1652,6 +1871,10 @@ { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ], "animations": [ @@ -1665,12 +1888,12 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Harvest_Seed_Carrot.png", + "image": "assets\\Seed_beet.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 64 + "y": 32 }, "centerPoint": { "automatic": true, @@ -1681,20 +1904,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 32 + "x": 11, + "y": 13 }, { - "x": 64, - "y": 32 + "x": 50, + "y": 13 }, { - "x": 64, - "y": 96 + "x": 50, + "y": 52 }, { - "x": 0, - "y": 96 + "x": 11, + "y": 52 } ] ] @@ -1708,123 +1931,60 @@ { "adaptCollisionMaskAutomatically": true, "assetStoreId": "", - "name": "InventoryIcons", + "name": "Beet", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "variables": [ { - "name": "Carrot", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "assets\\carrot.png", - "points": [ - { - "name": "QuantityText", - "x": 53, - "y": 51 - } - ], - "originPoint": { - "name": "origine", - "x": 32, - "y": 32 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 14, - "y": 5 - }, - { - "x": 74, - "y": 5 - }, - { - "x": 74, - "y": 89 - }, - { - "x": 14, - "y": 89 - } - ] - ] - } - ] - } - ] + "name": "ResultingObject", + "type": "string", + "value": "" }, { - "name": "Seed_Carrot", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "assets\\Seed_carrot.png", - "points": [ - { - "name": "QuantityText", - "x": 53, - "y": 51 - } - ], - "originPoint": { - "name": "origine", - "x": 32, - "y": 32 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 14, - "y": 5 - }, - { - "x": 74, - "y": 5 - }, - { - "x": 74, - "y": 89 - }, - { - "x": 14, - "y": 89 - } - ] - ] - } - ] - } - ] + "name": "CanBePickedUp", + "type": "boolean", + "value": true + }, + { + "name": "JustPlaced", + "type": "boolean", + "value": false + }, + { + "name": "ItemType", + "type": "string", + "value": "Food" + }, + { + "name": "PickUp", + "type": "boolean", + "value": false + }, + { + "name": "GrowthTime", + "type": "number", + "value": 10 + }, + { + "name": "Held", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" }, { - "name": "Beet", + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "Food", "useMultipleDirections": false, "directions": [ { @@ -1834,13 +1994,7 @@ { "hasCustomCollisionMask": true, "image": "assets\\beet.png", - "points": [ - { - "name": "QuantityText", - "x": 53, - "y": 51 - } - ], + "points": [], "originPoint": { "name": "origine", "x": 32, @@ -1856,19 +2010,19 @@ [ { "x": 14, - "y": 5 + "y": 1 }, { - "x": 74, - "y": 5 + "x": 53, + "y": 1 }, { - "x": 74, - "y": 89 + "x": 53, + "y": 63 }, { "x": 14, - "y": 89 + "y": 63 } ] ] @@ -1878,7 +2032,7 @@ ] }, { - "name": "Seed_Beet", + "name": "Planted", "useMultipleDirections": false, "directions": [ { @@ -1887,14 +2041,8 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Seed_beet.png", - "points": [ - { - "name": "QuantityText", - "x": 53, - "y": 51 - } - ], + "image": "assets\\Beet_Planted.png", + "points": [], "originPoint": { "name": "origine", "x": 32, @@ -1910,19 +2058,19 @@ [ { "x": 14, - "y": 5 + "y": 1 }, { - "x": 74, - "y": 5 + "x": 53, + "y": 1 }, { - "x": 74, - "y": 89 + "x": 53, + "y": 63 }, { "x": 14, - "y": 89 + "y": 63 } ] ] @@ -1934,91 +2082,22 @@ ] }, { - "additive": false, - "assetStoreId": "", - "destroyWhenNoParticles": true, - "emitterAngleA": 0, - "emitterAngleB": 145, - "emitterForceMax": 75, - "emitterForceMin": 20, - "flow": 450, - "jumpForwardInTimeOnCreation": 0, - "maxParticleNb": 60, - "name": "DirtParticle", - "particleAlpha1": 255, - "particleAlpha2": 0, - "particleAlphaRandomness1": 0, - "particleAlphaRandomness2": 0, - "particleAngle1": 0, - "particleAngle2": 0, - "particleAngleRandomness1": 0, - "particleAngleRandomness2": 0, - "particleBlue1": 64, - "particleBlue2": 98, - "particleColor1": "224;139;64", - "particleColor2": "255;174;98", - "particleGravityX": 0, - "particleGravityY": 50, - "particleGreen1": 139, - "particleGreen2": 174, - "particleLifeTimeMax": 0.75, - "particleLifeTimeMin": 0.2, - "particleRed1": 224, - "particleRed2": 255, - "particleSize1": 60, - "particleSize2": 20, - "particleSizeRandomness1": 0, - "particleSizeRandomness2": 0, - "rendererParam1": 1, - "rendererParam2": 1, - "rendererType": "Quad", - "tank": 20, - "textureParticleName": "assets\\DirtParticle.png", - "type": "ParticleSystem::ParticleEmitter", - "zoneRadius": 8, - "variables": [], - "effects": [], - "behaviors": [] - }, - { - "adaptCollisionMaskAutomatically": true, + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "Seed_Carrot", + "name": "Harvest_Seed_Beet", + "persistentUuid": "d03eb5df-c927-4afd-90a5-e70d76e17a97", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "ResultingObject", + "persistentUuid": "70b21d10-9171-4823-8e55-16985a15ab71", "type": "string", - "value": "Carrot" - }, - { - "name": "CanBePickedUp", - "type": "boolean", - "value": true - }, - { - "name": "JustPlaced", - "type": "boolean", - "value": false - }, - { - "name": "ItemType", - "type": "string", - "value": "Seed" - }, - { - "name": "PickUp", - "type": "boolean", - "value": false - }, - { - "name": "GrowthTime", - "type": "number", - "value": 10 + "value": "Seed_Beet" }, { - "name": "Held", + "name": "Triggered", + "persistentUuid": "cd5e395f-df9f-465d-b4f2-fa08fa0401db", "type": "boolean", "value": false } @@ -2028,10 +2107,6 @@ { "name": "ShakeObject_PositionAngle", "type": "ShakeObject::ShakeObject_PositionAngle" - }, - { - "name": "Tween", - "type": "Tween::TweenBehavior" } ], "animations": [ @@ -2045,12 +2120,12 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Seed_carrot.png", + "image": "assets\\Harvest_Seed_Beet.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 32 + "y": 64 }, "centerPoint": { "automatic": true, @@ -2061,20 +2136,20 @@ "customCollisionMask": [ [ { - "x": 11, - "y": 11 + "x": 0, + "y": 32 }, { - "x": 52, - "y": 11 + "x": 64, + "y": 32 }, { - "x": 52, - "y": 53 + "x": 64, + "y": 96 }, { - "x": 11, - "y": 53 + "x": 0, + "y": 96 } ] ] @@ -2086,62 +2161,110 @@ ] }, { - "adaptCollisionMaskAutomatically": true, + "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "Seed_Beet", + "name": "Player", + "persistentUuid": "e3a81bd1-2387-4907-9e81-80a995574e6c", "type": "Sprite", "updateIfNotVisible": false, - "variables": [ - { - "name": "ResultingObject", - "type": "string", - "value": "Beet" - }, - { - "name": "CanBePickedUp", - "type": "boolean", - "value": true - }, - { - "name": "JustPlaced", - "type": "boolean", - "value": false - }, - { - "name": "ItemType", - "type": "string", - "value": "Seed" - }, + "variables": [], + "effects": [], + "behaviors": [ { - "name": "PickUp", - "type": "boolean", - "value": false + "isFolded": true, + "name": "SmoothCamera", + "type": "SmoothCamera::SmoothCamera", + "LeftwardSpeed": 0.9, + "RightwardSpeed": 0.9, + "UpwardSpeed": 0.9, + "DownwardSpeed": 0.9, + "FollowOnX": true, + "FollowOnY": true, + "FollowFreeAreaLeft": 0, + "FollowFreeAreaRight": 0, + "FollowFreeAreaTop": 0, + "FollowFreeAreaBottom": 0, + "CameraOffsetX": 0, + "CameraOffsetY": 0, + "CameraDelay": 0, + "ForecastTime": 0, + "ForecastHistoryDuration": 0, + "LogLeftwardSpeed": 2.0247e-320, + "LogRightwardSpeed": 2.0247e-320, + "LogDownwardSpeed": 2.0247e-320, + "LogUpwardSpeed": 2.0247e-320, + "DelayedCenterX": 2.0247e-320, + "DelayedCenterY": 2.0247e-320, + "ForecastHistoryMeanX": 2.0247e-320, + "ForecastHistoryMeanY": 2.0247e-320, + "ForecastHistoryVarianceX": 2.0247e-320, + "ForecastHistoryCovariance": 2.0247e-320, + "ForecastHistoryLinearA": 2.0247e-320, + "ForecastHistoryLinearB": 2.0247e-320, + "ForecastedX": 2.0247e-320, + "ForecastedY": 2.0247e-320, + "ProjectedNewestX": 2.0247e-320, + "ProjectedNewestY": 2.0247e-320, + "ProjectedOldestX": 2.0247e-320, + "ProjectedOldestY": 2.0247e-320, + "ForecastHistoryVarianceY": 2.0247e-320, + "Index": 2.0247e-320, + "CameraDelayCatchUpSpeed": 0, + "CameraExtraDelay": 2.0247e-320, + "WaitingSpeedXMax": 2.0247e-320, + "WaitingSpeedYMax": 2.0247e-320, + "WaitingEnd": 2.0247e-320, + "CameraDelayCatchUpDuration": 2.0247e-320, + "LeftwardSpeedMax": 9000, + "RightwardSpeedMax": 9000, + "UpwardSpeedMax": 9000, + "DownwardSpeedMax": 9000, + "OldX": 9000.000000007454, + "OldY": 9000.000000007454, + "IsCalledManually": false }, { - "name": "GrowthTime", - "type": "number", - "value": 10 + "isFolded": true, + "name": "TopDownMovement", + "type": "TopDownMovementBehavior::TopDownMovementBehavior", + "acceleration": 2000, + "deceleration": 3000, + "maxSpeed": 200, + "allowDiagonals": false, + "rotateObject": false, + "angularMaxSpeed": 300, + "angleOffset": 0, + "customIsometryAngle": 30, + "ignoreDefaultControls": false, + "movementAngleOffset": 0, + "viewpoint": "TopDown" }, { - "name": "Held", - "type": "boolean", - "value": false - } - ], - "effects": [], - "behaviors": [ - { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" + "isFolded": true, + "name": "TopDownMovementAnimator", + "type": "TopDownMovementAnimator::TopDownMovementAnimator", + "Animation": "Animation", + "TopDownMovement": "TopDownMovement", + "IsScalingAnimation": false, + "IsPausingAnimation": false, + "AnimationName": "Walk", + "DirectionCount": 4, + "AngleOffset": 0, + "AnimationDirection": 0 }, { - "name": "Tween", - "type": "Tween::TweenBehavior" + "isFolded": true, + "name": "TopDownMultitouchMapper", + "type": "SpriteMultitouchJoystick::TopDownMultitouchMapper", + "TopDownMovement": "TopDownMovement", + "ControllerIdentifier": 1, + "JoystickIdentifier": "Primary", + "StickMode": "Analog" } ], "animations": [ { - "name": "", + "name": "Walk0", "useMultipleDirections": false, "directions": [ { @@ -2150,36 +2273,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Seed_beet.png", + "image": "assets\\StartingPlayer_Right.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 32 + "y": 85 }, "centerPoint": { - "automatic": true, + "automatic": false, "name": "centre", - "x": 0, - "y": 0 + "x": 32, + "y": 64 }, "customCollisionMask": [ [ { - "x": 11, - "y": 13 + "x": 12, + "y": 94 }, { - "x": 50, - "y": 13 + "x": 12, + "y": 72 }, { - "x": 50, - "y": 52 + "x": 52, + "y": 72 }, { - "x": 11, - "y": 52 + "x": 52, + "y": 94 } ] ] @@ -2187,66 +2310,9 @@ ] } ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Beet", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [ - { - "name": "ResultingObject", - "type": "string", - "value": "" - }, - { - "name": "CanBePickedUp", - "type": "boolean", - "value": true - }, - { - "name": "JustPlaced", - "type": "boolean", - "value": false - }, - { - "name": "ItemType", - "type": "string", - "value": "Food" - }, - { - "name": "PickUp", - "type": "boolean", - "value": false - }, - { - "name": "GrowthTime", - "type": "number", - "value": 10 - }, - { - "name": "Held", - "type": "boolean", - "value": false - } - ], - "effects": [], - "behaviors": [ - { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" }, { - "name": "Tween", - "type": "Tween::TweenBehavior" - } - ], - "animations": [ - { - "name": "Food", + "name": "Walk1", "useMultipleDirections": false, "directions": [ { @@ -2255,36 +2321,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\beet.png", + "image": "assets\\StartingPlayer_Down.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 32 + "y": 85 }, "centerPoint": { - "automatic": true, + "automatic": false, "name": "centre", - "x": 0, - "y": 0 + "x": 32, + "y": 64 }, "customCollisionMask": [ [ { - "x": 14, - "y": 1 + "x": 12, + "y": 94 }, { - "x": 53, - "y": 1 + "x": 12, + "y": 72 }, { - "x": 53, - "y": 63 + "x": 52, + "y": 72 }, { - "x": 14, - "y": 63 + "x": 52, + "y": 94 } ] ] @@ -2294,7 +2360,7 @@ ] }, { - "name": "Planted", + "name": "Walk2", "useMultipleDirections": false, "directions": [ { @@ -2303,36 +2369,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Beet_Planted.png", + "image": "assets\\StartingPlayer_Left.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 32 + "y": 85 }, "centerPoint": { - "automatic": true, + "automatic": false, "name": "centre", - "x": 0, - "y": 0 + "x": 32, + "y": 64 }, "customCollisionMask": [ [ { - "x": 14, - "y": 1 + "x": 12, + "y": 94 }, { - "x": 53, - "y": 1 + "x": 12, + "y": 72 }, { - "x": 53, - "y": 63 + "x": 52, + "y": 72 }, { - "x": 14, - "y": 63 + "x": 52, + "y": 94 } ] ] @@ -2340,37 +2406,9 @@ ] } ] - } - ] - }, - { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "Harvest_Seed_Beet", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [ - { - "name": "ResultingObject", - "type": "string", - "value": "Seed_Beet" }, { - "name": "Triggered", - "type": "boolean", - "value": false - } - ], - "effects": [], - "behaviors": [ - { - "name": "ShakeObject_PositionAngle", - "type": "ShakeObject::ShakeObject_PositionAngle" - } - ], - "animations": [ - { - "name": "", + "name": "Walk3", "useMultipleDirections": false, "directions": [ { @@ -2379,36 +2417,36 @@ "sprites": [ { "hasCustomCollisionMask": true, - "image": "assets\\Harvest_Seed_Beet.png", + "image": "assets\\StartingPlayer_Up.png", "points": [], "originPoint": { "name": "origine", "x": 32, - "y": 64 + "y": 85 }, "centerPoint": { - "automatic": true, + "automatic": false, "name": "centre", - "x": 0, - "y": 0 + "x": 32, + "y": 64 }, "customCollisionMask": [ [ { - "x": 0, - "y": 32 + "x": 12, + "y": 94 }, { - "x": 64, - "y": 32 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 96 + "x": 52, + "y": 72 }, { - "x": 0, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -2483,6 +2521,7 @@ }, "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2508,6 +2547,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -2544,6 +2584,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -2576,6 +2617,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2632,6 +2674,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2646,6 +2689,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::ForEach", "object": "InventorySlot", "conditions": [], @@ -2688,6 +2732,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2725,6 +2770,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2780,6 +2826,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2815,6 +2862,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2863,6 +2911,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2952,6 +3001,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -2975,6 +3025,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -2987,6 +3038,7 @@ "comment": "Send action trigger again if Ground_SelectionBox position changes while held down" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3037,6 +3089,7 @@ "parameters": [] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3086,6 +3139,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3137,6 +3191,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3153,6 +3208,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3214,6 +3270,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3247,6 +3304,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3274,6 +3332,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3286,6 +3345,7 @@ "comment": "Check if another item is in the way" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3332,6 +3392,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3344,6 +3405,7 @@ "comment": "Final check for obstacles" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3390,6 +3452,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3420,6 +3483,7 @@ "parameters": [] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3478,6 +3542,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3523,6 +3588,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3582,6 +3648,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3599,6 +3666,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3611,6 +3679,7 @@ "comment": "Check for slot with the same object name" }, { + "folded": true, "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "VariableChildCount(Inventory)", "conditions": [ @@ -3628,6 +3697,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3655,6 +3725,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3684,6 +3755,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3711,6 +3783,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3723,6 +3796,7 @@ "comment": "Check if selected slot is empty" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3770,6 +3844,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3782,6 +3857,7 @@ "comment": "Check for available empty slot" }, { + "folded": true, "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "VariableChildCount(Inventory)", "conditions": [ @@ -3799,6 +3875,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3826,6 +3903,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3855,6 +3933,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -3867,6 +3946,7 @@ "comment": "Add item if slot is found" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3923,6 +4003,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -3967,6 +4048,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -3994,6 +4076,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4012,6 +4095,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4029,6 +4113,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -4041,6 +4126,7 @@ "comment": "Place item" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4089,6 +4175,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4118,6 +4205,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -4130,6 +4218,7 @@ "comment": "Plant seed" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4259,6 +4348,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4360,6 +4450,7 @@ "type": "BuiltinCommonInstructions::Group", "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4414,6 +4505,7 @@ ], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -4426,6 +4518,7 @@ "comment": "Create inventory icon and text" }, { + "folded": true, "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "VariableChildCount(Inventory)", "conditions": [ @@ -4444,6 +4537,7 @@ "actions": [], "events": [ { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4507,6 +4601,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ @@ -4525,6 +4620,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4555,6 +4651,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Comment", "color": { "b": 109, @@ -4567,6 +4664,7 @@ "comment": "Delete/Create held item" }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4594,6 +4692,7 @@ ] }, { + "folded": true, "type": "BuiltinCommonInstructions::Standard", "conditions": [ { @@ -4731,6 +4830,10 @@ "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -4763,6 +4866,10 @@ "name": "Text", "type": "TextContainerCapability::TextContainerBehavior" }, + { + "name": "TileMap", + "type": "TileMap::TileMapBehavior" + }, { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -4787,9 +4894,9 @@ "externalEvents": [], "tests": [ { + "description": "The arrow keys walk the player as far as its behavior is configured to, and the selection box is put ahead of it.", "name": "Walking and facing", "type": "gameplay", - "description": "The arrow keys walk the player as far as its behavior is configured to, and the selection box is put ahead of it.", "source": [ "// The character walks with the arrow keys, and what it faces decides where", "// the selection box — everything this game does happens there — is put.", @@ -4868,9 +4975,9 @@ ] }, { + "description": "The player walks to a seed patch and acts on it: a carrot seed goes into the inventory. Pointing alone does nothing.", "name": "Harvesting a seed patch fills the inventory", "type": "gameplay", - "description": "The player walks to a seed patch and acts on it: a carrot seed goes into the inventory. Pointing alone does nothing.", "source": [ "// The core loop: walk to something harvestable, act on it, and what comes", "// out ends up in the inventory.", diff --git a/examples/starting-top-down-pixel/assets/Flat dark joystick border.png b/examples/starting-top-down-pixel/assets/Flat dark joystick border.png index 606bf85b2..b4e83e112 100644 Binary files a/examples/starting-top-down-pixel/assets/Flat dark joystick border.png and b/examples/starting-top-down-pixel/assets/Flat dark joystick border.png differ diff --git a/examples/starting-top-down-pixel/assets/Flat dark joystick thumb.png b/examples/starting-top-down-pixel/assets/Flat dark joystick thumb.png index acd005cc0..8acf179f8 100644 Binary files a/examples/starting-top-down-pixel/assets/Flat dark joystick thumb.png and b/examples/starting-top-down-pixel/assets/Flat dark joystick thumb.png differ diff --git a/examples/starting-top-down-pixel/assets/StartingPixelGroundTilemap.png b/examples/starting-top-down-pixel/assets/StartingPixelGroundTilemap.png index c8df79022..8f14e1a30 100644 Binary files a/examples/starting-top-down-pixel/assets/StartingPixelGroundTilemap.png and b/examples/starting-top-down-pixel/assets/StartingPixelGroundTilemap.png differ diff --git a/examples/starting-top-down-pixel/assets/StartingPixelObstacle.png b/examples/starting-top-down-pixel/assets/StartingPixelObstacle.png index f24239c79..4ab67cfac 100644 Binary files a/examples/starting-top-down-pixel/assets/StartingPixelObstacle.png and b/examples/starting-top-down-pixel/assets/StartingPixelObstacle.png differ diff --git a/examples/starting-top-down-pixel/assets/StartingPixelPlayer.png b/examples/starting-top-down-pixel/assets/StartingPixelPlayer.png index 92b76c0b8..72c9eefa5 100644 Binary files a/examples/starting-top-down-pixel/assets/StartingPixelPlayer.png and b/examples/starting-top-down-pixel/assets/StartingPixelPlayer.png differ diff --git a/examples/starting-top-down-pixel/assets/StartingPixelWall.png b/examples/starting-top-down-pixel/assets/StartingPixelWall.png index 9ed3a407a..aff9da991 100644 Binary files a/examples/starting-top-down-pixel/assets/StartingPixelWall.png and b/examples/starting-top-down-pixel/assets/StartingPixelWall.png differ diff --git a/examples/starting-top-down-pixel/starting-top-down-pixel.json b/examples/starting-top-down-pixel/starting-top-down-pixel.json index 5ce6f2f85..1f45a85de 100644 --- a/examples/starting-top-down-pixel/starting-top-down-pixel.json +++ b/examples/starting-top-down-pixel/starting-top-down-pixel.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -128,7 +128,7 @@ "kind": "image", "metadata": "", "name": "assets\\StartingPixelGroundTilemap.png", - "smoothed": true, + "smoothed": false, "userAdded": false }, { @@ -178,7 +178,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 1.1343715797161023, + "zoomFactor": 0.8141881203709974, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -911,6 +911,10 @@ "name": "SmoothCamera", "type": "SmoothCamera::SmoothCamera" }, + { + "name": "TileMap", + "type": "TileMap::TileMapBehavior" + }, { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -925,9 +929,9 @@ "externalEvents": [], "tests": [ { + "description": "The arrow keys move the player up, down, left and right, and turn it toward the direction it is moving to.", "name": "Moving in the four directions", "type": "gameplay", - "description": "The arrow keys move the player up, down, left and right, and turn it toward the direction it is moving to.", "source": [ "// The core of the game: the Top-Down Movement behavior moves the player in", "// the four directions with the arrow keys. How far it should travel is", @@ -1029,9 +1033,9 @@ ] }, { + "description": "The player walks into a wall and is stopped by it instead of going through.", "name": "Walls block the player", "type": "gameplay", - "description": "The player walks into a wall and is stopped by it instead of going through.", "source": [ "// The player must not go through the obstacles: the events separate it from", "// the walls and the plants on every frame.", diff --git a/examples/starting-top-down-rpg/assets/A button.png b/examples/starting-top-down-rpg/assets/A button.png index 23ac10d53..644bce1a3 100644 Binary files a/examples/starting-top-down-rpg/assets/A button.png and b/examples/starting-top-down-rpg/assets/A button.png differ diff --git a/examples/starting-top-down-rpg/assets/Border.png b/examples/starting-top-down-rpg/assets/Border.png index 043ea4c9a..fc209e345 100644 Binary files a/examples/starting-top-down-rpg/assets/Border.png and b/examples/starting-top-down-rpg/assets/Border.png differ diff --git a/examples/starting-top-down-rpg/assets/Border2.png b/examples/starting-top-down-rpg/assets/Border2.png index d5ee02253..5d5ab796a 100644 Binary files a/examples/starting-top-down-rpg/assets/Border2.png and b/examples/starting-top-down-rpg/assets/Border2.png differ diff --git a/examples/starting-top-down-rpg/assets/DirtParticle.png b/examples/starting-top-down-rpg/assets/DirtParticle.png new file mode 100644 index 000000000..07db099a3 Binary files /dev/null and b/examples/starting-top-down-rpg/assets/DirtParticle.png differ diff --git a/examples/starting-top-down-rpg/assets/Flat dark joystick border.png b/examples/starting-top-down-rpg/assets/Flat dark joystick border.png index 606bf85b2..b4e83e112 100644 Binary files a/examples/starting-top-down-rpg/assets/Flat dark joystick border.png and b/examples/starting-top-down-rpg/assets/Flat dark joystick border.png differ diff --git a/examples/starting-top-down-rpg/assets/Flat dark joystick thumb.png b/examples/starting-top-down-rpg/assets/Flat dark joystick thumb.png index acd005cc0..8acf179f8 100644 Binary files a/examples/starting-top-down-rpg/assets/Flat dark joystick thumb.png and b/examples/starting-top-down-rpg/assets/Flat dark joystick thumb.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingGroundTilemap.png b/examples/starting-top-down-rpg/assets/StartingGroundTilemap.png index 74f0bd521..d25eafc90 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingGroundTilemap.png and b/examples/starting-top-down-rpg/assets/StartingGroundTilemap.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingNPC.png b/examples/starting-top-down-rpg/assets/StartingNPC.png index 112b2c161..9e44b6e09 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingNPC.png and b/examples/starting-top-down-rpg/assets/StartingNPC.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingPlayer_Down.png b/examples/starting-top-down-rpg/assets/StartingPlayer_Down.png index a8dc0b4ad..a267c7ebb 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingPlayer_Down.png and b/examples/starting-top-down-rpg/assets/StartingPlayer_Down.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingPlayer_Left.png b/examples/starting-top-down-rpg/assets/StartingPlayer_Left.png index f23250710..c0659c1fc 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingPlayer_Left.png and b/examples/starting-top-down-rpg/assets/StartingPlayer_Left.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingPlayer_Right.png b/examples/starting-top-down-rpg/assets/StartingPlayer_Right.png index 5e1b2ee32..17810fc15 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingPlayer_Right.png and b/examples/starting-top-down-rpg/assets/StartingPlayer_Right.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingPlayer_Up.png b/examples/starting-top-down-rpg/assets/StartingPlayer_Up.png index 6faa144c1..cc31659b9 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingPlayer_Up.png and b/examples/starting-top-down-rpg/assets/StartingPlayer_Up.png differ diff --git a/examples/starting-top-down-rpg/assets/StartingWall.png b/examples/starting-top-down-rpg/assets/StartingWall.png index f86317a80..69b0063ed 100644 Binary files a/examples/starting-top-down-rpg/assets/StartingWall.png and b/examples/starting-top-down-rpg/assets/StartingWall.png differ diff --git a/examples/starting-top-down-rpg/assets/starter_pop.wav b/examples/starting-top-down-rpg/assets/starter_pop.wav new file mode 100644 index 000000000..5bc547262 Binary files /dev/null and b/examples/starting-top-down-rpg/assets/starter_pop.wav differ diff --git a/examples/starting-top-down-rpg/assets/starting_bookopen.wav b/examples/starting-top-down-rpg/assets/starting_bookopen.wav new file mode 100644 index 000000000..a63e2783f Binary files /dev/null and b/examples/starting-top-down-rpg/assets/starting_bookopen.wav differ diff --git a/examples/starting-top-down-rpg/starting-top-down-rpg.json b/examples/starting-top-down-rpg/starting-top-down-rpg.json index c9b516181..bb1e31c40 100644 --- a/examples/starting-top-down-rpg/starting-top-down-rpg.json +++ b/examples/starting-top-down-rpg/starting-top-down-rpg.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -209,6 +209,34 @@ "metadata": "", "name": "assets\\8BitOperatorPlus8Regular_Edited.fnt", "userAdded": false + }, + { + "file": "assets/starting_bookopen.wav", + "kind": "audio", + "metadata": "", + "name": "assets/starting_bookopen.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false + }, + { + "file": "assets/starter_pop.wav", + "kind": "audio", + "metadata": "", + "name": "assets/starter_pop.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false + }, + { + "file": "assets/DirtParticle.png", + "kind": "image", + "metadata": "", + "name": "assets/DirtParticle.png", + "smoothed": true, + "userAdded": false } ] }, @@ -241,7 +269,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.4950840073748919, + "zoomFactor": 0.6244537826600028, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -450,7 +478,7 @@ "persistentUuid": "288736cd-a508-49e7-a166-35cf826505bb", "width": 0, "x": 288, - "y": 400, + "y": 405, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -466,7 +494,7 @@ "persistentUuid": "b8633317-3fcb-4df8-bb19-79a05fa379ed", "width": 0, "x": 992, - "y": 80, + "y": 85, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -514,6 +542,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", + "persistentUuid": "733a7f1e-db25-4386-b421-bd257d29d86c", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -627,7 +656,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 84 }, "centerPoint": { "automatic": true, @@ -638,20 +667,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -675,7 +704,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 84 }, "centerPoint": { "automatic": true, @@ -686,20 +715,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -723,7 +752,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 84 }, "centerPoint": { "automatic": true, @@ -734,20 +763,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -771,7 +800,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 84 }, "centerPoint": { "automatic": true, @@ -782,20 +811,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -967,6 +996,7 @@ "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "NPC", + "persistentUuid": "6e777d90-2bed-45af-ac8f-55747f0310c6", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -988,7 +1018,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 85 }, "centerPoint": { "automatic": true, @@ -1026,6 +1056,7 @@ { "assetStoreId": "9d5de415b6e469c681701ea42d3b1c486fee31d6ef591a2d3e226f639ab486ff", "name": "TwoChoicesDialogBox", + "persistentUuid": "75504e76-c410-4b30-9d80-b5eb386e58dc", "type": "TwoChoicesDialogBoxes::TwoChoicesDialogBox", "variant": "DialogBox", "variables": [], @@ -1039,6 +1070,7 @@ "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "ActionButton", + "persistentUuid": "892c2132-6b03-43fa-94bc-07cf6e0ae610", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1053,6 +1085,25 @@ "TouchIsInside": false, "MouseIsInside": false, "Index": 2.0247e-320 + }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween", + "Scale": "Scale", + "ButtonFSM": "ButtonFSM", + "Tween": "Tween", + "IdleScale": 1.5, + "FocusedScale": 1.4, + "FadeInDuration": 0.02, + "FadeOutDuration": 0.05, + "PressedScale": 1.3, + "FadeInEasing": "easeOutQuad", + "FadeOutEasing": "easeInQuad", + "PreviousState": "Idle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ], "animations": [ @@ -1105,6 +1156,54 @@ ] } ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 120, + "emitterForceMin": 75, + "flow": 800, + "jumpForwardInTimeOnCreation": 0.2, + "maxParticleNb": 300, + "name": "DebrisParticle", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 238, + "particleBlue2": 255, + "particleColor1": "238;238;238", + "particleColor2": "255;255;255", + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 238, + "particleGreen2": 255, + "particleLifeTimeMax": 0.5, + "particleLifeTimeMin": 0.4, + "particleRed1": 238, + "particleRed2": 255, + "particleSize1": 100, + "particleSize2": 75, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "persistentUuid": "2468cafb-59c3-4a19-973c-55d52a183a0d", + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tank": 25, + "textureParticleName": "assets/DirtParticle.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] } ], "objectsFolderStructure": { @@ -1125,6 +1224,9 @@ { "objectName": "TwoChoicesDialogBox" }, + { + "objectName": "DebrisParticle" + }, { "folderName": "Mobile Controls", "children": [ @@ -1287,6 +1389,18 @@ "", "\"Dialog Layer\"" ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starting_bookopen.wav", + "", + "80", + "1.1" + ] } ] } @@ -1332,6 +1446,40 @@ } ], "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "DebrisParticle", + "NPC.X()", + "NPC.Y()", + "" + ] + }, + { + "type": { + "value": "SetZOrder" + }, + "parameters": [ + "DebrisParticle", + "=", + "NPC.ZOrder()-1" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starter_pop.wav", + "", + "80", + "RandomFloatInRange(0.7,0.9)" + ] + }, { "type": { "value": "Delete" @@ -1392,6 +1540,18 @@ "", "\"Dialog Layer\"" ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starting_bookopen.wav", + "", + "80", + "0.8" + ] } ] } @@ -1474,6 +1634,10 @@ "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -1502,6 +1666,10 @@ "name": "Text", "type": "TextContainerCapability::TextContainerBehavior" }, + { + "name": "TileMap", + "type": "TileMap::TileMapBehavior" + }, { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -1515,6 +1683,10 @@ { "name": "TopDownMultitouchMapper", "type": "SpriteMultitouchJoystick::TopDownMultitouchMapper" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ] } @@ -1522,9 +1694,9 @@ "externalEvents": [], "tests": [ { + "description": "Pressing the action key next to an NPC opens the dialog and takes control away from the player, and does nothing away from an NPC.", "name": "Talking to an NPC", "type": "gameplay", - "description": "Pressing the action key next to an NPC opens the dialog and takes control away from the player, and does nothing away from an NPC.", "source": [ "// Talking to an NPC opens the dialog and takes control away from the player.", "await harness.goToScene('Game Scene');", @@ -1609,9 +1781,9 @@ ] }, { + "description": "Clicking yes in the dialog makes the NPC that was talked to leave.", "name": "Saying yes in the dialog", "type": "gameplay", - "description": "Clicking yes in the dialog makes the NPC that was talked to leave.", "source": [ "// Saying yes in the dialog makes the NPC leave.", "await harness.goToScene('Game Scene');", @@ -20745,20 +20917,22 @@ }, { "assetStoreId": "", - "bottomMargin": 11, + "bottomMargin": 18, "height": 106, - "leftMargin": 11, + "leftMargin": 18, "name": "Idle", - "rightMargin": 11, + "persistentUuid": "81e9bdc6-af5f-4291-beea-40d419411a86", + "rightMargin": 18, "texture": "assets\\Border.png", "tiled": false, - "topMargin": 11, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [ { "folded": true, "name": "State", + "persistentUuid": "e9030462-f47f-47c9-b987-43fd97bc6128", "type": "string", "value": "Idle" } @@ -20784,14 +20958,15 @@ }, { "assetStoreId": "", - "bottomMargin": 8, + "bottomMargin": 18, "height": 106, - "leftMargin": 8, + "leftMargin": 18, "name": "Hovered", - "rightMargin": 8, + "persistentUuid": "ecb8af94-5605-40c3-9e08-5ccc93d4757e", + "rightMargin": 18, "texture": "assets\\Border2.png", "tiled": false, - "topMargin": 8, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [], @@ -20815,14 +20990,15 @@ }, { "assetStoreId": "", - "bottomMargin": 8, + "bottomMargin": 18, "height": 106, - "leftMargin": 8, + "leftMargin": 18, "name": "Pressed", - "rightMargin": 8, + "persistentUuid": "6a012a1b-910e-41b0-9704-6f961e28283e", + "rightMargin": 18, "texture": "assets\\Border2.png", "tiled": false, - "topMargin": 8, + "topMargin": 18, "type": "PanelSpriteObject::PanelSprite", "width": 256, "variables": [], @@ -20993,7 +21169,23 @@ "initialVariables": [] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 2.734375, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } }, { "areaMaxX": 256, @@ -22825,6 +23017,7 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "NoButton", + "persistentUuid": "b543ac7c-cec0-4c88-901e-d8fbe32a064d", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "OptionButton", "variables": [ @@ -22865,11 +23058,13 @@ { "assetStoreId": "90d94b6e3a23c34948e59eaaef4679740f8ab588696d59b21e0c0c2ef106b94d", "name": "YesButton", + "persistentUuid": "2b077122-9141-4a9c-95de-cebaa5bb08d0", "type": "PanelSpriteButton::PanelSpriteButton", "variant": "OptionButton", "variables": [ { "name": "ID", + "persistentUuid": "0bed4eb2-8776-440a-bcb8-2c0f477c58ea", "type": "number", "value": 0 } @@ -22908,6 +23103,7 @@ "height": 48, "leftMargin": 16, "name": "TextBorder", + "persistentUuid": "1e0e522f-a05d-49a2-83eb-4905ebb0daf1", "rightMargin": 16, "texture": "assets\\Border.png", "tiled": true, @@ -23059,13 +23255,13 @@ "angle": 0, "customSize": true, "depth": 32, - "height": 36, + "height": 42, "layer": "", "name": "YesButton", "persistentUuid": "a0ca78d3-0a23-4bbe-89de-fb2d0a53996c", "width": 105, "x": 350, - "y": 160, + "y": 155, "zOrder": 510, "numberProperties": [], "stringProperties": [], @@ -23075,13 +23271,13 @@ "angle": 0, "customSize": true, "depth": 32, - "height": 36, + "height": 42, "layer": "", "name": "NoButton", "persistentUuid": "6781aafa-3ae9-4820-bb97-682a524a0cf6", "width": 103, "x": 471, - "y": 160, + "y": 155, "zOrder": 510, "numberProperties": [], "stringProperties": [], @@ -23095,7 +23291,23 @@ ] } ], - "editionSettings": {} + "editionSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridDepth": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridOffsetZ": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1.3770892167064483, + "windowMask": false, + "selectedLayer": "", + "gameEditorMode": "instances-editor" + } }, { "areaMaxX": 600, diff --git a/examples/starting-top-down-survival-crafting/assets/A button.png b/examples/starting-top-down-survival-crafting/assets/A button.png index 23ac10d53..644bce1a3 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/A button.png and b/examples/starting-top-down-survival-crafting/assets/A button.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/Boulder.png b/examples/starting-top-down-survival-crafting/assets/Boulder.png index c081e7ab3..8b99f9232 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/Boulder.png and b/examples/starting-top-down-survival-crafting/assets/Boulder.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/Flat dark joystick border.png b/examples/starting-top-down-survival-crafting/assets/Flat dark joystick border.png index 606bf85b2..b4e83e112 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/Flat dark joystick border.png and b/examples/starting-top-down-survival-crafting/assets/Flat dark joystick border.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/Flat dark joystick thumb.png b/examples/starting-top-down-survival-crafting/assets/Flat dark joystick thumb.png index acd005cc0..8acf179f8 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/Flat dark joystick thumb.png and b/examples/starting-top-down-survival-crafting/assets/Flat dark joystick thumb.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/Rock.png b/examples/starting-top-down-survival-crafting/assets/Rock.png index ccb66abc4..c351d4dda 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/Rock.png and b/examples/starting-top-down-survival-crafting/assets/Rock.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingGroundTilemap.png b/examples/starting-top-down-survival-crafting/assets/StartingGroundTilemap.png index f9948f28f..d25eafc90 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingGroundTilemap.png and b/examples/starting-top-down-survival-crafting/assets/StartingGroundTilemap.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingInventorySlot.png b/examples/starting-top-down-survival-crafting/assets/StartingInventorySlot.png index 8d845d339..f93f37cf0 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingInventorySlot.png and b/examples/starting-top-down-survival-crafting/assets/StartingInventorySlot.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Down.png b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Down.png index a8dc0b4ad..a267c7ebb 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Down.png and b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Down.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Left.png b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Left.png index f23250710..c0659c1fc 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Left.png and b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Left.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Right.png b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Right.png index 5e1b2ee32..17810fc15 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Right.png and b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Right.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Up.png b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Up.png index 6faa144c1..cc31659b9 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Up.png and b/examples/starting-top-down-survival-crafting/assets/StartingPlayer_Up.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/StartingWall.png b/examples/starting-top-down-survival-crafting/assets/StartingWall.png index f86317a80..69b0063ed 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/StartingWall.png and b/examples/starting-top-down-survival-crafting/assets/StartingWall.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/Tree.png b/examples/starting-top-down-survival-crafting/assets/Tree.png index f09fd325f..a692eb000 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/Tree.png and b/examples/starting-top-down-survival-crafting/assets/Tree.png differ diff --git a/examples/starting-top-down-survival-crafting/assets/log.png b/examples/starting-top-down-survival-crafting/assets/log.png index 29a5ea2d2..f62f944b3 100644 Binary files a/examples/starting-top-down-survival-crafting/assets/log.png and b/examples/starting-top-down-survival-crafting/assets/log.png differ diff --git a/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json b/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json index 23b1e8607..211ae86cc 100644 --- a/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json +++ b/examples/starting-top-down-survival-crafting/starting-top-down-survival-crafting.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 272, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -275,7 +275,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.44819780454104163, + "zoomFactor": 0.604083874998895, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -714,6 +714,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "TopDown_Character", + "persistentUuid": "e8717dfe-9729-4dfe-b047-12dd548edb42", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -827,7 +828,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 85 }, "centerPoint": { "automatic": false, @@ -838,20 +839,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -875,7 +876,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 85 }, "centerPoint": { "automatic": false, @@ -886,20 +887,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -923,7 +924,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 85 }, "centerPoint": { "automatic": false, @@ -934,20 +935,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -971,7 +972,7 @@ "originPoint": { "name": "origine", "x": 32, - "y": 80 + "y": 85 }, "centerPoint": { "automatic": false, @@ -982,20 +983,20 @@ "customCollisionMask": [ [ { - "x": 0, - "y": 80 + "x": 12, + "y": 94 }, { - "x": 32, - "y": 64 + "x": 12, + "y": 72 }, { - "x": 64, - "y": 80 + "x": 52, + "y": 72 }, { - "x": 32, - "y": 96 + "x": 52, + "y": 94 } ] ] @@ -1009,6 +1010,7 @@ { "assetStoreId": "", "name": "Ground_Tilemap", + "persistentUuid": "d03a0a04-b2e6-4ca5-bc2b-3c5d4e7235c7", "type": "TileMap::SimpleTileMap", "variables": [], "effects": [], @@ -1107,6 +1109,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Building_Obstacle", + "persistentUuid": "63b30380-3a9a-4289-b50c-08fe8e37b2ed", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1167,6 +1170,7 @@ "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "ActionButton", + "persistentUuid": "f28a25c4-2d97-4cdf-b0e2-40fa2cb1c4bb", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1181,6 +1185,25 @@ "TouchIsInside": false, "MouseIsInside": false, "Index": 2.0247e-320 + }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween", + "Scale": "Scale", + "ButtonFSM": "ButtonFSM", + "Tween": "Tween", + "IdleScale": 1.5, + "FocusedScale": 1.4, + "FadeInDuration": 0.02, + "FadeOutDuration": 0.05, + "PressedScale": 1.3, + "FadeInEasing": "easeOutQuad", + "FadeOutEasing": "easeInQuad", + "PreviousState": "Idle" + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" } ], "animations": [ @@ -1746,16 +1769,19 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Harvest_Boulder", + "persistentUuid": "b6fa0d8b-1512-44e0-a713-23fa680c25bb", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "ResultingObject", + "persistentUuid": "f5146443-9bb0-41b8-8caa-988b0ddd90fe", "type": "string", "value": "Rock" }, { "name": "Triggered", + "persistentUuid": "3ab08520-3cec-4ad2-a540-7e5d0a218a4c", "type": "boolean", "value": false } @@ -1822,16 +1848,19 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Harvest_Tree", + "persistentUuid": "cb02f0cb-08a7-4f17-abe3-58698d0a32da", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "ResultingObject", + "persistentUuid": "7a9d9d14-19a8-41b0-a6e6-f0c25f9a7087", "type": "string", "value": "Log" }, { "name": "Triggered", + "persistentUuid": "e075b4c4-981f-41e5-9816-fed8ab04a4ec", "type": "boolean", "value": false } @@ -3973,6 +4002,10 @@ "name": "ButtonFSM", "type": "ButtonStates::ButtonFSM" }, + { + "name": "ButtonScaleTween", + "type": "ButtonStates::ButtonScaleTween" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" @@ -4005,6 +4038,10 @@ "name": "Text", "type": "TextContainerCapability::TextContainerBehavior" }, + { + "name": "TileMap", + "type": "TileMap::TileMapBehavior" + }, { "name": "TopDownMovement", "type": "TopDownMovementBehavior::TopDownMovementBehavior" @@ -4029,9 +4066,9 @@ "externalEvents": [], "tests": [ { + "description": "The arrow keys walk the character as far as its behavior is configured to, and the selection box is put ahead of it.", "name": "Walking and facing", "type": "gameplay", - "description": "The arrow keys walk the character as far as its behavior is configured to, and the selection box is put ahead of it.", "source": [ "// The character walks with the arrow keys, and what it faces decides where", "// the selection box — everything this game does happens there — is put.", @@ -4110,9 +4147,9 @@ ] }, { + "description": "Pointing at a tree and acting on it puts a log in the inventory; pointing alone does nothing.", "name": "Harvesting a tree fills the inventory", "type": "gameplay", - "description": "Pointing at a tree and acting on it puts a log in the inventory; pointing alone does nothing.", "source": [ "// The core loop: point at something harvestable, act on it, and what comes", "// out ends up in the inventory.", diff --git a/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json b/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json index 35fd43230..86bea99c0 100644 --- a/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json +++ b/examples/starting-twin-stick-shooter/starting-twin-stick-shooter.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -206,7 +206,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5653158055126329, + "zoomFactor": 0.7876290101673784, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -1544,9 +1544,9 @@ "externalEvents": [], "tests": [ { + "description": "The player turns toward the mouse and fires while the button is held, and the bullets fly where it aims.", "name": "Aiming and firing with the mouse", "type": "gameplay", - "description": "The player turns toward the mouse and fires while the button is held, and the bullets fly where it aims.", "source": [ "// The twin stick part: the player aims where the mouse points and fires", "// while the button is held.", @@ -1607,9 +1607,9 @@ ] }, { + "description": "An enemy in front of the player loses health with each bullet and is destroyed once it runs out.", "name": "Enemies take several hits to be destroyed", "type": "gameplay", - "description": "An enemy in front of the player loses health with each bullet and is destroyed once it runs out.", "source": [ "// Enemies take several hits before being destroyed.", "await harness.goToScene('Game Scene');", diff --git a/examples/starting-vampire-survivor/assets/Collision.wav b/examples/starting-vampire-survivor/assets/Collision.wav new file mode 100644 index 000000000..5b89dda98 Binary files /dev/null and b/examples/starting-vampire-survivor/assets/Collision.wav differ diff --git a/examples/starting-vampire-survivor/assets/DirtParticle.png b/examples/starting-vampire-survivor/assets/DirtParticle.png new file mode 100644 index 000000000..07db099a3 Binary files /dev/null and b/examples/starting-vampire-survivor/assets/DirtParticle.png differ diff --git a/examples/starting-vampire-survivor/assets/StartingEnemies.png b/examples/starting-vampire-survivor/assets/StartingEnemies.png index 11cf2a9d0..2a3dbf69e 100644 Binary files a/examples/starting-vampire-survivor/assets/StartingEnemies.png and b/examples/starting-vampire-survivor/assets/StartingEnemies.png differ diff --git a/examples/starting-vampire-survivor/assets/starting_bulletfire.wav b/examples/starting-vampire-survivor/assets/starting_bulletfire.wav new file mode 100644 index 000000000..f7045dd18 Binary files /dev/null and b/examples/starting-vampire-survivor/assets/starting_bulletfire.wav differ diff --git a/examples/starting-vampire-survivor/starting-vampire-survivor.json b/examples/starting-vampire-survivor/starting-vampire-survivor.json index 314f6dfd6..705f1c475 100644 --- a/examples/starting-vampire-survivor/starting-vampire-survivor.json +++ b/examples/starting-vampire-survivor/starting-vampire-survivor.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 274, + "build": 279, "major": 5, "minor": 6, "revision": 0 @@ -146,6 +146,34 @@ "name": "assets\\StartingBullet.png", "smoothed": true, "userAdded": false + }, + { + "file": "assets/DirtParticle.png", + "kind": "image", + "metadata": "", + "name": "assets/DirtParticle.png", + "smoothed": true, + "userAdded": false + }, + { + "file": "assets/Collision.wav", + "kind": "audio", + "metadata": "", + "name": "assets/Collision.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false + }, + { + "file": "assets/starting_bulletfire.wav", + "kind": "audio", + "metadata": "", + "name": "assets/starting_bulletfire.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": false } ] }, @@ -178,7 +206,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.5843784410740951, + "zoomFactor": 0.7876290101673784, "windowMask": false, "selectedLayer": "", "gameEditorMode": "instances-editor" @@ -243,6 +271,7 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player", + "persistentUuid": "9fd75508-73a1-48b7-8ec2-17408016c6bf", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -278,6 +307,10 @@ "BulletLayer": "", "RandomizedAngle": 0 }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, { "name": "SmoothCamera", "type": "SmoothCamera::SmoothCamera", @@ -505,17 +538,24 @@ "adaptCollisionMaskAutomatically": true, "assetStoreId": "", "name": "Enemy", + "persistentUuid": "1ee752a8-7d58-4f88-94c7-1a70ddedfd3b", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { "name": "Health", + "persistentUuid": "fe615734-36c0-4b8c-9559-cec3438a8391", "type": "number", "value": 3 } ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], "animations": [ { "name": "", @@ -633,6 +673,102 @@ ] } ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 100, + "emitterForceMin": 50, + "flow": 800, + "jumpForwardInTimeOnCreation": 0.15, + "maxParticleNb": 300, + "name": "DebrisParticle", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 238, + "particleBlue2": 255, + "particleColor1": "238;238;238", + "particleColor2": "255;255;255", + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 238, + "particleGreen2": 255, + "particleLifeTimeMax": 0.45, + "particleLifeTimeMin": 0.3, + "particleRed1": 238, + "particleRed2": 255, + "particleSize1": 50, + "particleSize2": 50, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "persistentUuid": "4a0e26b1-0c66-4402-8c70-1e4dcd7a4dfa", + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tank": 20, + "textureParticleName": "assets/DirtParticle.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 150, + "emitterForceMin": 80, + "flow": 800, + "jumpForwardInTimeOnCreation": 0.15, + "maxParticleNb": 300, + "name": "LargeDebrisParticle", + "particleAlpha1": 255, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 238, + "particleBlue2": 255, + "particleColor1": "238;238;238", + "particleColor2": "255;255;255", + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 238, + "particleGreen2": 255, + "particleLifeTimeMax": 0.45, + "particleLifeTimeMin": 0.3, + "particleRed1": 238, + "particleRed2": 255, + "particleSize1": 100, + "particleSize2": 100, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "persistentUuid": "62d777d9-9e88-4795-9326-e9ece028652e", + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tank": 20, + "textureParticleName": "assets/DirtParticle.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 3, + "variables": [], + "effects": [], + "behaviors": [] } ], "objectsFolderStructure": { @@ -647,6 +783,12 @@ { "objectName": "PlayerBullet" }, + { + "objectName": "DebrisParticle" + }, + { + "objectName": "LargeDebrisParticle" + }, { "objectName": "RepeatingBackground" }, @@ -836,6 +978,35 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "FireBullet::FireBullet::HasJustFired" + }, + "parameters": [ + "Player", + "FireBullet", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/starting_bulletfire.wav", + "", + "20", + "RandomWithStep(0.9,1.2,0.05)" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -853,6 +1024,46 @@ } ], "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "DebrisParticle", + "PlayerBullet.CenterX()", + "PlayerBullet.CenterY()", + "" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/Collision.wav", + "", + "30", + "RandomWithStep(0.9,1.1,0.05)" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Enemy", + "ShakeObject_PositionAngle", + "0.2", + "RandomWithStep(-5,5,10)", + "RandomWithStep(-5,5,10)", + "RandomWithStep(-5,5,10)", + "0.05", + "", + "" + ] + }, { "type": { "value": "SetNumberObjectVariable" @@ -903,6 +1114,18 @@ } ], "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "LargeDebrisParticle", + "Enemy.CenterX()", + "Enemy.CenterY()", + "" + ] + }, { "type": { "value": "Delete" @@ -928,9 +1151,82 @@ "", "" ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] } ], "actions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Player", + "ShakeObject_PositionAngle", + "0.2", + "RandomWithStep(-5,5,10)", + "RandomWithStep(-5,5,10)", + "RandomWithStep(-5,5,10)", + "0.05", + "", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "LargeDebrisParticle", + "Player.CenterX()", + "Player.CenterY()", + "" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "assets/Collision.wav", + "", + "90", + "RandomFloatInRange(0.7,0.9)" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Player", + "TopDownMovement", + "" + ] + }, + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "0.15" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "0.15" + ] + }, { "type": { "value": "Scene" @@ -1040,6 +1336,10 @@ "name": "Scale", "type": "ScalableCapability::ScalableBehavior" }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, { "name": "SmoothCamera", "type": "SmoothCamera::SmoothCamera" @@ -1058,9 +1358,9 @@ "externalEvents": [], "tests": [ { + "description": "With an enemy in range, the player fires at it without any input, and the enemy is destroyed after several hits.", "name": "The player shoots the nearest enemy on its own", "type": "gameplay", - "description": "With an enemy in range, the player fires at it without any input, and the enemy is destroyed after several hits.", "source": [ "// The core of the game: the player shoots the nearest enemy on its own, the", "// player only has to move.", @@ -1126,9 +1426,9 @@ ] }, { + "description": "An enemy reaching the player restarts the scene.", "name": "Being touched by an enemy ends the run", "type": "gameplay", - "description": "An enemy reaching the player restarts the scene.", "source": [ "// Being touched by an enemy ends the run: the scene restarts, which puts the", "// player back at its starting point.", @@ -20792,6 +21092,4479 @@ } ], "eventsBasedObjects": [] + }, + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "Visual effect", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Shake object", + "gdevelopVersion": ">=5.5.222", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", + "name": "ShakeObject", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", + "shortDescription": "Shake objects with configurable translation, rotation, and scale intensity.", + "version": "1.6.2", + "description": [ + "Shake an object (position, angle or scale).", + "", + "It can be used for:", + "- Hit or impact", + "- Object slowly rocking back and forth (like a ship)", + "- Simulate engine vibration, earthquake, or pulsing", + "", + "The top-down RPG example uses this extension for damage animations ([open the project online](https://editor.gdevelop.io/?project=example://top-down-rpg))." + ], + "origin": { + "identifier": "ShakeObject", + "name": "gdevelop-extension-store" + }, + "tags": [ + "shaking", + "object", + "effect", + "shake", + "scale", + "position", + "rotate", + "angle" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Shake objects with translation and rotation.", + "fullName": "Shake object (position, angle)", + "helpPath": "", + "iconUrl": "", + "name": "ShakeObject_PositionAngle", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. ", + "fullName": "Shake object (position, angle)", + "functionType": "Action", + "name": "ShakeObject_PositionAngle", + "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_. Wait _PARAM6_ seconds between shakes. Keep shaking until stopped: _PARAM7_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start/Reset duration timer" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Duration" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "PowerX" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "PowerY" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "PowerAngle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "TimeBetweenShakes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShakeForever", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0.08" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "<", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect initial shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initiate the onScenePostEvents function" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + }, + { + "description": "Duration of shake (in seconds) (Default: 0.5) ", + "name": "Duration", + "type": "expression" + }, + { + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "name": "PowerX", + "type": "expression" + }, + { + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", + "name": "PowerY", + "type": "expression" + }, + { + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "name": "PowerAngle", + "type": "expression" + }, + { + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", + "name": "TimeBetweenShakes", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep object shaking forever (if desired)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "100" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate movement of the shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Run once before every shake movement" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "+", + "1" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Position Shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "After initial shake pick a random direction" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Rotation (angle) shake " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"even\" shake, rotate clockwise" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, rotate counter-clockwise" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "-1 *(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save that initial shake has been processed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate the fraction of shake that occured during this frame" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PercentTimeElapsedThisFrame", + "=", + "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increase change for the first half of the shake (move away from original values)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Decrease change the second half of the shake (return to original position)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop any shaking of object that was initiated by the Shake Object extension.", + "fullName": "Stop shaking the object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngle" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, + "propertyDescriptors": [], + "propertiesFolderStructure": { + "folderName": "__ROOT" + } + }, + { + "description": "Shake objects with translation, rotation and scale.", + "fullName": "Shake object (position, angle, scale)", + "helpPath": "", + "iconUrl": "", + "name": "ShakeObject_PositionAngleScale", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle, scale). Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters.", + "fullName": "Shake object (position, angle, scale)", + "functionType": "Action", + "name": "ShakeObject_PositionAngleScale", + "sentence": "Shake object _PARAM0_ for _PARAM2_ seconds. Modify position amplitude _PARAM3_ on X axis and _PARAM4_ on Y axis, angle rotation amplitude _PARAM5_, and scale amplitude _PARAM6_. Wait _PARAM7_ seconds between shakes. Keep shaking until stopped: _PARAM8_", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Start/Reset duration timer" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Pass input parameters to global variables so that onScenePostEvents can use them" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Duration" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "PowerX" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "PowerY" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "PowerAngle" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "=", + "PowerScale" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "TimeBetweenShakes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Determine if the shake should keep going until stopped" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "ShakeForever", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Add default values if none were provided" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "0.5" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "0.08" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If duration is less than a single shake, increase duration to make 1 full shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "<", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect initial shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Initiate the onScenePostEvents function" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + }, + { + "description": "Duration of shake (in seconds) (Default: 0.5)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "name": "PowerX", + "type": "expression" + }, + { + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "Use a negative number to make the single-shake move in the opposite direction.", + "name": "PowerY", + "type": "expression" + }, + { + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "name": "PowerAngle", + "type": "expression" + }, + { + "description": "Amplitude of scale shake (in percent change) (For example: 5)", + "name": "PowerScale", + "type": "expression" + }, + { + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "For a single-shake effect, set it to the same value as \"Duration\".", + "name": "TimeBetweenShakes", + "type": "expression" + }, + { + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Shake Object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Start shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Keep object shaking forever (if desired)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "True" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "100" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate movement of the shake", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Run once before every shake movement" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + }, + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "+", + "1" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "folded": true, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Position Shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "PositionDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * [-1 or 1]" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make initial shake NOT random so users can set a direction for a one-shake effect" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "After initial shake pick a random direction" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementX", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerX) * RandomWithStep(-1, 1, 2)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementY", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerY) * RandomWithStep(-1, 1, 2)" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Rotation (angle) shake " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"even\" shake, rotate clockwise" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, rotate counter-clockwise" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementAngle", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerAngle)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate Scale shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate object scale displacement, with linear decay over time" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every even shake, increase scale" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementScale", + "=", + "-1 * (Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every \"odd\" shake, decrease scale" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ScaleDisplacement = -1 * (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "mod(Object.Variable(__ShakeObject_ShakeCounter),2)", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementScale", + "=", + "(Object.Variable(__ShakeObject_Duration) - Object.ObjectTimerElapsedTime(\"__ShakeObject_DurationTimer\")) / Object.Variable(__ShakeObject_Duration) * Object.Variable(__ShakeObject_PowerScale) * (1/100)" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save that initial shake has been processed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_InitialShake", + "=", + "0" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Calculate the fraction of shake that occured during this frame" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PercentTimeElapsedThisFrame", + "=", + "min(1,TimeDelta()/Object.Variable(__ShakeObject_TimeBetweenShakes))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Increase change for the first half of the shake (move away from original values)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change scale" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Decrease change the second half of the shake (return to original position)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_ShakeTimer\"", + "Object.Variable(__ShakeObject_TimeBetweenShakes)/2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change position" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementY) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change angle" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerAngle)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementAngle) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change scale" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Save movement to calculate drift" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementScale) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Stop shaking", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Stop shaking when the duration has been reached (or if the stop shaking function was called)" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ObjectTimer" + }, + "parameters": [ + "Object", + "\"__ShakeObject_DurationTimer\"", + "Object.Variable(__ShakeObject_Duration)" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeCounter", + "=", + "0" + ] + } + ], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Correct for drift and reset drift tracking variables", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Move to correct any drift from previous shake" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "!=", + "0" + ] + }, + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "!=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledY)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_AngleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "-", + "Object.Variable(__ShakeObject_ScaleTravelled)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset drift detection variables" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledX", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_DisplacementTravelledY", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_AngleTravelled", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ScaleTravelled", + "=", + "0" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "name": "StopShaking", + "sentence": "Stop shaking _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::IsShaking" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "-1" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "name": "IsShaking", + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "ShakeObject_PositionAngleScale" + }, + { + "functionName": "doStepPostEvents" + }, + { + "functionName": "StopShaking" + }, + { + "functionName": "IsShaking" + } + ] + }, + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Scalable capability", + "extraInformation": [ + "ScalableCapability::ScalableBehavior" + ], + "choices": [], + "name": "Scale" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Scale" + } + ] + } + } + ], + "eventsBasedObjects": [] } ], "externalLayouts": []