diff --git a/examples/PlinkoExampleGame/PlinkoExampleGame.json b/examples/PlinkoExampleGame/PlinkoExampleGame.json new file mode 100644 index 000000000..11dcd2302 --- /dev/null +++ b/examples/PlinkoExampleGame/PlinkoExampleGame.json @@ -0,0 +1,11796 @@ +{ + "firstLayout": "", + "gdVersion": { + "build": 99, + "major": 4, + "minor": 0, + "revision": 0 + }, + "properties": { + "adaptGameResolutionAtRuntime": true, + "folderProject": false, + "orientation": "landscape", + "packageName": "com.example.plinko", + "pixelsRounding": false, + "projectUuid": "42ebbcab-e497-47fc-afad-0895ae9907ad", + "scaleMode": "linear", + "sizeOnStartupMode": "", + "templateSlug": "", + "useExternalSourceFiles": false, + "version": "1.0.0", + "name": "Plinko", + "description": "In this game the player drops their pachinko ball in an effort to hit as many pegs as possible to accumulate the maximum number of points. This game exhibits a scoring system, a score multiplier, the physics options, the leaderboard system, and more.", + "author": "", + "windowWidth": 800, + "windowHeight": 600, + "latestCompilationDirectory": "", + "maxFPS": 60, + "minFPS": 20, + "verticalSync": false, + "platformSpecificAssets": { + "android-icon-144": "android-icon-144.png", + "android-icon-192": "android-icon-192.png", + "android-icon-36": "android-icon-36.png", + "android-icon-48": "android-icon-48.png", + "android-icon-72": "android-icon-72.png", + "android-icon-96": "android-icon-96.png", + "android-windowSplashScreenAnimatedIcon": "android-windowSplashScreenAnimatedIcon.png", + "desktop-icon-512": "desktop-icon-512.png", + "ios-icon-100": "ios-icon-100.png", + "ios-icon-1024": "ios-icon-1024.png", + "ios-icon-114": "ios-icon-114.png", + "ios-icon-120": "ios-icon-120.png", + "ios-icon-144": "ios-icon-144.png", + "ios-icon-152": "ios-icon-152.png", + "ios-icon-167": "ios-icon-167.png", + "ios-icon-180": "ios-icon-180.png", + "ios-icon-20": "ios-icon-20.png", + "ios-icon-29": "ios-icon-29.png", + "ios-icon-40": "ios-icon-40.png", + "ios-icon-50": "ios-icon-50.png", + "ios-icon-57": "ios-icon-57.png", + "ios-icon-58": "ios-icon-58.png", + "ios-icon-60": "ios-icon-60.png", + "ios-icon-72": "ios-icon-72.png", + "ios-icon-76": "ios-icon-76.png", + "ios-icon-80": "ios-icon-80.png", + "ios-icon-87": "ios-icon-87.png", + "liluo-thumbnail": "thumbnail.png" + }, + "loadingScreen": { + "backgroundColor": 0, + "backgroundFadeInDuration": 0.2, + "backgroundImageResourceName": "", + "gdevelopLogoStyle": "light", + "logoAndProgressFadeInDuration": 0.2, + "logoAndProgressLogoFadeInDelay": 0.2, + "minDuration": 1.5, + "progressBarColor": 16777215, + "progressBarHeight": 20, + "progressBarMaxWidth": 200, + "progressBarMinWidth": 40, + "progressBarWidthPercent": 30, + "showGDevelopSplash": true, + "showProgressBar": true + }, + "authorIds": [ + "9MGDlUQAh8QUilno4JPycekjRCJ3" + ], + "categories": [], + "playableDevices": [], + "extensionProperties": [], + "platforms": [ + { + "name": "GDevelop JS platform" + } + ], + "currentPlatform": "GDevelop JS platform" + }, + "resources": { + "resources": [ + { + "alwaysLoaded": false, + "file": "assets/LongMetalPanel.png", + "kind": "image", + "metadata": "", + "name": "elementMetal013.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/Darkening.png", + "kind": "image", + "metadata": "", + "name": "Darkening.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/DoublePeg.png", + "kind": "image", + "metadata": "", + "name": "elementExplosive001.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/ClickerBeep.wav", + "kind": "audio", + "metadata": "", + "name": "ClickerBeep.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/starGold.png", + "kind": "image", + "metadata": "", + "name": "starGold.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/PTSans-Bold.ttf", + "kind": "font", + "metadata": "", + "name": "PTSans-Bold.ttf", + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/StonePeg.png", + "kind": "image", + "metadata": "", + "name": "elementStone001.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/ClickerBeep2.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0,\\\"sustainPunch\\\":50,\\\"decay\\\":0.2,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":0,\\\"frequency\\\":1000,\\\"frequencySweep\\\":-200,\\\"frequencyDeltaSweep\\\":2800,\\\"repeatFrequency\\\":5.5,\\\"frequencyJump1Onset\\\":35,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":60,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"sine\\\",\\\"interpolateNoise\\\":false,\\\"vibratoDepth\\\":470,\\\"vibratoFrequency\\\":0,\\\"squareDuty\\\":55,\\\"squareDutySweep\\\":100,\\\"flangerOffset\\\":0,\\\"flangerOffsetSweep\\\":4,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":2100,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1.2000000000000002,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"ClickerBeep2\"}}", + "name": "ClickerBeep2.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/metalPanel.png", + "kind": "image", + "metadata": "", + "name": "metalPanel.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/GameOver.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.3592499173913404,\\\"sustainPunch\\\":0,\\\"decay\\\":0.4267571207535963,\\\"tremoloDepth\\\":4,\\\"tremoloFrequency\\\":508,\\\"frequency\\\":10,\\\"frequencySweep\\\":0,\\\"frequencyDeltaSweep\\\":0,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":33,\\\"frequencyJump1Amount\\\":0,\\\"frequencyJump2Onset\\\":66,\\\"frequencyJump2Amount\\\":0,\\\"harmonics\\\":2,\\\"harmonicsFalloff\\\":0.18,\\\"waveform\\\":\\\"breaker\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":50,\\\"squareDutySweep\\\":0,\\\"flangerOffset\\\":22,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":2700,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":8100,\\\"highPassCutoffSweep\\\":6000,\\\"compression\\\":1.1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"GameOver\"}}", + "name": "GameOver.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "file": "assets/BallRespawn.wav", + "kind": "audio", + "metadata": "{\"jfxr\":{\"data\":\"{\\\"_version\\\":1,\\\"_name\\\":\\\"Jump 1\\\",\\\"_locked\\\":[],\\\"sampleRate\\\":44100,\\\"attack\\\":0,\\\"sustain\\\":0.08,\\\"sustainPunch\\\":0,\\\"decay\\\":0.39,\\\"tremoloDepth\\\":0,\\\"tremoloFrequency\\\":10,\\\"frequency\\\":100,\\\"frequencySweep\\\":0,\\\"frequencyDeltaSweep\\\":0,\\\"repeatFrequency\\\":0,\\\"frequencyJump1Onset\\\":25,\\\"frequencyJump1Amount\\\":65,\\\"frequencyJump2Onset\\\":35,\\\"frequencyJump2Amount\\\":85,\\\"harmonics\\\":0,\\\"harmonicsFalloff\\\":0.5,\\\"waveform\\\":\\\"breaker\\\",\\\"interpolateNoise\\\":true,\\\"vibratoDepth\\\":0,\\\"vibratoFrequency\\\":10,\\\"squareDuty\\\":25,\\\"squareDutySweep\\\":-100,\\\"flangerOffset\\\":1,\\\"flangerOffsetSweep\\\":0,\\\"bitCrush\\\":16,\\\"bitCrushSweep\\\":0,\\\"lowPassCutoff\\\":22050,\\\"lowPassCutoffSweep\\\":0,\\\"highPassCutoff\\\":0,\\\"highPassCutoffSweep\\\":0,\\\"compression\\\":1,\\\"normalization\\\":true,\\\"amplification\\\":100}\",\"name\":\"BallRespawn\"}}", + "name": "BallRespawn.wav", + "preloadAsMusic": false, + "preloadAsSound": true, + "preloadInCache": false, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Ball.png", + "kind": "image", + "metadata": "", + "name": "assets\\Ball.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/CloudLayer.png", + "kind": "image", + "metadata": "", + "name": "tiled_Cloud layer (3).png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/Generic Backgrounds/Background Elements/tiled_Cloud layer (3).png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/tiled_Background2.png", + "kind": "image", + "metadata": "", + "name": "tiled_Background.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://resources.gdevelop-app.com/assets/GDevelop examples/Platformer/Background/tiled_Background.png", + "name": "gdevelop-asset-store" + } + }, + { + "alwaysLoaded": false, + "file": "assets/desktop-icon-512.png", + "kind": "image", + "metadata": "", + "name": "desktop-icon-512.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-192.png", + "kind": "image", + "metadata": "", + "name": "android-icon-192.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-144.png", + "kind": "image", + "metadata": "", + "name": "android-icon-144.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-96.png", + "kind": "image", + "metadata": "", + "name": "android-icon-96.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-72.png", + "kind": "image", + "metadata": "", + "name": "android-icon-72.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-48.png", + "kind": "image", + "metadata": "", + "name": "android-icon-48.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-icon-36.png", + "kind": "image", + "metadata": "", + "name": "android-icon-36.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/android-windowSplashScreenAnimatedIcon.png", + "kind": "image", + "metadata": "", + "name": "android-windowSplashScreenAnimatedIcon.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-1024.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-1024.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-180.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-180.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-167.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-167.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-152.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-152.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-144.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-144.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-120.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-120.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-114.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-114.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-100.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-100.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-87.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-87.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-80.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-80.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-76.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-76.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-72.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-72.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-60.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-60.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-58.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-58.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-57.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-57.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-50.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-50.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-40.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-40.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-29.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-29.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "assets/ios-icon-20.png", + "kind": "image", + "metadata": "", + "name": "ios-icon-20.png", + "smoothed": true, + "userAdded": false + }, + { + "alwaysLoaded": false, + "file": "thumbnail.png", + "kind": "image", + "metadata": "", + "name": "thumbnail.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/StonePeg.png", + "kind": "image", + "metadata": "", + "name": "assets\\StonePeg.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/DoublePeg.png", + "kind": "image", + "metadata": "", + "name": "assets\\DoublePeg.png", + "smoothed": true, + "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/starGold.png", + "kind": "image", + "metadata": "", + "name": "assets\\starGold.png", + "smoothed": true, + "userAdded": true + } + ], + "resourceFolders": [] + }, + "objects": [], + "objectsGroups": [], + "variables": [ + { + "folded": true, + "name": "Score", + "type": "number", + "value": 0 + }, + { + "folded": true, + "name": "ScoreDisplay", + "type": "number", + "value": 0 + } + ], + "layouts": [ + { + "b": 65, + "disableInputWhenNotFocused": true, + "mangledName": "GameScene", + "name": "GameScene", + "oglFOV": 90, + "oglZFar": 500, + "oglZNear": 1, + "r": 65, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 65, + "uiSettings": { + "grid": true, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.2, + "snap": true, + "zoomFactor": 0.2849999999999997, + "windowMask": false + }, + "objectsGroups": [ + { + "name": "Breakable_Pegs", + "objects": [ + { + "name": "Peg_Basic" + }, + { + "name": "Peg_Move" + } + ] + } + ], + "variables": [ + { + "folded": true, + "name": "Mutliplier", + "type": "number", + "value": 1 + } + ], + "instances": [ + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "05a26d2e-1704-4da9-b082-6b555ee0e806", + "width": 32, + "x": 432, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 26, + "layer": "", + "name": "Ball", + "persistentUuid": "2c040a60-3669-496c-a581-0f088adcc9f2", + "width": 26, + "x": 427, + "y": 120, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Score", + "persistentUuid": "a2b81b92-9142-4065-8c49-ee304ccc74d7", + "width": 334, + "x": 564, + "y": 8, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 90, + "customSize": true, + "height": 70, + "layer": "", + "name": "Walls", + "persistentUuid": "0c554c1d-e7e2-4e12-a968-03c5c205c607", + "width": 768, + "x": 419, + "y": 253, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 90, + "customSize": true, + "height": 70, + "layer": "", + "name": "Walls", + "persistentUuid": "c4d84af3-67b4-416a-bb00-a1871615439f", + "width": 768, + "x": -387, + "y": 253, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "adc5b4e4-469d-4b1e-a3b4-21cb06eccdf7", + "width": 32, + "x": 368, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "08fa4bf4-6b1f-4991-a18f-22fa7b0daea1", + "width": 32, + "x": 560, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "9ec2eb74-05fa-461d-a3af-5ebc4aea59b4", + "width": 32, + "x": 496, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "2e8b76e0-0d59-47c3-a67b-2eed8abb71d7", + "width": 32, + "x": 304, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "7e894361-efc8-4ca2-a633-f91bab620b8a", + "width": 32, + "x": 240.00003051757812, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "7ea04418-0944-40af-ace5-be93d4ed401f", + "width": 32, + "x": 176, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "e9efd641-9523-434f-a4cd-8c9ce7271324", + "width": 32, + "x": 112, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "552db0e6-0372-4fff-b028-12d61c32d2ce", + "width": 32, + "x": 688, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "d7b9dd91-e071-4d0b-8372-991c3b0995b7", + "width": 32, + "x": 624, + "y": 240, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "3cce0dc0-d071-4ddd-a5cf-8d8184f1549b", + "width": 32, + "x": 400.0000305175781, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "6da7cd3a-ad9e-4c73-a4d2-069a433762a2", + "width": 32, + "x": 336.0000305175781, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "d1fa2b48-9f83-4f57-a455-819759a677d4", + "width": 32, + "x": 528, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "233a5067-e46b-49fd-8038-924fc56dfb75", + "width": 32, + "x": 464.0000305175781, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "363aadc4-9762-4a63-a3e0-047c73fe061f", + "width": 32, + "x": 272.0000305175781, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "8a030273-c7d5-4a84-a9a8-cabda92a3bac", + "width": 32, + "x": 208.00006103515625, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "359f16f2-77d0-4ca8-a74b-dd20ea909165", + "width": 32, + "x": 144.00003051757812, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "2fdab63b-46da-4933-8f13-dcbb4f1c12e0", + "width": 32, + "x": 80.00003051757812, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "75affb6b-ff93-4a7d-a583-b26f7d448ce5", + "width": 32, + "x": 656, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "cb972a95-a97c-4805-ab42-35dd8efb2347", + "width": 32, + "x": 592, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "1949ef33-2d49-4295-a8f4-2824df33f491", + "width": 32, + "x": 720, + "y": 368, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "4085ec2c-797a-4dec-aee9-5b6cc49a6d89", + "width": 32, + "x": 592, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "57acad87-ee21-4ae9-a14a-7a8591744b65", + "width": 32, + "x": 464, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "3ee24e78-9428-4a4d-99cc-a264f96f52d8", + "width": 32, + "x": 336, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "dff1eb6a-7169-48c1-b613-eb76783bdb00", + "width": 32, + "x": 208, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "2643d1ae-64bb-456f-9162-5b81a2c75d14", + "width": 32, + "x": 688, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "32196a4e-24e0-413f-b415-8b49f8ed7597", + "width": 32, + "x": 112, + "y": 304, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "d6e70190-dfef-477d-92b9-fe5d25b73f6b", + "width": 32, + "x": 48, + "y": 272, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "60a9f528-1456-40e3-9473-6addbcb7582a", + "width": 32, + "x": 752, + "y": 272, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Peg_Bigger", + "persistentUuid": "cd40b1a4-3837-46ae-9d47-7dd6fbc62efe", + "width": 0, + "x": 605, + "y": 451, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Peg_Bigger", + "persistentUuid": "addfd14b-0c59-4fe5-8228-987601abc98c", + "width": 0, + "x": 195, + "y": 451, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "21e4e15e-47ea-45f6-8964-de0aa60b80c3", + "width": 32, + "x": 400.0000305175781, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "0ef30dd1-8ede-4c2e-9e51-6fcc9247893c", + "width": 32, + "x": 336.0000305175781, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "43a12a17-852a-4f92-aa58-1bf88f312f79", + "width": 32, + "x": 528, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "734d0a0b-e1f6-4491-ac64-458414624fcf", + "width": 32, + "x": 464.0000305175781, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "789d0707-9580-4076-9cb5-501291fe690f", + "width": 32, + "x": 272.00006103515625, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "29c613bd-b829-41ef-8bcb-f3055816127b", + "width": 32, + "x": 208.0000762939453, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "ac135ff4-24b9-47b0-a5b4-5f3e05d7ab3b", + "width": 32, + "x": 144.00003051757812, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "ff6b9bab-2347-4ffc-9468-6d6e743ce362", + "width": 32, + "x": 80.00003814697266, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "18bfe8d1-3c81-49df-8a77-0fb8026ebace", + "width": 32, + "x": 656, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "b069c8d0-aa09-46a4-8a2b-fc07e1ee8053", + "width": 32, + "x": 592, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "da9f1b51-cec9-494d-b3b8-d0424c98d701", + "width": 32, + "x": 720, + "y": 528, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Move", + "persistentUuid": "6d7fee79-1428-470e-93b1-fc91a228c5a7", + "width": 32, + "x": 368, + "y": 464, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Move", + "persistentUuid": "528daa72-f644-45fb-ae3d-7d7ef348684d", + "width": 32, + "x": 432, + "y": 464, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Move", + "persistentUuid": "9a9409d8-f642-4c3e-906f-64c3ee0af083", + "width": 32, + "x": 304, + "y": 464, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Move", + "persistentUuid": "6e1a6921-c592-4ec1-882d-16f2c2060fbc", + "width": 32, + "x": 496, + "y": 464, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "5c0bf6f5-773b-46cc-9823-455802d86a19", + "width": 32, + "x": 752, + "y": 464, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Peg_Basic", + "persistentUuid": "a13c8d1a-2aab-4ab7-a65f-bfc20ab8686d", + "width": 32, + "x": 48, + "y": 464, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 56, + "layer": "", + "name": "Lives", + "persistentUuid": "93d492a5-d718-4d96-8b38-64a56c37497a", + "width": 214, + "x": 106, + "y": 8, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 672, + "layer": "GameOver", + "name": "Darkening", + "persistentUuid": "c62af5d7-a247-45ea-bcfe-5acb987c4c70", + "width": 864, + "x": -32, + "y": -32, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "GameOver", + "name": "GameOver", + "persistentUuid": "baae5410-a8d5-4695-9c91-e3af4f7a007b", + "width": 0, + "x": 96, + "y": 109, + "zOrder": 21, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Multiplier", + "persistentUuid": "2ca4cf8f-18db-4c3c-b8a5-7fd55019f372", + "width": 32, + "x": 560, + "y": 304, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Multiplier", + "persistentUuid": "b2021b29-cf10-4243-881b-663295da0c6f", + "width": 32, + "x": 240, + "y": 304, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Multiplier", + "persistentUuid": "9b6babec-d98f-4eab-b833-1c77844f3fcf", + "width": 32, + "x": 48, + "y": 528, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 32, + "layer": "", + "name": "Multiplier", + "persistentUuid": "d4c14a3e-aab7-421d-afca-129bd8557804", + "width": 32, + "x": 752, + "y": 528, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 12.947511672973633, + "customSize": false, + "height": 0, + "layer": "", + "name": "ScoreMultiplier", + "persistentUuid": "59aef7bb-df82-42a3-9f63-ec9bd6696620", + "width": 0, + "x": 684.6315307617188, + "y": 51.004600524902344, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "", + "name": "UI_Block", + "persistentUuid": "73dc5b71-9143-4039-80fb-1d3ff36ff27f", + "width": 268, + "x": -12, + "y": -64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 128, + "layer": "", + "name": "UI_Block", + "persistentUuid": "daeedb0a-82be-4e0f-8308-c8cf82bf12c5", + "width": 256, + "x": 544, + "y": -64, + "zOrder": 0, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 64, + "layer": "GameOver", + "name": "NewTextInput", + "persistentUuid": "9e557af3-3ecf-4088-b7be-5b4c105ade68", + "width": 416, + "x": 192, + "y": 288, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "GameOver", + "name": "SubmitScore", + "persistentUuid": "581f22a0-3d8d-4e6c-a933-9ff900cd1e2c", + "width": 0, + "x": 250, + "y": 370, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 224, + "layer": "Clouds", + "name": "CloudLayer3", + "persistentUuid": "175a396f-0e66-4c1b-b078-4d931ad2f7da", + "width": 928, + "x": -64, + "y": 480, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 180, + "customSize": true, + "height": 192, + "layer": "Clouds", + "name": "CloudLayer3", + "persistentUuid": "71a1b96a-729b-4eaf-b721-5ce3c51c722a", + "width": 928, + "x": -64, + "y": -64, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 224, + "layer": "Clouds", + "name": "CloudLayer3", + "persistentUuid": "2b9a1f23-cedb-4dab-8c0c-323089bd1074", + "width": 1184, + "x": -256, + "y": 480, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 180, + "customSize": true, + "height": 192, + "layer": "Clouds", + "name": "CloudLayer3", + "persistentUuid": "4ea62a65-c2be-408e-8402-aec5597fb5ca", + "width": 1280, + "x": -192, + "y": -96, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "height": 608, + "layer": "Background", + "name": "Background", + "persistentUuid": "13ed0307-aafd-4be7-a01d-9076f5fcb9b3", + "width": 864, + "x": 1184, + "y": 64, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "GameOver", + "name": "RestartGame", + "persistentUuid": "64534e90-8695-457e-9d21-f2c12ac1927b", + "width": 0, + "x": 319.5, + "y": 441, + "zOrder": 32, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "", + "name": "Peg_Basic", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "canSleep": true, + "shape": "Circle", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "polygonOrigin": "Center", + "vertices": [], + "density": 1, + "friction": 0.3, + "restitution": 1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 1, + "masks": 1 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "elementStone001.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 35, + "y": 35 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Peg_Move", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "canSleep": true, + "shape": "Circle", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "polygonOrigin": "Center", + "vertices": [], + "density": 1, + "friction": 0.3, + "restitution": 1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 1, + "masks": 1 + }, + { + "name": "RectangularMovement", + "type": "RectangularMovement::RectangularMovement", + "HorizontalSpeed": 50, + "VerticalSpeed": 0, + "HorizontalDistance": 100, + "VerticalDistance": 0, + "CenterPointX": 0, + "CenterPointY": 0, + "ProgressX": 0, + "ProgressY": 0, + "RectangularCounter": 0, + "ConstantSpeed": true, + "CounterClockwise": false, + "CurrentDirection": "" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "elementStone001.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 35, + "y": 35 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Peg_Bigger", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "canSleep": true, + "shape": "Circle", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "polygonOrigin": "Center", + "vertices": [], + "density": 1, + "friction": 0, + "restitution": 1, + "linearDamping": 0, + "angularDamping": 0, + "gravityScale": 1, + "layers": 1, + "masks": 1 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "elementMetal001", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "elementExplosive001.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 35, + "y": 35 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Multiplier", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "elementMetal001", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.07999999821186066, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "starGold.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 35, + "y": 35 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "name": "Ball", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "Pitch", + "type": "number", + "value": 1 + }, + { + "folded": true, + "name": "Dropped", + "type": "boolean", + "value": false + }, + { + "folded": true, + "name": "Lives", + "type": "number", + "value": 3 + } + ], + "effects": [], + "behaviors": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "bodyType": "Dynamic", + "bullet": false, + "fixedRotation": true, + "canSleep": true, + "shape": "Circle", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "polygonOrigin": "Center", + "vertices": [], + "density": 2, + "friction": 0.3, + "restitution": 0.2, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 2, + "layers": 1, + "masks": 1 + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "assets\\Ball.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 13, + "y": 13 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Score", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "string": "Score: 0", + "font": "PTSans-Bold.ttf", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreMultiplier", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "string": "x25%", + "font": "PTSans-Bold.ttf", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "Lives", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "string": "Lives: 0", + "font": "PTSans-Bold.ttf", + "characterSize": 40, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "height": 70, + "name": "Walls", + "tags": "", + "texture": "elementMetal013.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 220, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "bodyType": "Static", + "bullet": false, + "fixedRotation": false, + "canSleep": true, + "shape": "Box", + "shapeDimensionA": 0, + "shapeDimensionB": 0, + "shapeOffsetX": 0, + "shapeOffsetY": 0, + "polygonOrigin": "Center", + "vertices": [], + "density": 1, + "friction": 0.3, + "restitution": 1, + "linearDamping": 0.1, + "angularDamping": 0.1, + "gravityScale": 1, + "layers": 1, + "masks": 1 + } + ] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 0, + "emitterForceMin": 0, + "flow": 1, + "maxParticleNb": 300, + "name": "PegDeath_Particle", + "particleAlpha1": 100, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 114, + "particleGravityX": 0, + "particleGravityY": 95, + "particleGreen1": 255, + "particleGreen2": 114, + "particleLifeTimeMax": 1.5, + "particleLifeTimeMin": 1, + "particleRed1": 255, + "particleRed2": 114, + "particleSize1": 40, + "particleSize2": 40, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 1, + "textureParticleName": "assets\\StonePeg.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 0, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 0, + "emitterForceMax": 0, + "emitterForceMin": 0, + "flow": 1, + "maxParticleNb": 300, + "name": "PegBig_Particle", + "particleAlpha1": 100, + "particleAlpha2": 0, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 255, + "particleGravityX": 0, + "particleGravityY": 0, + "particleGreen1": 255, + "particleGreen2": 255, + "particleLifeTimeMax": 1, + "particleLifeTimeMin": 1, + "particleRed1": 255, + "particleRed2": 255, + "particleSize1": 100, + "particleSize2": 150, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 1, + "textureParticleName": "assets\\DoublePeg.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 0, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "additive": false, + "assetStoreId": "", + "destroyWhenNoParticles": true, + "emitterAngleA": 0, + "emitterAngleB": 360, + "emitterForceMax": 70, + "emitterForceMin": 30, + "flow": 100, + "maxParticleNb": 300, + "name": "PegStar_Particle", + "particleAlpha1": 255, + "particleAlpha2": 255, + "particleAlphaRandomness1": 0, + "particleAlphaRandomness2": 0, + "particleAngle1": 0, + "particleAngle2": 0, + "particleAngleRandomness1": 0, + "particleAngleRandomness2": 0, + "particleBlue1": 255, + "particleBlue2": 255, + "particleGravityX": 0, + "particleGravityY": 100, + "particleGreen1": 255, + "particleGreen2": 255, + "particleLifeTimeMax": 3, + "particleLifeTimeMin": 2, + "particleRed1": 255, + "particleRed2": 255, + "particleSize1": 50, + "particleSize2": 0, + "particleSizeRandomness1": 0, + "particleSizeRandomness2": 0, + "rendererParam1": 3, + "rendererParam2": 1, + "rendererType": "Quad", + "tags": "", + "tank": 6, + "textureParticleName": "assets\\starGold.png", + "type": "ParticleSystem::ParticleEmitter", + "zoneRadius": 0, + "variables": [], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "", + "name": "Darkening", + "tags": "", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": false, + "image": "Darkening.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "GameOver", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ], + "string": "GAME OVER", + "font": "", + "characterSize": 100, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bottomMargin": 20, + "height": 100, + "leftMargin": 20, + "name": "UI_Block", + "rightMargin": 20, + "tags": "", + "texture": "metalPanel.png", + "tiled": true, + "topMargin": 20, + "type": "PanelSpriteObject::PanelSprite", + "width": 100, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + } + ] + }, + { + "assetStoreId": "", + "name": "NewTextInput", + "tags": "", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "initialValue": "", + "placeholder": "Touch to start typing", + "fontResourceName": "", + "fontSize": 20, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "SubmitScore", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Submit Score", + "font": "", + "characterSize": 50, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "RestartGame", + "smoothed": true, + "tags": "", + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Restart", + "font": "", + "characterSize": 50, + "color": { + "b": 255, + "g": 255, + "r": 255 + } + }, + { + "assetStoreId": "520d7b3a4681a42df216ea3ef7fa0f589eb73e9b020056cc9fa530c3994ea5c0", + "height": 128, + "name": "CloudLayer3", + "tags": "", + "texture": "tiled_Cloud layer (3).png", + "type": "TiledSpriteObject::TiledSprite", + "width": 128, + "variables": [ + { + "folded": true, + "name": "Speed", + "type": "number", + "value": 0 + } + ], + "effects": [], + "behaviors": [] + }, + { + "assetStoreId": "3ab58f0740dbc4aaac3552dc7c172d0b7c45fbd38c1b6c7c42dcfd6d86faa404", + "height": 128, + "name": "Background", + "tags": "", + "texture": "tiled_Background.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Setting up some default settings and effects to make the game functional and more appealing to look at.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Multiplier", + "ShakeObject_PositionAngleScale", + "2", + "0", + "10", + "30", + "0", + "2", + "yes", + "" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ScoreMultiplier", + "=", + "\"\"" + ] + }, + { + "type": { + "value": "CentreCamera" + }, + "parameters": [ + "", + "Background", + "", + "\"Background\"", + "" + ] + }, + { + "type": { + "value": "TiledSpriteObject::SetColor" + }, + "parameters": [ + "Background", + "\"233;178;178\"" + ] + }, + { + "type": { + "value": "TiledSpriteObject::XOffset" + }, + "parameters": [ + "Background", + "-", + "100" + ] + }, + { + "type": { + "value": "TiledSpriteObject::SetOpacity" + }, + "parameters": [ + "CloudLayer3", + "=", + "100" + ] + }, + { + "type": { + "value": "TiledSpriteObject::SetColor" + }, + "parameters": [ + "CloudLayer3", + "\"143;98;168\"" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Ball", + "Physics2", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the ball collides with a breakable, add points to the score based on the current score multiplier.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Breakable_Pegs", + "conditions": [ + { + "type": { + "value": "Physics2::CollisionStarted" + }, + "parameters": [ + "Ball", + "Physics2", + "Breakable_Pegs", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Score", + "+", + "Variable(Mutliplier)" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ClickerBeep.wav", + "", + "20", + "Ball.Variable(Pitch)" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Breakable_Pegs", + "ShakeObject_PositionAngleScale", + "0.2", + "0", + "0", + "0", + "-30", + "0.1", + "", + "" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Breakable_Pegs", + "-", + "30" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Ball", + "Pitch", + "+", + "0.05" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"Ball_Pitch\"" + ] + }, + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Breakable_Pegs", + "\"114;114;114\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If below a certain opacity value, delete the peg and spawn a death particle", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Breakable_Pegs", + "<", + "180" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Breakable_Pegs", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "PegDeath_Particle", + "Breakable_Pegs.X()", + "Breakable_Pegs.Y()", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "PegDeath_Particle", + "=", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the ball collides with a bigger peg, add points to the score based on the current score multiplier times 2.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Physics2::CollisionStarted" + }, + "parameters": [ + "Ball", + "Physics2", + "Peg_Bigger", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Score", + "+", + "Variable(Mutliplier)*2" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ClickerBeep.wav", + "", + "30", + "0.8" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Peg_Bigger", + "ShakeObject_PositionAngleScale", + "0.3", + "0", + "0", + "0", + "20", + "0.15", + "", + "" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Ball", + "Pitch", + "+", + "0.05" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"Ball_Pitch\"" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "PegBig_Particle", + "Peg_Bigger.X()", + "Peg_Bigger.Y()", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "PegDeath_Particle", + "=", + "0" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Score", + "ShakeObject_PositionAngle", + "1", + "0", + "-10", + "0", + "0.2", + "0.15", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the ball collides with the score multiplier object, delete it and create particles, and change the multiplier variable as well as the text displaying that variables value.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Ball", + "Multiplier", + "Multiplier", + "", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ClickerBeep2.wav", + "", + "35", + "0.8" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "Mutliplier", + "+", + "0.25" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Multiplier", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "PegStar_Particle", + "Multiplier.X()", + "Multiplier.Y()", + "" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "ScoreMultiplier", + "ShakeObject_PositionAngle", + "0.5", + "8", + "8", + "0", + "0.1", + "0.15", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Mutliplier", + "=", + "1.25" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ScoreMultiplier", + "=", + "\"+25%\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Mutliplier", + "=", + "1.50" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ScoreMultiplier", + "=", + "\"+50%\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Mutliplier", + "=", + "1.75" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ScoreMultiplier", + "=", + "\"+75%\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarScene" + }, + "parameters": [ + "Mutliplier", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "ScoreMultiplier", + "=", + "\"+100%\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reseting the ball's collision pitch to 1, if the ball hasn't collided with any pegs for more than 0.5 seconds.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"Ball_Pitch\"", + ">", + "0.5" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Ball", + "Pitch", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the ball falls below 1000 along the Y axis, reset it's starting properties andmove it back to the top of the play field.\n\nBut only if the player has more than 0 lives left.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PosY" + }, + "parameters": [ + "Ball", + ">", + "1000" + ] + } + ], + "actions": [ + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Ball", + "Physics2", + "no" + ] + }, + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Ball", + "=", + "120" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Ball", + "Dropped", + "False" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "Ball", + "ShakeObject_PositionAngleScale", + "0.4", + "0", + "0", + "0", + "60", + "0.4", + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Ball", + "Lives", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "BallRespawn.wav", + "", + "45", + "1.2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Ball", + "Lives", + "<", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Ball", + "" + ] + }, + { + "type": { + "value": "ShowLayer" + }, + "parameters": [ + "", + "\"GameOver\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "If the balls \"Dropped\" boolean variable is set to false, have it follow the mouse and allow access to the sub event that will drop the ball is the left mouse button was released.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Ball", + "Dropped", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Ball", + "=", + "clamp(48, MouseX(), 752)" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Ball", + "Dropped", + "True" + ] + }, + { + "type": { + "value": "ActivateBehavior" + }, + "parameters": [ + "Ball", + "Physics2", + "yes" + ] + }, + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "ClickerBeep.wav", + "", + "50", + "0.8" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Ball", + "Lives", + "-", + "1" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "Lives", + "ShakeObject_PositionAngle", + "1", + "0", + "-10", + "0", + "0.2", + "0.15", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Display the score and lives left", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "ScoreDisplay", + "=", + "floor(GlobalVariable(Score))" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Score", + "=", + "\"Score: \" + GlobalVariableString(ScoreDisplay)" + ] + }, + { + "type": { + "value": "TextObject::String" + }, + "parameters": [ + "Lives", + "=", + "\"Lives: \" + Ball.VariableString(Lives)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the GameOver kayer has become visible, allow the sub events to be triggered.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "LayerVisible" + }, + "parameters": [ + "", + "\"GameOver\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlaySound" + }, + "parameters": [ + "", + "GameOver.wav", + "", + "40", + "1" + ] + }, + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngle::ShakeObject_PositionAngle" + }, + "parameters": [ + "GameOver", + "ShakeObject_PositionAngle", + "4", + "0", + "70", + "0", + "2", + "yes", + "" + ] + }, + { + "type": { + "value": "Opacity" + }, + "parameters": [ + "Darkening", + "=", + "220" + ] + }, + { + "type": { + "value": "ChangeLayer" + }, + "parameters": [ + "Score", + "\"Score\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When cursor hovers over the SubmitScore text object, and the left mouse button is released, it will take the text from the text input object and send that to the selected leaderboard and then display the loading screen for the leaderboard and reset the global values for score and score display.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "SubmitScore", + "", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "SubmitScore", + "\"255;235;0\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "\"2a0fb72c-383e-40e8-86b9-09e95e13de51\"", + "GlobalVariable(Score)", + "NewTextInput.Text()" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "\"2a0fb72c-383e-40e8-86b9-09e95e13de51\"", + "yes" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Score", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "ScoreDisplay", + "=", + "0" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisSurObjet" + }, + "parameters": [ + "SubmitScore", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "SubmitScore", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When cursor hovers over the RestartGame text object, and the left mouse button is released, it will reset the global variables and change the scene back to the GameScene which will allow the player to start over.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SourisSurObjet" + }, + "parameters": [ + "RestartGame", + "", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "RestartGame", + "\"255;235;0\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "MouseButtonReleased" + }, + "parameters": [ + "", + "Left" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "ScoreDisplay", + "=", + "0" + ] + }, + { + "type": { + "value": "ModVarGlobal" + }, + "parameters": [ + "Score", + "=", + "0" + ] + }, + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"GameScene\"", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "SourisSurObjet" + }, + "parameters": [ + "RestartGame", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextObject::ChangeColor" + }, + "parameters": [ + "RestartGame", + "\"255;255;255\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the leaderboard has finished loading, change the game scene to the \"leaderboard\" game scene so the player is isolated from the game and can only interact with the leaderboard.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewLoaded" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Leaderboard\"", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Randomizing the object variable \"Speed\" of the cloud object that will be use in the below event to make them drift at a randomized speed.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "CloudLayer3", + "Speed", + "=", + "RandomFloatInRange(3,7)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "A constant addition to the X offset of the cloud objects so they'll drift slowly across the screen.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TiledSpriteObject::XOffset" + }, + "parameters": [ + "CloudLayer3", + "+", + "CloudLayer3.Variable(Speed)*TimeDelta()" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 8187816, + "ambientLightColorG": 6040208, + "ambientLightColorR": 7389680, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Background", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 19952200, + "ambientLightColorG": 6043600, + "ambientLightColorR": 10052400, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Clouds", + "visibility": true, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 32, + "ambientLightColorG": 0, + "ambientLightColorR": 0, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ] + }, + { + "ambientLightColorB": 0, + "ambientLightColorG": 6040208, + "ambientLightColorR": 9174096, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "GameOver", + "visibility": false, + "cameras": [], + "effects": [] + }, + { + "ambientLightColorB": 9248840, + "ambientLightColorG": 6040208, + "ambientLightColorR": 7389680, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "Score", + "visibility": true, + "cameras": [], + "effects": [ + { + "effectType": "Outline", + "name": "Effect", + "doubleParameters": { + "padding": 2, + "thickness": 2 + }, + "stringParameters": { + "color": "0;0;0" + }, + "booleanParameters": {} + } + ] + } + ], + "behaviorsSharedData": [ + { + "name": "Physics2", + "type": "Physics2::Physics2Behavior", + "gravityX": 0, + "gravityY": 9.8, + "scaleX": 50, + "scaleY": 50 + }, + { + "name": "RectangularMovement", + "type": "RectangularMovement::RectangularMovement" + }, + { + "name": "ShakeObject_PositionAngle", + "type": "ShakeObject::ShakeObject_PositionAngle" + }, + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ] + }, + { + "b": 209, + "disableInputWhenNotFocused": true, + "mangledName": "Leaderboard", + "name": "Leaderboard", + "oglFOV": 90, + "oglZFar": 500, + "oglZNear": 1, + "r": 209, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 209, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 32, + "gridHeight": 32, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 1, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [], + "objects": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When the player exits the leaderboard, send them back to GameScene so they can restart the game.", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Leaderboards::IsLeaderboardViewLoaded" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"GameScene\"", + "no" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 2, + "ambientLightColorG": 134217728, + "ambientLightColorR": 1597132097, + "followBaseLayerCamera": false, + "isLightingLayer": false, + "name": "", + "visibility": true, + "cameras": [ + { + "defaultSize": true, + "defaultViewport": true, + "height": 0, + "viewportBottom": 1, + "viewportLeft": 0, + "viewportRight": 1, + "viewportTop": 0, + "width": 0 + } + ], + "effects": [] + } + ], + "behaviorsSharedData": [] + } + ], + "externalEvents": [], + "eventsFunctionsExtensions": [ + { + "author": "Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "", + "description": "Select one or more methods of shaking:\n- Position: Shake the X and/or Y position of the object \n- Angle: Shake the angle (rotation) of the object \n- Scale: Shake the scale of the object (must be a sprite)\n\nControl how the object shakes:\n- Amplitude: How far the object moves during each shake\n- Duration: Amount of time to shake the object\n- Time between shakes: Amount of time between each movement of the object\n- Keep shaking until stopped (boolean)\n\nTips:\n- For a single-shake effect, set the \"Time between shakes\" to be equal to \"Duration\" (great for a hit or impact)\n- To make the single-shake move in the opposite direction, use negative numbers \n- To repeat a single-shake effect in a loop, add a condition \"Object is not shaking\" \n- Use a long \"Time between shakes\" to simulate a slow moving object (like a ship rocking back and forth)\n- Make sure to \"Stop shaking\" before starting a new shake if it uses different parameters. \n- Use \"Shake until stopped\" to simulate engine vibration, earthquake, or pulsing", + "extensionNamespace": "", + "fullName": "Shake Object (position, angle, scale)", + "helpPath": "https://victrisgames.itch.io/gdevelop-camera-shake-example", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFycm93LWFsbCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMywxMUgxOEwxNi41LDkuNUwxNy45Miw4LjA4TDIxLjg0LDEyTDE3LjkyLDE1LjkyTDE2LjUsMTQuNUwxOCwxM0gxM1YxOEwxNC41LDE2LjVMMTUuOTIsMTcuOTJMMTIsMjEuODRMOC4wOCwxNy45Mkw5LjUsMTYuNUwxMSwxOFYxM0g2TDcuNSwxNC41TDYuMDgsMTUuOTJMMi4xNiwxMkw2LjA4LDguMDhMNy41LDkuNUw2LDExSDExVjZMOS41LDcuNUw4LjA4LDYuMDhMMTIsMi4xNkwxNS45Miw2LjA4TDE0LjUsNy41TDEzLDZWMTFaIiAvPjwvc3ZnPg==", + "name": "ShakeObject", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/arrow-all.svg", + "shortDescription": "Shake an object, using one or more ways to shake (position, angle, scale).", + "version": "1.5.5", + "origin": { + "identifier": "ShakeObject", + "name": "gdevelop-extension-store" + }, + "tags": [ + "shaking", + "object", + "effect", + "shake", + "scale", + "position", + "rotate", + "angle" + ], + "authorIds": [ + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle).\nThis behavior can be used on any type of object.", + "fullName": "Shake object (position, angle)", + "name": "ShakeObject_PositionAngle", + "objectType": "", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle).", + "fullName": "Shake object (position, angle)", + "functionType": "Action", + "group": "", + "name": "ShakeObject_PositionAngle", + "private": false, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "GetArgumentAsNumber(\"PowerX\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "GetArgumentAsNumber(\"PowerY\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "GetArgumentAsNumber(\"PowerAngle\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "GetArgumentAsNumber(\"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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShakeForever\"" + ] + } + ], + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of shake (in seconds) (Default: 0.5) ", + "longDescription": "", + "name": "Duration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerX", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerY", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "longDescription": "", + "name": "PowerAngle", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "", + "name": "TimeBetweenShakes", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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]", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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 ", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "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", + "group": "", + "name": "StopShaking", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "group": "", + "name": "IsShaking", + "private": false, + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngle", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [] + }, + { + "description": "Shake an object, using one or more ways to shake (position, angle, scale)\nThis behavior can only be used on sprite objects.", + "fullName": "Shake object (position, angle, scale)", + "name": "ShakeObject_PositionAngleScale", + "objectType": "Sprite", + "eventsFunctions": [ + { + "description": "Shake an object, using one or more ways to shake (position, angle, scale).", + "fullName": "Shake object (position, angle, scale)", + "functionType": "Action", + "group": "", + "name": "ShakeObject_PositionAngleScale", + "private": false, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_Duration", + "=", + "GetArgumentAsNumber(\"Duration\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerX", + "=", + "GetArgumentAsNumber(\"PowerX\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerY", + "=", + "GetArgumentAsNumber(\"PowerY\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerAngle", + "=", + "GetArgumentAsNumber(\"PowerAngle\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_PowerScale", + "=", + "GetArgumentAsNumber(\"PowerScale\")" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_TimeBetweenShakes", + "=", + "GetArgumentAsNumber(\"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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeForever", + "False" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"ShakeForever\"" + ] + } + ], + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Duration of shake (in seconds) (Default: 0.5)", + "longDescription": "", + "name": "Duration", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of postion shake in X direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerX", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of position shake in Y direction (in pixels) (For example: 5)", + "longDescription": "", + "name": "PowerY", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of angle rotation shake (in degrees) (For example: 5)", + "longDescription": "", + "name": "PowerAngle", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amplitude of scale shake (in percent change) (For example: 5)", + "longDescription": "", + "name": "PowerScale", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Amount of time between shakes (in seconds) (Default: 0.08)", + "longDescription": "", + "name": "TimeBetweenShakes", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Keep shaking until stopped", + "longDescription": "Duration value will be ignored", + "name": "ShakeForever", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPostEvents", + "private": false, + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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]", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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 ", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AngleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "ScaleDisplacement = (DesiredDuration - RunningTimer) / DesiredDuration * Amplitude * 1/100", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Every even shake, increase scale", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "+", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "+", + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "round(1024 * Object.Variable(__ShakeObject_DisplacementX) * Object.Variable(__ShakeObject_PercentTimeElapsedThisFrame)) / 1024" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "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", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Egal" + }, + "parameters": [ + "Object.Variable(__ShakeObject_PowerScale)", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "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", + "comment2": "" + }, + { + "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)", + "comment2": "" + }, + { + "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", + "comment2": "" + }, + { + "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": "MettreX" + }, + "parameters": [ + "Object", + "-", + "Object.Variable(__ShakeObject_DisplacementTravelledX)" + ] + }, + { + "type": { + "value": "MettreY" + }, + "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": "ChangeScale" + }, + "parameters": [ + "Object", + "-", + "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", + "comment2": "" + }, + { + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Stop shaking an object.", + "fullName": "Stop shaking an object", + "functionType": "Action", + "group": "", + "name": "StopShaking", + "private": false, + "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": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if an object is shaking.", + "fullName": "Check if an object is shaking", + "functionType": "Condition", + "group": "", + "name": "IsShaking", + "private": false, + "sentence": "_PARAM0_ is shaking", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Object", + "__ShakeObject_ShakeInProgress", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "ShakeObject::ShakeObject_PositionAngleScale", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [] + } + ] + }, + { + "author": "@4ian, Tristan Rhodes (https://victrisgames.itch.io/)", + "category": "", + "description": "Allow an object to move in a rectangular pattern.\nBy default, movement will slow down when going around corners, but this can be changed to always use a constant speed.\n\nExample uses:\n- Moveable platforms\n- Enemy movement patterns\n\nProperties:\n- Center of movement, X position\n- Center of movement, Y position\n- Horizontal distance\n- Vertical distance\n- Horizontal speed\n- Vertical speed\n- Use constant speed (object will not slow down at corners)\n- Use counter-clockwise direction\n\nTips:\n- Set the CenterX and CenterY values to move the object\n- For horizontal movement only, set vertical distance to 0\n- For vertical movement only, set horizontal distance to 0\n- Use conditions to apply logic based on the direction the object is moving. For example, setting the animation.", + "extensionNamespace": "", + "fullName": "Rectangular Movement", + "helpPath": "https://victrisgames.itch.io/extension-rectangular-movement", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNoYXBlLXJlY3RhbmdsZS1wbHVzIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LDZIMjJWOEgxOVYxMUgxN1Y4SDE0VjZIMTdWM0gxOVY2TTE3LDE3VjE0SDE5VjE5SDNWNkgxMVY4SDVWMTdIMTdaIiAvPjwvc3ZnPg==", + "name": "RectangularMovement", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", + "shortDescription": "Allow an object to move in a rectangular pattern.", + "version": "0.2.1", + "origin": { + "identifier": "RectangularMovement", + "name": "gdevelop-extension-store" + }, + "tags": [ + "rectangular", + "movement", + "rectangle", + "patrol", + "platform", + "enemy" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Allow an object to move in a rectangular pattern.", + "fullName": "Rectangular Movement", + "name": "RectangularMovement", + "objectType": "", + "eventsFunctions": [ + { + "description": "", + "fullName": "", + "functionType": "Action", + "group": "", + "name": "doStepPreEvents", + "private": false, + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Rectangular movement", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Set the center of movement to the initial location of the object", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move slowly around corners (default)", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyConstantSpeed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move Clockwise or CounterClockwise", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Horizontal movement is the same for both methods", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointX() + cos(ToRad(Object.Behavior::PropertyProgressX())) * abs(Object.Behavior::PropertyHorizontalDistance()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Vertical movement is reversed based on the parameter", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointY() + cos(ToRad(Object.Behavior::PropertyProgressY())) * abs(Object.Behavior::PropertyVerticalDistance()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointY() - cos(ToRad(Object.Behavior::PropertyProgressY())) * abs(Object.Behavior::PropertyVerticalDistance()) / 2" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate how to move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "180" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Skip if no horizontal movement is desired", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "180" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Left\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "180" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "360" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Skip if no vertical movement is desired", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "360" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Up\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Down\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "360" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "540" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Skip if no horizontal movement is desired", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "540" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Right\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "540" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "720" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta()) / 2" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Skip if no vertical movement is desired", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "720" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Down\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Up\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Reset the counter after the rectangular path is completed", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "720" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "720" + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move at a constant speed", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyConstantSpeed" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Move Clockwise or CounterClockwise", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Vertical movement is the same for both methods", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointY() - abs(Object.Behavior::PropertyVerticalDistance()) / 2 + Object.Behavior::PropertyProgressY()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointX() - abs(Object.Behavior::PropertyHorizontalDistance()) / 2 + Object.Behavior::PropertyProgressX()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "MettreX" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::PropertyCenterPointX() + abs(Object.Behavior::PropertyHorizontalDistance()) / 2 - Object.Behavior::PropertyProgressX()" + ] + } + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Calculate how to move object", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "abs(Object.Behavior::HorizontalDistance())" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "abs(Object.Behavior::PropertyHorizontalDistance())" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Left\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Right\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "1" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "abs(Object.Behavior::VerticalDistance())" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "abs(Object.Behavior::PropertyVerticalDistance())" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Down\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "2" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "abs(Object.Behavior::PropertyHorizontalSpeed() * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect when Progress crosses 0 (or if horizontal movement is disabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Right\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "RectangularMovement::RectangularMovement::PropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Left\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "3" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "-", + "abs(Object.Behavior::PropertyVerticalSpeed() * TimeDelta())" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Detect when Progress crosses 0 (or if vertical movement is disabled)", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Record direction", + "comment2": "" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Up\"" + ] + } + ] + } + ] + } + ], + "parameters": [] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Counter used to change the Y position of the object.", + "fullName": "Progress Y", + "functionType": "Expression", + "group": "", + "name": "ProgressY", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyProgressY()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Counter used to change the X position of the object.", + "fullName": "Progress X", + "functionType": "Expression", + "group": "", + "name": "ProgressX", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyProgressX()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Horizontal speed.", + "fullName": "Horizontal speed ", + "functionType": "Expression", + "group": "", + "name": "HorizontalSpeed", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalSpeed()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Vertical speed.", + "fullName": "Vertical speed", + "functionType": "Expression", + "group": "", + "name": "VerticalSpeed", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalSpeed()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Horizontal distance.", + "fullName": "Horizontal distance", + "functionType": "Expression", + "group": "", + "name": "HorizontalDistance", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyHorizontalDistance()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Vertical distance.", + "fullName": "Vertical distance", + "functionType": "Expression", + "group": "", + "name": "VerticalDistance", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyVerticalDistance()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Center of movement, X position.", + "fullName": "Center of movement, X position", + "functionType": "Expression", + "group": "", + "name": "CenterX", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterPointX()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Center of movement, Y position.", + "fullName": "Center of movement, Y position", + "functionType": "Expression", + "group": "", + "name": "CenterY", + "private": false, + "sentence": "Set initial Y of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyCenterPointY()" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Set center Y position.", + "fullName": "Set center Y position", + "functionType": "Action", + "group": "", + "name": "SetCenterY", + "private": false, + "sentence": "Set center Y position of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set center X position.", + "fullName": "Set center X position", + "functionType": "Action", + "group": "", + "name": "SetCenterX", + "private": false, + "sentence": "Set center X position of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCenterPointX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set horizontal distance.", + "fullName": "Set horizontal distance", + "functionType": "Action", + "group": "", + "name": "SetHorizontalDistance", + "private": false, + "sentence": "Set horizontal distance of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyHorizontalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set vertical distance.", + "fullName": "Set vertical distance", + "functionType": "Action", + "group": "", + "name": "SetVerticalDistance", + "private": false, + "sentence": "Set vertical distance of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyVerticalDistance" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set horizontal speed.", + "fullName": "Set horizontal speed", + "functionType": "Action", + "group": "", + "name": "SetHorizontalSpeed", + "private": false, + "sentence": "Set horizontal speed of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyHorizontalSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Set vertical speed.", + "fullName": "Set vertical speed", + "functionType": "Action", + "group": "", + "name": "SetVerticalSpeed", + "private": false, + "sentence": "Set vertical speed of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyVerticalSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Value", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Use counter-clockwise direction.", + "fullName": "Use counter-clockwise direction", + "functionType": "Action", + "group": "", + "name": "SetCounterClockwise", + "private": false, + "sentence": "Use counter-clockwise direction for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyCounterClockwise" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Counter clockwise?", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Use constant speed.", + "fullName": "Use constant speed", + "functionType": "Action", + "group": "", + "name": "SetConstantSpeed", + "private": false, + "sentence": "Use constant speed for _PARAM0_: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyConstantSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyConstantSpeed" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Make the speed constant?", + "longDescription": "", + "name": "Value", + "optional": false, + "supplementaryInformation": "", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Reset progress counters. The object will return to the initial state.", + "fullName": "Reset progress counters", + "functionType": "Action", + "group": "", + "name": "ResetProgressCounters", + "private": false, + "sentence": "Reset progress counters on _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyProgressY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "RectangularMovement::RectangularMovement::SetPropertyRectangularCounter" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is moving downwards.", + "fullName": "Object is moving downwards", + "functionType": "Condition", + "group": "", + "name": "IsMovingDown", + "private": false, + "sentence": "_PARAM0_ is moving downwards", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Down\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is moving upwards.", + "fullName": "Object is moving upwards", + "functionType": "Condition", + "group": "", + "name": "IsMovingUp", + "private": false, + "sentence": "_PARAM0_ is moving upwards", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Up\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is moving to the left.", + "fullName": "Object is moving to the left", + "functionType": "Condition", + "group": "", + "name": "IsMovingLeft", + "private": false, + "sentence": "_PARAM0_ is moving to the left", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Object is moving to the right.", + "fullName": "Object is moving to the right", + "functionType": "Condition", + "group": "", + "name": "IsMovingRight", + "private": false, + "sentence": "_PARAM0_ is moving to the right", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "RectangularMovement::RectangularMovement::PropertyCurrentDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Right\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "codeOnly": false, + "defaultValue": "", + "description": "Object", + "longDescription": "", + "name": "Object", + "optional": false, + "supplementaryInformation": "", + "type": "object" + }, + { + "codeOnly": false, + "defaultValue": "", + "description": "Behavior", + "longDescription": "", + "name": "Behavior", + "optional": false, + "supplementaryInformation": "RectangularMovement::RectangularMovement", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "300", + "type": "Number", + "label": "Horizontal speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HorizontalSpeed" + }, + { + "value": "300", + "type": "Number", + "label": "Vertical speed", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "VerticalSpeed" + }, + { + "value": "100", + "type": "Number", + "label": "Horizontal Distance: Amplitude of the movement on X axis (0 to deactivate)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "HorizontalDistance" + }, + { + "value": "100", + "type": "Number", + "label": "Vertical Distance: Amplitude of the movement on Y axis (0 to deactivate)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "VerticalDistance" + }, + { + "value": "0", + "type": "Number", + "label": "Center of movement, X position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "CenterPointX" + }, + { + "value": "0", + "type": "Number", + "label": "Center of movement, Y position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "CenterPointY" + }, + { + "value": "0", + "type": "Number", + "label": "Counter used to change X position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProgressX" + }, + { + "value": "0", + "type": "Number", + "label": "Counter used to change Y position", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ProgressY" + }, + { + "value": "0", + "type": "Number", + "label": "Counter used for rectangular movement", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "RectangularCounter" + }, + { + "value": "", + "type": "Boolean", + "label": "Use a constant speed for movement", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ConstantSpeed" + }, + { + "value": "", + "type": "Boolean", + "label": "Use counter-clockwise direction", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "CounterClockwise" + }, + { + "value": "", + "type": "Choice", + "label": "Current direction the object is moving", + "description": "", + "group": "", + "extraInformation": [ + "Left", + "Right", + "Up", + "Down" + ], + "hidden": true, + "name": "CurrentDirection" + } + ] + } + ] + } + ], + "externalLayouts": [], + "externalSourceFiles": [] +} \ No newline at end of file diff --git a/examples/PlinkoExampleGame/README.md b/examples/PlinkoExampleGame/README.md new file mode 100644 index 000000000..f340b5dea --- /dev/null +++ b/examples/PlinkoExampleGame/README.md @@ -0,0 +1,11 @@ +In this game the player drops their pachinko ball in an effort to hit as many pegs as possible to accumulate the maximum number of points. This game exhibits a scoring system, a score multiplier, the physics options, the leaderboard system, and more. + +The Plinko example showcases the physics behavior and how it along with other tools, like the object shake extension, can create a fun and juicy game. + +The example features: +-Physics engine 2.0 +-Object shake +-Particles +-Simple scoring system +-Leaderboard +-Text input object(For leaderboard name) \ No newline at end of file diff --git a/examples/PlinkoExampleGame/assets/Ball.png b/examples/PlinkoExampleGame/assets/Ball.png new file mode 100644 index 000000000..7ea6be47d Binary files /dev/null and b/examples/PlinkoExampleGame/assets/Ball.png differ diff --git a/examples/PlinkoExampleGame/assets/BallRespawn.wav b/examples/PlinkoExampleGame/assets/BallRespawn.wav new file mode 100644 index 000000000..e990decb2 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/BallRespawn.wav differ diff --git a/examples/PlinkoExampleGame/assets/ClickerBeep.wav b/examples/PlinkoExampleGame/assets/ClickerBeep.wav new file mode 100644 index 000000000..739e7e3d7 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ClickerBeep.wav differ diff --git a/examples/PlinkoExampleGame/assets/ClickerBeep2.wav b/examples/PlinkoExampleGame/assets/ClickerBeep2.wav new file mode 100644 index 000000000..178899926 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ClickerBeep2.wav differ diff --git a/examples/PlinkoExampleGame/assets/CloudLayer.png b/examples/PlinkoExampleGame/assets/CloudLayer.png new file mode 100644 index 000000000..a99c31fbc Binary files /dev/null and b/examples/PlinkoExampleGame/assets/CloudLayer.png differ diff --git a/examples/PlinkoExampleGame/assets/Darkening.png b/examples/PlinkoExampleGame/assets/Darkening.png new file mode 100644 index 000000000..fc48a6782 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/Darkening.png differ diff --git a/examples/PlinkoExampleGame/assets/DoublePeg.png b/examples/PlinkoExampleGame/assets/DoublePeg.png new file mode 100644 index 000000000..12bedd304 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/DoublePeg.png differ diff --git a/examples/PlinkoExampleGame/assets/GameOver.wav b/examples/PlinkoExampleGame/assets/GameOver.wav new file mode 100644 index 000000000..9f11c9399 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/GameOver.wav differ diff --git a/examples/PlinkoExampleGame/assets/LongMetalPanel.png b/examples/PlinkoExampleGame/assets/LongMetalPanel.png new file mode 100644 index 000000000..e450acd26 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/LongMetalPanel.png differ diff --git a/examples/PlinkoExampleGame/assets/PTSans-Bold.ttf b/examples/PlinkoExampleGame/assets/PTSans-Bold.ttf new file mode 100644 index 000000000..f82c3bda5 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/PTSans-Bold.ttf differ diff --git a/examples/PlinkoExampleGame/assets/Plinko Icon.png b/examples/PlinkoExampleGame/assets/Plinko Icon.png new file mode 100644 index 000000000..6a54a5a22 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/Plinko Icon.png differ diff --git a/examples/PlinkoExampleGame/assets/Plinko Icon2.png b/examples/PlinkoExampleGame/assets/Plinko Icon2.png new file mode 100644 index 000000000..6a54a5a22 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/Plinko Icon2.png differ diff --git a/examples/PlinkoExampleGame/assets/StonePeg.png b/examples/PlinkoExampleGame/assets/StonePeg.png new file mode 100644 index 000000000..c0b4e4aa9 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/StonePeg.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-144.png b/examples/PlinkoExampleGame/assets/android-icon-144.png new file mode 100644 index 000000000..d73c3c3e2 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-144.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-192.png b/examples/PlinkoExampleGame/assets/android-icon-192.png new file mode 100644 index 000000000..9ba9f6337 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-192.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-36.png b/examples/PlinkoExampleGame/assets/android-icon-36.png new file mode 100644 index 000000000..eb92b4933 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-36.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-48.png b/examples/PlinkoExampleGame/assets/android-icon-48.png new file mode 100644 index 000000000..0692c5b6b Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-48.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-72.png b/examples/PlinkoExampleGame/assets/android-icon-72.png new file mode 100644 index 000000000..91ff3d956 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-72.png differ diff --git a/examples/PlinkoExampleGame/assets/android-icon-96.png b/examples/PlinkoExampleGame/assets/android-icon-96.png new file mode 100644 index 000000000..09c8fb70e Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-icon-96.png differ diff --git a/examples/PlinkoExampleGame/assets/android-windowSplashScreenAnimatedIcon.png b/examples/PlinkoExampleGame/assets/android-windowSplashScreenAnimatedIcon.png new file mode 100644 index 000000000..a6e0ae5a8 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/android-windowSplashScreenAnimatedIcon.png differ diff --git a/examples/PlinkoExampleGame/assets/desktop-icon-512.png b/examples/PlinkoExampleGame/assets/desktop-icon-512.png new file mode 100644 index 000000000..130b7d088 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/desktop-icon-512.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-100.png b/examples/PlinkoExampleGame/assets/ios-icon-100.png new file mode 100644 index 000000000..30bafccf3 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-100.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-1024.png b/examples/PlinkoExampleGame/assets/ios-icon-1024.png new file mode 100644 index 000000000..07d5131b7 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-1024.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-114.png b/examples/PlinkoExampleGame/assets/ios-icon-114.png new file mode 100644 index 000000000..5b3ceda4b Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-114.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-120.png b/examples/PlinkoExampleGame/assets/ios-icon-120.png new file mode 100644 index 000000000..a73a9d04e Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-120.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-144.png b/examples/PlinkoExampleGame/assets/ios-icon-144.png new file mode 100644 index 000000000..d73c3c3e2 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-144.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-152.png b/examples/PlinkoExampleGame/assets/ios-icon-152.png new file mode 100644 index 000000000..43c04560d Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-152.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-167.png b/examples/PlinkoExampleGame/assets/ios-icon-167.png new file mode 100644 index 000000000..149096d5c Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-167.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-180.png b/examples/PlinkoExampleGame/assets/ios-icon-180.png new file mode 100644 index 000000000..dc43c75e6 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-180.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-20.png b/examples/PlinkoExampleGame/assets/ios-icon-20.png new file mode 100644 index 000000000..623fa7afc Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-20.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-29.png b/examples/PlinkoExampleGame/assets/ios-icon-29.png new file mode 100644 index 000000000..b09816cd2 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-29.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-40.png b/examples/PlinkoExampleGame/assets/ios-icon-40.png new file mode 100644 index 000000000..fde6641a8 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-40.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-50.png b/examples/PlinkoExampleGame/assets/ios-icon-50.png new file mode 100644 index 000000000..00fb9c077 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-50.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-57.png b/examples/PlinkoExampleGame/assets/ios-icon-57.png new file mode 100644 index 000000000..fd54ef7db Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-57.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-58.png b/examples/PlinkoExampleGame/assets/ios-icon-58.png new file mode 100644 index 000000000..77673a891 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-58.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-60.png b/examples/PlinkoExampleGame/assets/ios-icon-60.png new file mode 100644 index 000000000..5c81c6ed5 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-60.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-72.png b/examples/PlinkoExampleGame/assets/ios-icon-72.png new file mode 100644 index 000000000..91ff3d956 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-72.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-76.png b/examples/PlinkoExampleGame/assets/ios-icon-76.png new file mode 100644 index 000000000..c70848209 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-76.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-80.png b/examples/PlinkoExampleGame/assets/ios-icon-80.png new file mode 100644 index 000000000..4f73f8e57 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-80.png differ diff --git a/examples/PlinkoExampleGame/assets/ios-icon-87.png b/examples/PlinkoExampleGame/assets/ios-icon-87.png new file mode 100644 index 000000000..4ebe3c2d0 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/ios-icon-87.png differ diff --git a/examples/PlinkoExampleGame/assets/metalPanel.png b/examples/PlinkoExampleGame/assets/metalPanel.png new file mode 100644 index 000000000..ba91736df Binary files /dev/null and b/examples/PlinkoExampleGame/assets/metalPanel.png differ diff --git a/examples/PlinkoExampleGame/assets/starGold.png b/examples/PlinkoExampleGame/assets/starGold.png new file mode 100644 index 000000000..ff18377a0 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/starGold.png differ diff --git a/examples/PlinkoExampleGame/assets/tiled_Background2.png b/examples/PlinkoExampleGame/assets/tiled_Background2.png new file mode 100644 index 000000000..176f5acc7 Binary files /dev/null and b/examples/PlinkoExampleGame/assets/tiled_Background2.png differ diff --git a/examples/PlinkoExampleGame/thumbnail.png b/examples/PlinkoExampleGame/thumbnail.png new file mode 100644 index 000000000..482333e10 Binary files /dev/null and b/examples/PlinkoExampleGame/thumbnail.png differ