-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.json
1 lines (1 loc) · 206 KB
/
game.json
1
{"firstLayout":"","gdVersion":{"build":99,"major":4,"minor":0,"revision":0},"properties":{"adaptGameResolutionAtRuntime":true,"antialiasingMode":"MSAA","antialisingEnabledOnMobile":false,"folderProject":false,"orientation":"default","packageName":"com.toppat.caseoh","pixelsRounding":false,"projectUuid":"f077b213-a5bf-4c20-b13e-d79310c85f8b","scaleMode":"linear","sizeOnStartupMode":"","templateSlug":"","useExternalSourceFiles":false,"version":"1.0.0","name":"CASEOH: DONT GET EATEN","description":"UH OH!!!\nCaseoh wants to buy waffle house but you got there first, he challenged you to a battle. who will win?","author":"toppat inc","windowWidth":416,"windowHeight":320,"latestCompilationDirectory":"C:\\Users\\FiercePC\\OneDrive\\Documents\\GDevelop projects\\html","maxFPS":60,"minFPS":20,"verticalSync":false,"platformSpecificAssets":{"android-icon-144":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-icon-192":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-icon-36":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-icon-48":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-icon-72":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-icon-96":"05551073-8CFD-4506-A885-9327EAD382AB.webp","android-windowSplashScreenAnimatedIcon":"05551073-8CFD-4506-A885-9327EAD382AB.webp","desktop-icon-512":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-100":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-1024":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-114":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-120":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-144":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-152":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-167":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-180":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-20":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-29":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-40":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-50":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-57":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-58":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-60":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-72":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-76":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-80":"05551073-8CFD-4506-A885-9327EAD382AB.webp","ios-icon-87":"05551073-8CFD-4506-A885-9327EAD382AB.webp","liluo-thumbnail":"05551073-8CFD-4506-A885-9327EAD382AB.webp"},"loadingScreen":{"backgroundColor":0,"backgroundFadeInDuration":0.2,"backgroundImageResourceName":"82F73E87-0537-452F-8315-439588BF13B4.png","gdevelopLogoStyle":"dark","logoAndProgressFadeInDuration":0.2,"logoAndProgressLogoFadeInDelay":0.2,"minDuration":1.5,"progressBarColor":16777215,"progressBarHeight":20,"progressBarMaxWidth":200,"progressBarMinWidth":40,"progressBarWidthPercent":30,"showGDevelopSplash":false,"showProgressBar":false},"watermark":{"placement":"bottom-left","showWatermark":false},"authorIds":["iOojteg7onVaoERu7lBshZJuaHr1"],"authorUsernames":["toppat-lol"],"categories":[],"playableDevices":[],"extensionProperties":[],"platforms":[{"name":"GDevelop JS platform"}],"currentPlatform":"GDevelop JS platform"},"resources":{"resources":[{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Blue player_stand.png","kind":"image","metadata":"","name":"assets\\images\\Blue player_stand.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Blue player_magic_1.png","kind":"image","metadata":"","name":"assets\\images\\Blue player_magic_1.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Red player_stand.png","kind":"image","metadata":"","name":"assets\\images\\Red player_stand.png","smoothed":true,"userAdded":false},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Red player_magic_1.png","kind":"image","metadata":"","name":"assets\\images\\Red player_magic_1.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Green player_stand.png","kind":"image","metadata":"","name":"assets\\images\\Green player_stand.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Green player_walk_1.png","kind":"image","metadata":"","name":"assets\\images\\Green player_walk_1.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Green player_walk_2.png","kind":"image","metadata":"","name":"assets\\images\\Green player_walk_2.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/tiled_Green Floor.png","kind":"image","metadata":"","name":"assets\\images\\tiled_Green Floor.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Fire round button.png","kind":"image","metadata":"","name":"assets\\images\\Fire round button.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Target round button.png","kind":"image","metadata":"","name":"assets\\images\\Target round button.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Close round button.png","kind":"image","metadata":"","name":"assets\\images\\Close round button.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Launch round button.png","kind":"image","metadata":"","name":"assets\\images\\Launch round button.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Graveyard Background.png","kind":"image","metadata":"","name":"assets\\images\\Graveyard Background.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Red-1.png","kind":"image","metadata":"","name":"assets\\images\\Red-1.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Gray-1.png","kind":"image","metadata":"","name":"assets\\images\\Gray-1.png","smoothed":true,"userAdded":true},{"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/sounds/Hit_Hurt.wav","kind":"audio","metadata":"","name":"assets\\sounds\\Hit_Hurt.wav","preloadAsMusic":false,"preloadAsSound":false,"preloadInCache":false,"userAdded":true},{"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/sounds/Explosion.wav","kind":"audio","metadata":"","name":"assets\\sounds\\Explosion.wav","preloadAsMusic":false,"preloadAsSound":false,"preloadInCache":false,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Start button.png","kind":"image","metadata":"","name":"assets\\images\\Start button.png","smoothed":true,"userAdded":true},{"file":"assets/audio/joyful_jungle_bpm140.mp3","kind":"audio","metadata":"","name":"assets\\sounds\\Music.wav","preloadAsMusic":false,"preloadAsSound":false,"preloadInCache":false,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/square-icon.png","kind":"image","metadata":"","name":"square-icon.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Sound button_off.png","kind":"image","metadata":"","name":"assets\\images\\Sound button_off.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"https://resources.gdevelop-app.com/examples/turn-based-fighting/assets/images/Sound button_on.png","kind":"image","metadata":"","name":"assets\\images\\Sound button_on.png","smoothed":true,"userAdded":true},{"alwaysLoaded":false,"file":"assets/image/829740A4-E047-43AC-9554-792A9264D84A.webp","kind":"image","metadata":"","name":"829740A4-E047-43AC-9554-792A9264D84A.webp","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/b815c107acbe071413dcb1399eabf827e79d939d49d6694a4a1baf0f3dcb53be-829740A4-E047-43AC-9554-792A9264D84A.webp","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/081E0BF6-77DC-45C0-BB50-5767618E5361.webp","kind":"image","metadata":"","name":"081E0BF6-77DC-45C0-BB50-5767618E5361.webp","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/b815c107acbe071413dcb1399eabf827e79d939d49d6694a4a1baf0f3dcb53be-081E0BF6-77DC-45C0-BB50-5767618E5361.webp","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/06928E57-85DB-4828-BFE6-E41F7560CF4F.jpeg","kind":"image","metadata":"","name":"06928E57-85DB-4828-BFE6-E41F7560CF4F.jpeg","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/66735ad92bc5570c80d8f8a16b9e4ea0c5145fbf20abeba0ba6212b66cb645a5-06928E57-85DB-4828-BFE6-E41F7560CF4F.jpeg","name":"cloud-project-resource"}},{"file":"https://asset-resources.gdevelop.io/public-resources/Kenney Font Pack/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini.ttf","kind":"font","metadata":"","name":"Kenney Mini.ttf","userAdded":true,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Kenney Font Pack/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini.ttf","name":"gdevelop-asset-store"}},{"alwaysLoaded":false,"file":"assets/image/EE957996-3FE7-4778-9516-B5DDEF965E04.jpeg","kind":"image","metadata":"","name":"EE957996-3FE7-4778-9516-B5DDEF965E04.jpeg","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/0f233a5dda3b2c542e6296ac6d1c86f95fcf2b1a47ac95bc315365da25d4d799-EE957996-3FE7-4778-9516-B5DDEF965E04.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/0C715ADA-CBC6-49A7-B791-B305FA646020.jpeg","kind":"image","metadata":"","name":"0C715ADA-CBC6-49A7-B791-B305FA646020.jpeg","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/0dfb00d8641edcf1d7d71a22dfcab37e07adc160113f06d7e8778b98d3eb7145-0C715ADA-CBC6-49A7-B791-B305FA646020.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/FAA1E29A-A4D3-4668-9FFF-EFFDDD8E887D.jpeg","kind":"image","metadata":"","name":"FAA1E29A-A4D3-4668-9FFF-EFFDDD8E887D.jpeg","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/0f233a5dda3b2c542e6296ac6d1c86f95fcf2b1a47ac95bc315365da25d4d799-FAA1E29A-A4D3-4668-9FFF-EFFDDD8E887D.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/2019F911-B1C8-46E8-940D-DA44E409FBDA.webp","kind":"image","metadata":"","name":"2019F911-B1C8-46E8-940D-DA44E409FBDA.webp","smoothed":true,"userAdded":false,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/b815c107acbe071413dcb1399eabf827e79d939d49d6694a4a1baf0f3dcb53be-2019F911-B1C8-46E8-940D-DA44E409FBDA.webp","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/A3EDF841-375B-424D-A7F4-4C008AF07D38.png","kind":"image","metadata":"","name":"A3EDF841-375B-424D-A7F4-4C008AF07D38.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/b876723f810571ae5b4b05dbd7e3636d7f5182c83ff0cf67553c7b31ba77fa8e-A3EDF841-375B-424D-A7F4-4C008AF07D38.png","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/1C8D69EE-E881-4EFF-9C39-8F601025F0AD.jpeg","kind":"image","metadata":"","name":"1C8D69EE-E881-4EFF-9C39-8F601025F0AD.jpeg","smoothed":true,"userAdded":false,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/66735ad92bc5570c80d8f8a16b9e4ea0c5145fbf20abeba0ba6212b66cb645a5-1C8D69EE-E881-4EFF-9C39-8F601025F0AD.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/CE4AF30A-F1BD-4132-92F9-372C99789956.png","kind":"image","metadata":"","name":"CE4AF30A-F1BD-4132-92F9-372C99789956.png","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/24efbca85566a531bfbb83d640be5bff41508a192adb82986946e488a5c8b8a7-CE4AF30A-F1BD-4132-92F9-372C99789956.png","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/9E6668DE-D3DE-4320-A2D2-0F0D3E8D381D.jpeg","kind":"image","metadata":"","name":"9E6668DE-D3DE-4320-A2D2-0F0D3E8D381D.jpeg","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/778736e77b2c0dab221e14c96ed2f45d879f4a584f34ab28e756fd3cb4602048-9E6668DE-D3DE-4320-A2D2-0F0D3E8D381D.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/6d8e529f898d0d1cfc8e94ba10ae0a01e0a31b08bc0d11ec35074a34f3485f55_Transparent Button With White Blue Border_Hovered.png","kind":"image","metadata":"","name":"Transparent Button With White Blue Border_Hovered.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/6d8e529f898d0d1cfc8e94ba10ae0a01e0a31b08bc0d11ec35074a34f3485f55_Transparent Button With White Blue Border_Hovered.png","name":"Transparent Button With White Blue Border_Hovered.png"}},{"alwaysLoaded":false,"file":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/7311d88d62c25c9a5e7ed4f2031f4d58fabe564e093b203e62e467a1a995ed32_Transparent Button With White Blue Border_Idle.png","kind":"image","metadata":"","name":"Transparent Button With White Blue Border_Idle.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/7311d88d62c25c9a5e7ed4f2031f4d58fabe564e093b203e62e467a1a995ed32_Transparent Button With White Blue Border_Idle.png","name":"Transparent Button With White Blue Border_Idle.png"}},{"alwaysLoaded":false,"file":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/c18e2e342a2cce350f068208df2b7f5549dc600d2201609b1d3d76c497fffd30_Transparent Button With White Blue Border_Pressed.png","kind":"image","metadata":"","name":"Transparent Button With White Blue Border_Pressed.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/c18e2e342a2cce350f068208df2b7f5549dc600d2201609b1d3d76c497fffd30_Transparent Button With White Blue Border_Pressed.png","name":"Transparent Button With White Blue Border_Pressed.png"}},{"file":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini Square.ttf","kind":"font","metadata":"","name":"Kenney Mini Square.ttf","userAdded":false,"origin":{"identifier":"https://asset-resources.gdevelop.io/public-resources/Menu buttons/5e2e3fcc57885d5e510934e621be5f8dd7a5b6425cf46ef38073e3d2c3b04048_Kenney Mini Square.ttf","name":"Kenney Mini Square.ttf"}},{"alwaysLoaded":false,"file":"assets/image/4F92862A-8280-469F-BE20-5147889CD69A.jpeg","kind":"image","metadata":"","name":"4F92862A-8280-469F-BE20-5147889CD69A.jpeg","smoothed":true,"userAdded":false,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/0f233a5dda3b2c542e6296ac6d1c86f95fcf2b1a47ac95bc315365da25d4d799-4F92862A-8280-469F-BE20-5147889CD69A.jpeg","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/82F73E87-0537-452F-8315-439588BF13B4.png","kind":"image","metadata":"","name":"82F73E87-0537-452F-8315-439588BF13B4.png","smoothed":true,"userAdded":false,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/51c5375ba3a1b0c8b0a339d7adf4cb0b82dcd82748fb6ee98fbad9d8154900de-82F73E87-0537-452F-8315-439588BF13B4.png","name":"cloud-project-resource"}},{"alwaysLoaded":false,"file":"assets/image/05551073-8CFD-4506-A885-9327EAD382AB.webp","kind":"image","metadata":"","name":"05551073-8CFD-4506-A885-9327EAD382AB.webp","smoothed":true,"userAdded":true,"origin":{"identifier":"https://project-resources.gdevelop.io/f2d92f85-7ed2-4f2b-8109-51309e6b1583/resources/b815c107acbe071413dcb1399eabf827e79d939d49d6694a4a1baf0f3dcb53be-05551073-8CFD-4506-A885-9327EAD382AB.webp","name":"cloud-project-resource"}}],"resourceFolders":[]},"objects":[],"objectsFolderStructure":{"folderName":"__ROOT"},"objectsGroups":[],"variables":[{"name":"Mute","type":"boolean","value":false},{"folded":true,"name":"language","type":"number","value":0}],"layouts":[{"b":0,"disableInputWhenNotFocused":true,"mangledName":"Start","name":"Start","r":0,"standardSortMethod":true,"stopSoundsOnStartup":false,"title":"menu","v":0,"uiSettings":{"grid":false,"gridType":"rectangular","gridWidth":32,"gridHeight":32,"gridOffsetX":0,"gridOffsetY":0,"gridColor":10401023,"gridAlpha":0.8,"snap":false,"zoomFactor":1.1411345784329872,"windowMask":false},"objectsGroups":[],"variables":[],"instances":[{"angle":0,"customSize":true,"depth":1,"height":79,"layer":"","name":"Controls","persistentUuid":"229beced-579e-4eb6-b2ca-47bc81e9cd6c","width":429,"x":0,"y":-1,"zOrder":12,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":320,"layer":"","name":"GraveyardBackground","persistentUuid":"c4e73615-1513-4681-99a7-a8ec2e86fb94","width":416,"x":0,"y":0,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":32,"layer":"","name":"SoundButton","persistentUuid":"eefc55e6-46f1-463f-af74-fb82527c5bf8","width":32,"x":8,"y":279,"zOrder":3,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":1,"height":211,"keepRatio":true,"layer":"","name":"NewSprite","persistentUuid":"e6ccb5a3-49cf-4348-8708-29b617ee258e","width":211,"x":204,"y":57,"zOrder":9,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":1,"height":114,"keepRatio":true,"layer":"","name":"NewSprite2","persistentUuid":"5e2e5108-c463-4dc5-b218-20dbae085631","width":345,"x":123,"y":254,"zOrder":8,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":1,"height":99,"keepRatio":true,"layer":"","name":"NewSprite3","persistentUuid":"8a69c29d-5f09-42c6-bfda-2285cd77d589","width":139,"x":183,"y":271,"zOrder":7,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":1,"height":99,"keepRatio":true,"layer":"","name":"NewSprite3","persistentUuid":"268c8025-c591-4b6e-8335-f1ad0fa04922","width":139,"x":291,"y":263,"zOrder":7,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":31,"height":41,"keepRatio":true,"layer":"","name":"StartButton","persistentUuid":"aed90436-9d85-467a-9c69-e35f05f42635","width":123,"x":8,"y":89,"zOrder":10,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":30,"height":39,"keepRatio":true,"layer":"","name":"languish_button","persistentUuid":"10176995-0f87-4519-bb41-cb20354ab9f6","width":117,"x":8,"y":136,"zOrder":11,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"assetStoreId":"","bold":false,"italic":false,"name":"Controls","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[],"string":"CASEOH: DONT GET EATEN","font":"Kenney Mini.ttf","textAlignment":"","characterSize":40,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"CASEOH: DONT GET EATEN","font":"Kenney Mini.ttf","textAlignment":"","characterSize":40,"color":"0;0;0"}},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"GraveyardBackground","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"EE957996-3FE7-4778-9516-B5DDEF965E04.jpeg","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"SoundButton","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"On","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Sound button_on.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]},{"name":"Off","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Sound button_off.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"NewSprite","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"2019F911-B1C8-46E8-940D-DA44E409FBDA.webp","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[[{"x":0,"y":0},{"x":360,"y":0},{"x":360,"y":360},{"x":0,"y":360}]]}]}]}]},{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"NewSprite2","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"CE4AF30A-F1BD-4132-92F9-372C99789956.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[[{"x":0,"y":0},{"x":440,"y":0},{"x":440,"y":244},{"x":0,"y":244}]]}]}]}]},{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"NewSprite3","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"9E6668DE-D3DE-4320-A2D2-0F0D3E8D381D.jpeg","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[[{"x":0,"y":0},{"x":267,"y":0},{"x":267,"y":189},{"x":0,"y":189}]]}]}]}]},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"StartButton","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"Start","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":20,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"Start","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":20,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"languish_button","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"Language","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":20,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"Language","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":20,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Controls"},{"objectName":"GraveyardBackground"},{"objectName":"SoundButton"},{"objectName":"NewSprite"},{"objectName":"NewSprite2"},{"objectName":"NewSprite3"},{"objectName":"StartButton"},{"objectName":"languish_button"}]},"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"DepartScene"},"parameters":[""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SoundPlaying"},"parameters":["","1"]}],"actions":[{"type":{"value":"PlaySoundCanal"},"parameters":["","assets\\sounds\\Music.wav","1","yes","30","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SystemInfo::IsMobile"},"parameters":[]}],"actions":[{"type":{"value":"SetWindowSize"},"parameters":["","800","600",""]},{"type":{"value":"CenterWindow"},"parameters":[""]}]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Go to level0 when StartButton is clicked"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"KeyPressed"},"parameters":["","Space"]},{"type":{"value":"BuiltinCommonInstructions::And"},"parameters":[],"subInstructions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["StartButton",""]}]}]}],"actions":[{"type":{"value":"Scene"},"parameters":["","\"Level0\"",""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Mute Music"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"MouseButtonPressed"},"parameters":["","Left"]},{"type":{"value":"SourisSurObjet"},"parameters":["SoundButton","","",""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"ToggleGlobalVariableAsBoolean"},"parameters":["Mute"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute","True"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"PauseSoundCanal"},"parameters":["","1"]},{"type":{"value":"SetAnimationName"},"parameters":["SoundButton","\"Off\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"RePlaySoundCanal"},"parameters":["","1"]},{"type":{"value":"SetAnimationName"},"parameters":["SoundButton","\"On\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"A\"",""]}],"actions":[{"type":{"value":"Scene"},"parameters":["","\"Level0\"","yes"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Language"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarGlobal"},"parameters":["language","=","1"]}],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Controls","Text","=","\"CASEOH: NO TE DEJES COMER\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["languish_button",""]}],"actions":[{"type":{"value":"Scene"},"parameters":["","\"language\"","yes"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarGlobal"},"parameters":["language","=","2"]}],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Controls","Text","=","\"CASEOH: Laat je niet opeten\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarGlobal"},"parameters":["language","=","3"]}],"actions":[{"type":{"value":"TextContainerCapability::TextContainerBehavior::SetValue"},"parameters":["Controls","Text","=","\"CASEOH : NE VOUS FAITES PAS MANGER\""]}]}],"layers":[{"ambientLightColorB":7458536,"ambientLightColorG":150995054,"ambientLightColorR":1869182049,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":0.1,"cameraType":"perspective","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0,"viewportBottom":1,"viewportLeft":0,"viewportRight":1,"viewportTop":0,"width":0}],"effects":[]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"},{"name":"Text","type":"TextContainerCapability::TextContainerBehavior"}]},{"b":0,"disableInputWhenNotFocused":true,"mangledName":"Level0","name":"Level0","r":0,"standardSortMethod":true,"stopSoundsOnStartup":false,"title":"waffle house","v":0,"uiSettings":{"grid":false,"gridType":"rectangular","gridWidth":32,"gridHeight":32,"gridOffsetX":0,"gridOffsetY":0,"gridColor":10401023,"gridAlpha":0.8,"snap":false,"zoomFactor":1.372536783522845,"windowMask":false},"objectsGroups":[{"name":"Powers","objects":[{"name":"FireBall"},{"name":"Zombie"}]},{"name":"PlayerControls","objects":[{"name":"FireRoundButton"},{"name":"TargetRoundButton"}]}],"variables":[{"name":"State","type":"string","value":"None"},{"name":"Attack","type":"string","value":"None"},{"name":"BeenDamaged","type":"boolean","value":false},{"name":"RandomFirstTurnHelp","type":"number","value":0}],"instances":[{"angle":0,"customSize":true,"depth":0,"height":84,"layer":"","name":"Player","persistentUuid":"ada15fa9-6bf0-46fa-bb33-a43e2ef04d5c","width":58,"x":70,"y":172,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":1,"height":103,"layer":"","name":"Enemy","persistentUuid":"b894df2d-82db-47d4-a05b-4336ce7d7f9f","width":144,"x":362,"y":152,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":56,"layer":"GameOverGUI","name":"WonOrLost","persistentUuid":"2cf04ca4-71ec-4f9a-a5b1-47b2562532b6","width":320,"x":64,"y":128,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":64,"layer":"","name":"GreenFloor","persistentUuid":"f7e376b9-dfc9-42a0-92ec-6dba6a04afe1","width":416,"x":0,"y":256,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":320,"layer":"BackGround","locked":true,"name":"GraveyardBackground","persistentUuid":"e160f679-e41b-4330-99fd-db9e094a5c89","width":416,"x":0,"y":0,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":16,"layer":"UI","name":"Health","persistentUuid":"4707c9b7-500a-4e49-8c42-5497fca3c66f","width":32,"x":261,"y":113,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[{"name":"ID","type":"string","value":"Enemy"}]},{"angle":0,"customSize":true,"height":16,"layer":"UI","name":"Health","persistentUuid":"6babc5d0-fe5a-476c-ba9f-401df14eca0e","width":32,"x":104,"y":151,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[{"name":"ID","type":"string","value":"Player"}]},{"angle":0,"customSize":true,"depth":2,"height":55,"layer":"UI","name":"FireRoundButton","persistentUuid":"741e394c-bed9-41d5-9c4d-27859370d627","width":55,"x":0,"y":256,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":2,"height":58,"layer":"UI","name":"TargetRoundButton","persistentUuid":"3e1e21de-1020-4244-833a-47aa019c689e","width":58,"x":64,"y":256,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":32,"layer":"UI","name":"CloseRoundButton","persistentUuid":"678b80c6-8450-46e7-9170-524ad9ae0307","width":32,"x":384,"y":0,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":32,"layer":"GameOverGUI","name":"RestartButton","persistentUuid":"7d75ea17-a353-456c-b83d-be736ff6b277","width":32,"x":192,"y":192,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"height":320,"layer":"GameOverGUI","name":"GamerOver","persistentUuid":"5a699165-a60f-4e9c-8bb3-12f289398b35","width":416,"x":0,"y":0,"zOrder":0,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"Player","type":"Sprite","updateIfNotVisible":false,"variables":[{"name":"Health","type":"string","value":"5"},{"name":"Attack","type":"string","value":"None"}],"effects":[],"behaviors":[],"animations":[{"name":"Idle","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.07999999821186066,"sprites":[{"hasCustomCollisionMask":true,"image":"06928E57-85DB-4828-BFE6-E41F7560CF4F.jpeg","points":[{"name":"shoot","x":55,"y":31}],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[[{"x":22,"y":1},{"x":42,"y":29},{"x":21,"y":54},{"x":1,"y":29}]]}]}]},{"name":"AbilityUse","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":1,"sprites":[{"hasCustomCollisionMask":true,"image":"1C8D69EE-E881-4EFF-9C39-8F601025F0AD.jpeg","points":[{"name":"shoot","x":55,"y":31}],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[[{"x":22,"y":1},{"x":42,"y":29},{"x":21,"y":54},{"x":1,"y":29}]]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"Enemy","type":"Sprite","updateIfNotVisible":false,"variables":[{"name":"Health","type":"string","value":"5"},{"name":"AbilityUse","type":"number","value":0},{"name":"Attack","type":"string","value":"None"}],"effects":[],"behaviors":[],"animations":[{"name":"Idle","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.07999999821186066,"sprites":[{"hasCustomCollisionMask":true,"image":"829740A4-E047-43AC-9554-792A9264D84A.webp","points":[{"name":"shoot","x":53,"y":25}],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[[{"x":3,"y":1},{"x":37,"y":1},{"x":37,"y":37},{"x":3,"y":37}]]}]}]},{"name":"AbilityUse","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":1,"sprites":[{"hasCustomCollisionMask":true,"image":"081E0BF6-77DC-45C0-BB50-5767618E5361.webp","points":[{"name":"shoot","x":53,"y":25}],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[[{"x":3,"y":1},{"x":37,"y":1},{"x":37,"y":37},{"x":3,"y":37}]]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"Zombie","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[{"name":"Tween","type":"Tween::TweenBehavior"}],"animations":[{"name":"Idle","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.800000011920929,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Green player_stand.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[]}]}]},{"name":"Walk","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.20000000298023224,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Green player_walk_1.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[]},{"hasCustomCollisionMask":false,"image":"assets\\images\\Green player_walk_2.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":false,"name":"centre","x":24,"y":24},"customCollisionMask":[]}]}]}]},{"assetStoreId":"","height":128,"name":"GreenFloor","texture":"0C715ADA-CBC6-49A7-B791-B305FA646020.jpeg","type":"TiledSpriteObject::TiledSprite","width":128,"variables":[],"effects":[],"behaviors":[]},{"additive":false,"assetStoreId":"","destroyWhenNoParticles":true,"emitterAngleA":0,"emitterAngleB":10,"emitterForceMax":85,"emitterForceMin":45,"flow":45,"jumpForwardInTimeOnCreation":0,"maxParticleNb":300,"name":"FireBall","particleAlpha1":204,"particleAlpha2":0,"particleAlphaRandomness1":0,"particleAlphaRandomness2":0,"particleAngle1":0,"particleAngle2":0,"particleAngleRandomness1":0,"particleAngleRandomness2":0,"particleBlue1":51,"particleBlue2":0,"particleGravityX":0,"particleGravityY":0,"particleGreen1":51,"particleGreen2":107,"particleLifeTimeMax":0.6000000238418579,"particleLifeTimeMin":0.5,"particleRed1":255,"particleRed2":255,"particleSize1":100,"particleSize2":100,"particleSizeRandomness1":0,"particleSizeRandomness2":0,"rendererParam1":3,"rendererParam2":1,"rendererType":"Point","tank":-1,"textureParticleName":"","type":"ParticleSystem::ParticleEmitter","zoneRadius":1,"variables":[],"effects":[{"effectType":"Glow","name":"Effect","doubleParameters":{"distance":15,"innerStrength":1,"outerStrength":2},"stringParameters":{"color":"197;82;0"},"booleanParameters":{}}],"behaviors":[]},{"assetStoreId":"","bold":false,"italic":false,"name":"WonOrLost","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[],"string":"[text]","font":"Kenney Mini Square.ttf","textAlignment":"","characterSize":50,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"[text]","font":"Kenney Mini Square.ttf","textAlignment":"","characterSize":50,"color":"0;0;0"}},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"FireRoundButton","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"Fireroundbutton","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Fire round button.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"TargetRoundButton","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"Targetroundbutton","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Target round button.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"CloseRoundButton","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"Closeroundbutton","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Close round button.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"RestartButton","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"assets\\images\\Launch round button.png","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"adaptCollisionMaskAutomatically":false,"assetStoreId":"","name":"GraveyardBackground","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":true,"timeBetweenFrames":0.02500000037252903,"sprites":[{"hasCustomCollisionMask":false,"image":"FAA1E29A-A4D3-4668-9FFF-EFFDDD8E887D.jpeg","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[]}]}]}]},{"assetStoreId":"","height":32,"name":"Health","texture":"assets\\images\\Red-1.png","type":"TiledSpriteObject::TiledSprite","width":32,"variables":[{"name":"ID","type":"string","value":""}],"effects":[],"behaviors":[]},{"assetStoreId":"","height":32,"name":"GamerOver","texture":"assets\\images\\Gray-1.png","type":"TiledSpriteObject::TiledSprite","width":32,"variables":[],"effects":[],"behaviors":[]}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Player"},{"objectName":"Enemy"},{"objectName":"Zombie"},{"objectName":"GreenFloor"},{"objectName":"FireBall"},{"objectName":"WonOrLost"},{"objectName":"FireRoundButton"},{"objectName":"TargetRoundButton"},{"objectName":"CloseRoundButton"},{"objectName":"RestartButton"},{"objectName":"GraveyardBackground"},{"objectName":"Health"},{"objectName":"GamerOver"}]},"events":[{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"Beginning","source":"","type":"BuiltinCommonInstructions::Group","events":[{"folded":true,"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"DepartScene"},"parameters":[""]}],"actions":[{"type":{"value":"TextObject::SetWrapping"},"parameters":["WonOrLost",""]},{"type":{"value":"FlipX"},"parameters":["Enemy","yes"]},{"type":{"value":"TiledSpriteObject::SetOpacity"},"parameters":["GamerOver","=","196"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The player or the enemy play first at random"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"ModVarScene"},"parameters":["RandomFirstTurnHelp","=","RandomInRange(1, 2)"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarScene"},"parameters":["RandomFirstTurnHelp","=","1"]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerChoice\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarScene"},"parameters":["RandomFirstTurnHelp","=","2"]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"EnemyChoice\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Make the window bigger on computers"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SystemInfo::IsMobile"},"parameters":[]}],"actions":[{"type":{"value":"SetWindowSize"},"parameters":["","800","600",""]},{"type":{"value":"CenterWindow"},"parameters":[""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Initialize health bars"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjetTxt"},"parameters":["Health","ID","=","\"Enemy\""]}],"actions":[{"type":{"value":"TiledSpriteObject::Width"},"parameters":["Health","=","Enemy.Variable(Health) * 9"]},{"type":{"value":"SetCenterX"},"parameters":["Health","=","Enemy.CenterX() + 4"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjetTxt"},"parameters":["Health","ID","=","\"Player\""]}],"actions":[{"type":{"value":"TiledSpriteObject::Width"},"parameters":["Health","=","Player.Variable(Health) * 9"]},{"type":{"value":"SetCenterX"},"parameters":["Health","=","Player.CenterX()"]}]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"Always","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Information"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Go back to the start menu"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"KeyPressed"},"parameters":["","Escape"]},{"type":{"value":"BuiltinCommonInstructions::And"},"parameters":[],"subInstructions":[{"type":{"value":"SourisSurObjet"},"parameters":["CloseRoundButton","","",""]},{"type":{"value":"MouseButtonPressed"},"parameters":["","Left"]}]}]}],"actions":[{"type":{"value":"Scene"},"parameters":["","\"Start\"",""]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"PlayerChoice","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"In this state, the player will choose between 2 attacks.\n\nTransition to another state:\n - \"PlayerAttack\" when an attack is chosen\n \nTransitions from another state:\n- \"Beginning\" if the player is the 1st to play\n- \"EnemyAttack\" when enemy turn ends"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["State","=","\"PlayerChoice\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"None\""]},{"type":{"value":"Opacity"},"parameters":["PlayerControls","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"KeyPressed"},"parameters":["","Num1"]},{"type":{"value":"BuiltinCommonInstructions::And"},"parameters":[],"subInstructions":[{"type":{"value":"MouseButtonPressed"},"parameters":["","Left"]},{"type":{"value":"SourisSurObjet"},"parameters":["FireRoundButton","","",""]}]}]}],"actions":[{"type":{"value":"ChangeColor"},"parameters":["FireRoundButton","\"255;184;125\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerAttack\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"FireBall\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"KeyPressed"},"parameters":["","Num2"]},{"type":{"value":"BuiltinCommonInstructions::And"},"parameters":[],"subInstructions":[{"type":{"value":"MouseButtonPressed"},"parameters":["","Left"]},{"type":{"value":"SourisSurObjet"},"parameters":["TargetRoundButton","","",""]}]}]}],"actions":[{"type":{"value":"ChangeColor"},"parameters":["TargetRoundButton","\"174;255;173\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerAttack\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"Zombie\""]}]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"PlayerAttack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"In this state, a given attack animation is played and damage are done.\n\nTransition to another state:\n - \"EnemyChoice\" when the attack ends\n - \"GameOver\" if the enemy dies\n \nTransitions from another state:\n- \"PlayerChoice\" when an attack is chosen"},{"folded":true,"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["State","=","\"PlayerAttack\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Player","\"AbilityUse\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"AnimationName"},"parameters":["Player","\"AbilityUse\""]},{"type":{"value":"AnimationEnded"},"parameters":["Player"]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Player","\"Idle\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The variable \"BeenDamaged\" allows to do some actions only when a damage is done."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","False"]}]},{"colorB":32,"colorG":32,"colorR":32,"creationTime":0,"name":"Fire Ball Attack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Launch a fire ball toward the enemy"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["Attack","=","\"FireBall\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"Create"},"parameters":["","FireBall","Player.PointX(\"shoot\")","Player.PointY(\"shoot\")","\"\""]},{"type":{"value":"SetAngle"},"parameters":["FireBall","=","AngleBetweenPositions(Player.CenterX(), Player.CenterY(), Enemy.CenterX(), Enemy.CenterY())"]},{"type":{"value":"AddForceVersPos"},"parameters":["FireBall","Enemy.CenterX()","Enemy.CenterY()","200","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Explosion.wav","","2","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CollisionNP"},"parameters":["Enemy","FireBall","","",""]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"SetAnimationName"},"parameters":["Player","\"Idle\""]},{"type":{"value":"ModVarObjet"},"parameters":["Enemy","Health","-","1"]},{"type":{"value":"Delete"},"parameters":["FireBall",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"EnemyChoice\""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","10","1"]}]}]}]}],"parameters":[]},{"colorB":36,"colorG":36,"colorR":36,"creationTime":0,"name":"Zombie Attack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Invoke a zombie to attack the enemy"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["Attack","=","\"Zombie\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"Create"},"parameters":["","Zombie","128","206","\"\""]},{"type":{"value":"SetAnimationName"},"parameters":["Zombie","\"Walk\""]},{"type":{"value":"Tween::AddObjectPositionXTween"},"parameters":["Zombie","Tween","\"ZombieMove\"","261","\"linear\"","1000",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Explosion.wav","","2","0.5"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Tween::HasFinished"},"parameters":["Zombie","Tween","\"ZombieMove\""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Zombie","\"Idle\""]},{"type":{"value":"ResetObjectTimer"},"parameters":["Zombie","\"ZombieAttack\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"AnimationName"},"parameters":["Zombie","\"Idle\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","0.50"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"ModVarObjet"},"parameters":["Enemy","Health","-","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","10","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","1"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"ModVarObjet"},"parameters":["Enemy","Health","-","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","10","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","1.50"]}],"actions":[{"type":{"value":"Delete"},"parameters":["Zombie",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"EnemyChoice\""]}]}]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Update the health bar"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjetTxt"},"parameters":["Health","ID","=","\"Enemy\""]}],"actions":[{"type":{"value":"TiledSpriteObject::Width"},"parameters":["Health","=","Enemy.Variable(Health) * 5"]},{"type":{"value":"SetCenterX"},"parameters":["Health","=","Enemy.PointX(\"Center\") + 4"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Transition to \"GameOver\""},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjet"},"parameters":["Enemy","Health","<=","0"]}],"actions":[{"type":{"value":"Delete"},"parameters":["Enemy",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"GameOver\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Make a flash effect on the enemy"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"Cache"},"parameters":["Enemy"]},{"type":{"value":"ResetObjectTimer"},"parameters":["Enemy","\"Damaged\""]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Enemy","\"Damaged\"","0.2"]}],"actions":[{"type":{"value":"Montre"},"parameters":["Enemy",""]},{"type":{"value":"RemoveObjectTimer"},"parameters":["Enemy","\"Damaged\""]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"EnemyChoice","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"In this state, the enemy will choose between 2 attacks.\n\nTransition to another state:\n - \"EnemyAttack\" when an attack is chosen\n\nTransitions from another state:\n- \"Beginning\" if the enemy is the 1st to play\n- \"PlayerAttack\" when player turn ends"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["State","=","\"EnemyChoice\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"None\""]},{"type":{"value":"Opacity"},"parameters":["PlayerControls","=","100"]},{"type":{"value":"ChangeColor"},"parameters":["PlayerControls","\"255;255;255\""]},{"type":{"value":"ResetTimer"},"parameters":["","\"Enemy\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Mark a pause before choosing an attack"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Timer"},"parameters":["","1","\"Enemy\""]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"EnemyAttack\""]},{"type":{"value":"ModVarObjet"},"parameters":["Enemy","AbilityUse","=","RandomFloatInRange(0,10)"]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"70% fire balls"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjet"},"parameters":["Enemy","AbilityUse","<","7"]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"FireBall\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"30% zombies"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjet"},"parameters":["Enemy","AbilityUse",">=","7"]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"Zombie\""]}]}]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"folded":true,"name":"EnemyAttack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"In this state, a given attack animation is played and damage are done.\n\nTransition to another state:\n - \"PlayerChoice\" when the attack ends\n - \"GameOver\" if the player dies\n \nTransitions from another state:\n- \"EnemyChoice\" when an attack is chosen"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["State","=","\"EnemyAttack\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Enemy","\"AbilityUse\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"AnimationName"},"parameters":["Enemy","\"AbilityUse\""]},{"type":{"value":"AnimationEnded"},"parameters":["Enemy"]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Enemy","\"Idle\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The variable \"BeenDamaged\" allows to do some actions only when a damage is done."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","False"]}]},{"colorB":36,"colorG":36,"colorR":36,"creationTime":0,"name":"Fire Ball Attack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Launch a fire ball toward the player"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["Attack","=","\"FireBall\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"Create"},"parameters":["","FireBall","Enemy.PointX(\"shoot\")","Enemy.PointY(\"shoot\")","\"\""]},{"type":{"value":"SetAngle"},"parameters":["FireBall","=","AngleBetweenPositions(Enemy.CenterX(), Enemy.CenterY(), Player.CenterX(), Player.CenterY())"]},{"type":{"value":"AddForceVersPos"},"parameters":["FireBall","Player.CenterX()","Player.CenterY()","200","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Explosion.wav","","1","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CollisionNP"},"parameters":["Player","FireBall","","",""]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"SetAnimationName"},"parameters":["Enemy","\"Idle\""]},{"type":{"value":"ModVarObjet"},"parameters":["Player","Health","-","1"]},{"type":{"value":"Delete"},"parameters":["FireBall",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerChoice\""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","20","1"]}]}]}]}],"parameters":[]},{"colorB":36,"colorG":36,"colorR":36,"creationTime":0,"name":"Zombie Attack","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Invoke a zombie to attack the player"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["Attack","=","\"Zombie\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"Create"},"parameters":["","Zombie","261","206","\"\""]},{"type":{"value":"SetAnimationName"},"parameters":["Zombie","\"Walk\""]},{"type":{"value":"FlipX"},"parameters":["Zombie","yes"]},{"type":{"value":"Tween::AddObjectPositionXTween"},"parameters":["Zombie","Tween","\"ZombieMove\"","117","\"linear\"","1000",""]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Explosion.wav","","1","0.5"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Tween::HasFinished"},"parameters":["Zombie","Tween","\"ZombieMove\""]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetAnimationName"},"parameters":["Zombie","\"Idle\""]},{"type":{"value":"ResetObjectTimer"},"parameters":["Zombie","\"ZombieAttack\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"AnimationName"},"parameters":["Zombie","\"Idle\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","0.50"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"ModVarObjet"},"parameters":["Player","Health","-","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","10","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","1"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetSceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]},{"type":{"value":"ModVarObjet"},"parameters":["Player","Health","-","1"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GlobalVariableAsBoolean"},"parameters":["Mute",""]}],"actions":[{"type":{"value":"PlaySound"},"parameters":["","assets\\sounds\\Hit_Hurt.wav","","10","1"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Zombie","\"ZombieAttack\"","1.50"]}],"actions":[{"type":{"value":"Delete"},"parameters":["Zombie",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerChoice\""]}]}]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"SceneVariableAsBoolean"},"parameters":["BeenDamaged","True"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Update the health bar"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjetTxt"},"parameters":["Health","ID","=","\"Player\""]}],"actions":[{"type":{"value":"TiledSpriteObject::Width"},"parameters":["Health","=","Player.Variable(Health) * 5"]},{"type":{"value":"SetCenterX"},"parameters":["Health","=","Player.PointX(\"Center\")"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Transition to \"GameOver\""},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarObjet"},"parameters":["Player","Health","<=","0"]}],"actions":[{"type":{"value":"Delete"},"parameters":["Player",""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"GameOver\""]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Make a flash effect on the enemy"},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"Cache"},"parameters":["Player"]},{"type":{"value":"ResetObjectTimer"},"parameters":["Player","\"Damaged\""]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"ObjectTimer"},"parameters":["Player","\"Damaged\"","0.2"]}],"actions":[{"type":{"value":"Montre"},"parameters":["Player",""]},{"type":{"value":"RemoveObjectTimer"},"parameters":["Player","\"Damaged\""]}]}],"parameters":[]},{"colorB":0,"colorG":0,"colorR":0,"creationTime":0,"name":"GamerOver","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"In this state, a given attack animation is played and damage are done.\n\nTransition to another state:\n - \"Beginning\" when restart button is pressed\n \nTransitions from another state:\n - \"PlayerAttack\" when the enemy dies\n - \"EnemeyAttack\" when the player dies"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"VarSceneTxt"},"parameters":["State","=","\"GameOver\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"None\""]},{"type":{"value":"SetAnimationName"},"parameters":["Enemy","\"Idle\""]},{"type":{"value":"SetAnimationName"},"parameters":["Player","\"Idle\""]},{"type":{"value":"Delete"},"parameters":["Powers",""]},{"type":{"value":"Delete"},"parameters":["Health",""]},{"type":{"value":"Delete"},"parameters":["PlayerControls",""]},{"type":{"value":"ShowLayer"},"parameters":["","\"GameOverGUI\""]}],"events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Players are deleted when they die. So, the winner is the remaining one."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NbObjet"},"parameters":["Enemy","=","0"]}],"actions":[{"type":{"value":"TextObject::String"},"parameters":["WonOrLost","=","\"U won the waffle house\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"NbObjet"},"parameters":["Player","=","0"]}],"actions":[{"type":{"value":"TextObject::String"},"parameters":["WonOrLost","=","\"Caseoh ate u :(\""]}]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Transition to \"Beginning\" by relaunching the scene"},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"KeyPressed"},"parameters":["","Space"]},{"type":{"value":"BuiltinCommonInstructions::And"},"parameters":[],"subInstructions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"SourisSurObjet"},"parameters":["WonOrLost","","",""]},{"type":{"value":"SourisSurObjet"},"parameters":["RestartButton","","",""]}]},{"type":{"value":"MouseButtonPressed"},"parameters":["","Left"]}]}]}],"actions":[{"type":{"value":"Scene"},"parameters":["","CurrentSceneName()",""]}]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"RT\"",""]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerAttack\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"FireBall\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","1","\"LT\"",""]}],"actions":[{"type":{"value":"ModVarSceneTxt"},"parameters":["State","=","\"PlayerAttack\""]},{"type":{"value":"ModVarSceneTxt"},"parameters":["Attack","=","\"Zombie\""]}]}],"layers":[{"ambientLightColorB":-2147483616,"ambientLightColorG":6023216,"ambientLightColorR":11038040,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":0.1,"cameraType":"perspective","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"BackGround","renderingType":"","visibility":true,"cameras":[],"effects":[]},{"ambientLightColorB":32,"ambientLightColorG":0,"ambientLightColorR":0,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":0.1,"cameraType":"perspective","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0,"viewportBottom":1,"viewportLeft":0,"viewportRight":1,"viewportTop":0,"width":0}],"effects":[]},{"ambientLightColorB":8684304,"ambientLightColorG":6023616,"ambientLightColorR":7871664,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":0.1,"cameraType":"perspective","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"GameOverGUI","renderingType":"","visibility":false,"cameras":[],"effects":[]},{"ambientLightColorB":100663296,"ambientLightColorG":6023280,"ambientLightColorR":8347520,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":0.1,"cameraType":"perspective","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"UI","renderingType":"","visibility":true,"cameras":[],"effects":[]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"},{"name":"Text","type":"TextContainerCapability::TextContainerBehavior"},{"name":"Tween","type":"Tween::TweenBehavior"}]},{"b":0,"disableInputWhenNotFocused":true,"mangledName":"language","name":"language","r":0,"standardSortMethod":true,"stopSoundsOnStartup":true,"title":"language","v":0,"uiSettings":{"grid":false,"gridType":"rectangular","gridWidth":32,"gridHeight":32,"gridOffsetX":0,"gridOffsetY":0,"gridColor":10401023,"gridAlpha":0.8,"snap":false,"zoomFactor":1.1803350250652065,"windowMask":false},"objectsGroups":[],"variables":[],"instances":[{"angle":0,"customSize":true,"depth":1,"height":323,"keepRatio":true,"layer":"","name":"NewSprite","persistentUuid":"304fa77c-2f25-4d9e-8970-d6eaa64fce70","width":416,"x":0,"y":1,"zOrder":1,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":34,"height":45,"keepRatio":true,"layer":"","name":"english","persistentUuid":"89ce3a8a-c887-47aa-9f3b-c3b95e0176e9","width":135,"x":11,"y":15,"zOrder":2,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":34,"height":45,"keepRatio":true,"layer":"","name":"spanish","persistentUuid":"30a60f8e-bda7-44c3-929b-f855e7809ede","width":135,"x":10,"y":68,"zOrder":3,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":32,"height":42,"keepRatio":true,"layer":"","name":"DUTCH","persistentUuid":"85086ec7-fb61-4423-9ff4-b2869ee5b9d7","width":137,"x":11,"y":121,"zOrder":4,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":32,"height":42,"keepRatio":true,"layer":"","name":"FRENCH","persistentUuid":"caf4b23a-8f38-481f-bb71-9e351dce07ec","width":141,"x":9,"y":168,"zOrder":5,"numberProperties":[],"stringProperties":[],"initialVariables":[]},{"angle":0,"customSize":true,"depth":33,"height":45,"keepRatio":true,"layer":"","name":"back","persistentUuid":"c9434aeb-49c5-4f03-a5e8-9848d789a6b6","width":135,"x":276,"y":278,"zOrder":6,"numberProperties":[],"stringProperties":[],"initialVariables":[]}],"objects":[{"adaptCollisionMaskAutomatically":true,"assetStoreId":"","name":"NewSprite","type":"Sprite","updateIfNotVisible":false,"variables":[],"effects":[],"behaviors":[],"animations":[{"name":"","useMultipleDirections":false,"directions":[{"looping":false,"timeBetweenFrames":0.08,"sprites":[{"hasCustomCollisionMask":true,"image":"4F92862A-8280-469F-BE20-5147889CD69A.jpeg","points":[],"originPoint":{"name":"origine","x":0,"y":0},"centerPoint":{"automatic":true,"name":"centre","x":0,"y":0},"customCollisionMask":[[{"x":0,"y":0},{"x":229,"y":0},{"x":229,"y":220},{"x":0,"y":220}]]}]}]}]},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"english","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"ENGLISH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"ENGLISH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"spanish","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"SPANISH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"SPANISH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"DUTCH","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"DUTCH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"DUTCH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"FRENCH","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"FRENCH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"FRENCH","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}},{"assetStoreId":"f0c3d7ae6099e3b9b8beed4e30b555107550b4fb2a5879e984a014b1e06865bf","name":"back","type":"PanelSpriteButton::PanelSpriteButton","variables":[],"effects":[],"behaviors":[],"content":{"LeftPadding":0,"RightPadding":0,"PressedLabelOffsetY":4,"BottomPadding":6,"TopPadding":0,"HoveredFadeOutDuration":0},"childrenContent":{"Hovered":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Hovered.png","tiled":false,"topMargin":10,"width":192},"Idle":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Idle.png","tiled":false,"topMargin":10,"width":192},"Label":{"bold":false,"italic":false,"smoothed":true,"underlined":false,"string":"Back","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":{"b":255,"g":255,"r":255},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"Back","font":"Kenney Mini Square.ttf","textAlignment":"center","characterSize":30,"color":"255;255;255"}},"Pressed":{"bottomMargin":10,"height":64,"leftMargin":6,"rightMargin":6,"texture":"Transparent Button With White Blue Border_Pressed.png","tiled":false,"topMargin":10,"width":192}}}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"NewSprite"},{"objectName":"english"},{"objectName":"spanish"},{"objectName":"DUTCH"},{"objectName":"FRENCH"},{"objectName":"back"}]},"events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"folded":true,"name":"language","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["spanish",""]}],"actions":[{"type":{"value":"ModVarGlobal"},"parameters":["language","=","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["DUTCH",""]}],"actions":[{"type":{"value":"ModVarGlobal"},"parameters":["language","=","2"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["FRENCH",""]}],"actions":[{"type":{"value":"ModVarGlobal"},"parameters":["language","=","3"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["english",""]}],"actions":[{"type":{"value":"ModVarGlobal"},"parameters":["language","=","4"]}]}],"parameters":[]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"SoundPlaying"},"parameters":["","1"]}],"actions":[{"type":{"value":"PlaySoundCanal"},"parameters":["","assets\\sounds\\Music.wav","1","yes","30","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["back",""]}],"actions":[{"type":{"value":"Scene"},"parameters":["","\"Start\"","yes"]}]}],"layers":[{"ambientLightColorB":200,"ambientLightColorG":200,"ambientLightColorR":200,"camera3DFarPlaneDistance":10000,"camera3DFieldOfView":45,"camera3DNearPlaneDistance":3,"cameraType":"","followBaseLayerCamera":false,"isLightingLayer":false,"isLocked":false,"name":"","renderingType":"","visibility":true,"cameras":[{"defaultSize":true,"defaultViewport":true,"height":0,"viewportBottom":1,"viewportLeft":0,"viewportRight":1,"viewportTop":0,"width":0}],"effects":[{"effectType":"Scene3D::HemisphereLight","name":"3D Light","doubleParameters":{"elevation":45,"intensity":1,"rotation":0},"stringParameters":{"groundColor":"64;64;64","skyColor":"255;255;255","top":"Y-"},"booleanParameters":{}}]}],"behaviorsSharedData":[{"name":"Animation","type":"AnimatableCapability::AnimatableBehavior"},{"name":"Effect","type":"EffectCapability::EffectBehavior"},{"name":"Flippable","type":"FlippableCapability::FlippableBehavior"},{"name":"Opacity","type":"OpacityCapability::OpacityBehavior"},{"name":"Resizable","type":"ResizableCapability::ResizableBehavior"},{"name":"Scale","type":"ScalableCapability::ScalableBehavior"}]}],"externalEvents":[],"eventsFunctionsExtensions":[{"author":"","category":"User interface","extensionNamespace":"","fullName":"Panel sprite button","helpPath":"/objects/button","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K","name":"PanelSpriteButton","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg","shortDescription":"A button that can be customized.","version":"1.4.4","description":["The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.","","There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)."],"origin":{"identifier":"PanelSpriteButton","name":"gdevelop-extension-store"},"tags":["button","ui"],"authorIds":["IWykYNRvhCZBN3vEgKEbBPOR3Oc2"],"dependencies":[],"eventsFunctions":[],"eventsBasedBehaviors":[{"description":"The finite state machine used internally by the button object.","fullName":"Button finite state machine","name":"ButtonFSM","objectType":"","private":true,"eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPostEvents","sentence":"","events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Finite state machine","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"The \"Validated\" state only last one frame."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Validated\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Check position","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Make sure the cursor position is only checked once per frame."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside"},"parameters":["Object","Behavior","no"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyShouldCheckHovering"},"parameters":["Object","Behavior"]},{"type":{"value":"CollisionPoint"},"parameters":["Object","MouseOnlyCursorX(Object.Layer(), 0)","MouseOnlyCursorY(Object.Layer(), 0)"]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyMouseIsInside"},"parameters":["Object","Behavior","yes"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Touches are always pressed, so ShouldCheckHovering doesn't matter."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"},"parameters":["Object","Behavior","no"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyTouchId"},"parameters":["Object","Behavior","!=","0"]},{"type":{"value":"CollisionPoint"},"parameters":["Object","TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)","TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)"]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"},"parameters":["Object","Behavior","yes"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Handle touch start","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"HasAnyTouchOrMouseStarted"},"parameters":[""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyIndex"},"parameters":["Object","Behavior","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Repeat","repeatExpression":"StartedTouchOrMouseCount()","conditions":[],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"CollisionPoint"},"parameters":["Object","TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)","TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)"]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchId"},"parameters":["Object","Behavior","=","StartedTouchOrMouseId(Object.Behavior::PropertyIndex())"]},{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchIsInside"},"parameters":["Object","Behavior","yes"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyIndex"},"parameters":["Object","Behavior","+","1"]}]}]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Apply position changes","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PanelSpriteButton::ButtonFSM::PropertyMouseIsInside"},"parameters":["Object","Behavior"]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyMouseIsInside"},"parameters":["Object","Behavior"]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PanelSpriteButton::ButtonFSM::PropertyTouchIsInside"},"parameters":["Object","Behavior"]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"PressedOutside\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyTouchIsInside"},"parameters":["Object","Behavior"]},{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Handle touch end","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"HasTouchEnded"},"parameters":["","Object.Behavior::PropertyTouchId()"]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchId"},"parameters":["Object","Behavior","=","0"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Validated\""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]},{"type":{"inverted":true,"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Validated\""]}],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}]}]}],"parameters":[]}],"parameters":[]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onDeActivate","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::ResetState"},"parameters":["Object","Behavior",""]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Reset the state of the button.","fullName":"Reset state","functionType":"Action","name":"ResetState","private":true,"sentence":"Reset the button state of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]},{"type":{"value":"PanelSpriteButton::ButtonFSM::SetPropertyTouchId"},"parameters":["Object","Behavior","=","0"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is not used.","fullName":"Is idle","functionType":"Condition","name":"IsIdle","sentence":"_PARAM0_ is idle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Idle\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button was just clicked.","fullName":"Is clicked","functionType":"Condition","name":"IsClicked","sentence":"_PARAM0_ is clicked","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Validated\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the cursor is hovered over the button.","fullName":"Is hovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ is hovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is either hovered or pressed but not hovered.","fullName":"Is focused","functionType":"Condition","name":"IsFocused","sentence":"_PARAM0_ is focused","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"Hovered\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed with mouse or touch.","fullName":"Is pressed","functionType":"Condition","name":"IsPressed","sentence":"_PARAM0_ is pressed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedInside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed outside with mouse or touch.","fullName":"Is held outside","functionType":"Condition","name":"IsPressedOutside","sentence":"_PARAM0_ is held outside","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::PropertyState"},"parameters":["Object","Behavior","=","\"PressedOutside\""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]},{"description":"the touch id that is using the button or 0 if none.","fullName":"Touch id","functionType":"ExpressionAndCondition","name":"TouchId","sentence":"the touch id","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["Object.Behavior::PropertyTouchId()"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"PanelSpriteButton::ButtonFSM","type":"behavior"}],"objectGroups":[]}],"propertyDescriptors":[{"value":"true","type":"Boolean","label":"","description":"Should check hovering","group":"","extraInformation":[],"hidden":true,"name":"ShouldCheckHovering"},{"value":"Idle","type":"Choice","label":"State","description":"","group":"","extraInformation":["Idle","Hovered","PressedInside","PressedOutside","Validated"],"hidden":true,"name":"State"},{"value":"0","type":"Number","label":"Touch id","description":"","group":"","extraInformation":[],"hidden":true,"name":"TouchId"},{"value":"","type":"Boolean","label":"Touch is inside","description":"","group":"","extraInformation":[],"hidden":true,"name":"TouchIsInside"},{"value":"","type":"Boolean","label":"Mouse is inside","description":"","group":"","extraInformation":[],"hidden":true,"name":"MouseIsInside"},{"value":"","type":"Number","label":"","description":"","group":"","extraInformation":[],"hidden":true,"name":"Index"}],"sharedPropertyDescriptors":[]}],"eventsBasedObjects":[{"defaultName":"Button","description":"A button that can be customized.","fullName":"Button (panel sprite)","name":"PanelSpriteButton","eventsFunctions":[{"fullName":"","functionType":"Action","name":"onCreated","sentence":"","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Create one background instance for of each state.\nOnly the instance for the current state is shown."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"Create"},"parameters":["","Idle","0","0",""]},{"type":{"value":"Create"},"parameters":["","Hovered","0","0",""]},{"type":{"value":"Create"},"parameters":["","Pressed","0","0",""]},{"type":{"value":"Cache"},"parameters":["Hovered"]},{"type":{"value":"Cache"},"parameters":["Pressed"]},{"type":{"value":"ChangePlan"},"parameters":["Hovered","=","1"]}]},{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Place the label over the backgrounds."},{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"Create"},"parameters":["","Label","0","0",""]},{"type":{"value":"ChangePlan"},"parameters":["Label","=","2"]},{"type":{"value":"TextObject::SetWrapping"},"parameters":["Label","yes"]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::CenterLabel"},"parameters":["Object",""]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]}]},{"fullName":"","functionType":"Action","name":"onHotReloading","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::CenterLabel"},"parameters":["Object",""]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"doStepPostEvents","sentence":"","events":[{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Apply states","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Show the right background accordingly to the new state."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsIdle"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetCenterY"},"parameters":["Label","=","Object.CenterWithPaddingY()"]},{"type":{"value":"Montre"},"parameters":["Idle",""]},{"type":{"value":"Cache"},"parameters":["Pressed"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Visible"},"parameters":["Hovered"]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration"},"parameters":["Object",">","0"]}],"actions":[{"type":{"value":"Tween::AddObjectOpacityTween"},"parameters":["Hovered","Tween","\"Fadeout\"","0","\"linear\"","Object.PropertyHoveredFadeOutDuration() * 1000",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::PropertyHoveredFadeOutDuration"},"parameters":["Object","=","0"]}],"actions":[{"type":{"value":"Cache"},"parameters":["Hovered"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteObject::Opacity"},"parameters":["Hovered","=","0"]}],"actions":[{"type":{"value":"Cache"},"parameters":["Hovered"]},{"type":{"value":"PanelSpriteObject::SetOpacity"},"parameters":["Hovered","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsHovered"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetCenterY"},"parameters":["Label","=","Object.CenterWithPaddingY()"]},{"type":{"value":"Cache"},"parameters":["Idle"]},{"type":{"value":"Montre"},"parameters":["Hovered",""]},{"type":{"value":"Cache"},"parameters":["Pressed"]},{"type":{"value":"Tween::RemoveTween"},"parameters":["Hovered","Tween","\"Fadeout\""]},{"type":{"value":"PanelSpriteObject::SetOpacity"},"parameters":["Hovered","=","255"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsPressed"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetCenterY"},"parameters":["Label","=","Object.CenterWithPaddingY() + Object.PropertyPressedLabelOffsetY()"]},{"type":{"value":"Cache"},"parameters":["Idle"]},{"type":{"value":"Cache"},"parameters":["Hovered"]},{"type":{"value":"Montre"},"parameters":["Pressed",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsFocused"},"parameters":["Object","ButtonFSM"]},{"type":{"value":"BuiltinCommonInstructions::Once"},"parameters":[]}],"actions":[{"type":{"value":"SetCenterY"},"parameters":["Label","=","Object.CenterWithPaddingY()"]},{"type":{"value":"Cache"},"parameters":["Idle"]},{"type":{"value":"Montre"},"parameters":["Hovered",""]},{"type":{"value":"Cache"},"parameters":["Pressed"]}]}],"parameters":[]},{"colorB":228,"colorG":176,"colorR":74,"creationTime":0,"name":"Resize","source":"","type":"BuiltinCommonInstructions::Group","events":[{"type":"BuiltinCommonInstructions::Comment","color":{"b":109,"g":230,"r":255,"textB":0,"textG":0,"textR":0},"comment":"Children instances must be resized when the button size change:\n- backgrounds for each state are resized to take the full dimensions of the button\n- the label is put back at the center of the button\n\nThe scale is set back to 1 because it means that the parent instance has the same dimensions as the union of its children instances."},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BuiltinCommonInstructions::Or"},"parameters":[],"subInstructions":[{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.Width()","!=","max(Idle.BoundingBoxRight(), Label.BoundingBoxRight()) - min(Idle.BoundingBoxLeft(), Label.BoundingBoxLeft())"]},{"type":{"value":"BuiltinCommonInstructions::CompareNumbers"},"parameters":["Object.Height()","!=","max(Idle.BoundingBoxBottom(), Label.BoundingBoxBottom()) - min(Idle.BoundingBoxTop(), Label.BoundingBoxTop())"]}]}],"actions":[{"type":{"value":"ModVarObjet"},"parameters":["Idle","Width","=","Object.Width()"]},{"type":{"value":"ModVarObjet"},"parameters":["Idle","Height","=","Object.Height()"]},{"type":{"value":"PanelSpriteButton::Scale"},"parameters":["Object","=","1"]},{"type":{"value":"PanelSpriteObject::Width"},"parameters":["Background","=","Idle.Variable(Width)"]},{"type":{"value":"PanelSpriteObject::Height"},"parameters":["Background","=","Idle.Variable(Height)"]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::CenterLabel"},"parameters":["Object",""]}]}],"parameters":[]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]}]},{"description":"Check if the button is not used.","fullName":"Is idle","functionType":"Condition","name":"IsIdle","sentence":"_PARAM0_ is idle","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsIdle"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button was just clicked.","fullName":"Is clicked","functionType":"Condition","name":"IsClicked","sentence":"_PARAM0_ is clicked","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsClicked"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the cursor is hovered over the button.","fullName":"Is hovered","functionType":"Condition","name":"IsHovered","sentence":"_PARAM0_ is hovered","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsHovered"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button is either hovered or pressed but not hovered.","fullName":"Is focused","functionType":"Condition","name":"IsFocused","sentence":"_PARAM0_ is focused","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsFocused"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Check if the button is currently being pressed with mouse or touch.","fullName":"Is pressed","functionType":"Condition","name":"IsPressed","sentence":"_PARAM0_ is pressed","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::ButtonFSM::IsPressed"},"parameters":["Idle","ButtonFSM",""]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Change the text of the button label.","fullName":"Label text","functionType":"Action","name":"SetLabelText","sentence":"Change the text of _PARAM0_ to _PARAM1_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"TextObject::String"},"parameters":["Label","=","GetArgumentAsString(\"LabelText\")"]},{"type":{"value":"PanelSpriteButton::PanelSpriteButton::CenterLabel"},"parameters":["Object",""]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"},{"description":"Text","name":"LabelText","type":"string"}],"objectGroups":[]},{"description":"Return the label text.","fullName":"Label text","functionType":"StringExpression","name":"LabelText","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnString"},"parameters":["Label.String()"]}]}],"expressionType":{"type":"string"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Return the label center Y according to the button configuration. This expression is used in doStepPostEvents when the button is pressed or released.","fullName":"","functionType":"Expression","name":"CenterWithPaddingY","private":true,"sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["Idle.CenterY() + (Object.PropertyTopPadding() - Object.PropertyBottomPadding()) / 2"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]},{"description":"Center the label according to the button configuration. This is used in doStepPostEvents when the button is resized.","fullName":"","functionType":"Action","name":"CenterLabel","private":true,"sentence":"Center the label of _PARAM0_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"MettreXY"},"parameters":["Label","=","Object.PropertyLeftPadding()","=","Object.PropertyTopPadding()"]},{"type":{"value":"TextObject::WrappingWidth"},"parameters":["Label","=","Idle.Width() - Object.PropertyLeftPadding() - Object.PropertyRightPadding()"]},{"type":{"value":"SetCenterY"},"parameters":["Label","=","Object.CenterWithPaddingY()"]}],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetCenterX"},"parameters":["Label","=","Background.CenterX() + (Object.PropertyLeftPadding() - Object.PropertyRightPadding()) / 2"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsPressed"},"parameters":["Object",""]}],"actions":[{"type":{"value":"MettreY"},"parameters":["Label","+","Object.PropertyPressedLabelOffsetY()"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[{"name":"Background","objects":[{"name":"Idle"},{"name":"Hovered"},{"name":"Pressed"}]}]},{"description":"De/activate interactions with the button.","fullName":"De/activate interactions","functionType":"Action","name":"Activate","sentence":"Activate interactions with _PARAM0_: _PARAM1_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"GetArgumentAsBoolean"},"parameters":["\"ShouldActivate\""]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Idle","ButtonFSM","yes"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"GetArgumentAsBoolean"},"parameters":["\"ShouldActivate\""]}],"actions":[{"type":{"value":"ActivateBehavior"},"parameters":["Idle","ButtonFSM","no"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"},{"description":"Activate","name":"ShouldActivate","type":"yesorno"}],"objectGroups":[]},{"description":"Check if interactions are activated on the button.","fullName":"Interactions activated","functionType":"Condition","name":"IsActivated","sentence":"Interactions on _PARAM0_ are activated","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"BehaviorActivated"},"parameters":["Idle","ButtonFSM"]}],"actions":[{"type":{"value":"SetReturnBoolean"},"parameters":["True"]}]}],"parameters":[{"description":"Object","name":"Object","supplementaryInformation":"PanelSpriteButton::PanelSpriteButton","type":"object"}],"objectGroups":[]}],"propertyDescriptors":[{"value":"0","type":"Number","label":"Label offset on Y axis when pressed","description":"","group":"","extraInformation":[],"name":"PressedLabelOffsetY"},{"value":"0","type":"Number","label":"Left padding","description":"","group":"Padding","extraInformation":["Label"],"name":"LeftPadding"},{"value":"0","type":"Number","label":"Right padding","description":"","group":"Padding","extraInformation":["Label"],"name":"RightPadding"},{"value":"0","type":"Number","label":"Top padding","description":"","group":"Padding","extraInformation":["Label"],"name":"TopPadding"},{"value":"0","type":"Number","label":"Bottom padding","description":"","group":"Padding","extraInformation":["Label"],"name":"BottomPadding"},{"value":"0.25","type":"Number","label":"Hovered fade out duration (in seconds)","description":"","group":"","extraInformation":[],"name":"HoveredFadeOutDuration"}],"objects":[{"assetStoreId":"","bold":false,"italic":false,"name":"Label","smoothed":true,"type":"TextObject::Text","underlined":false,"variables":[],"effects":[],"behaviors":[],"string":"Text","font":"","textAlignment":"","characterSize":20,"color":{"b":0,"g":0,"r":0},"content":{"bold":false,"isOutlineEnabled":false,"isShadowEnabled":false,"italic":false,"outlineColor":"255;255;255","outlineThickness":2,"shadowAngle":90,"shadowBlurRadius":2,"shadowColor":"0;0;0","shadowDistance":4,"shadowOpacity":127,"smoothed":true,"underlined":false,"text":"Text","font":"","textAlignment":"","characterSize":20,"color":"0;0;0"}},{"assetStoreId":"","bottomMargin":0,"height":32,"leftMargin":0,"name":"Idle","rightMargin":0,"texture":"","tiled":false,"topMargin":0,"type":"PanelSpriteObject::PanelSprite","width":32,"variables":[{"folded":true,"name":"State","type":"string","value":"Idle"}],"effects":[],"behaviors":[{"name":"ButtonFSM","type":"PanelSpriteButton::ButtonFSM","ShouldCheckHovering":true}]},{"assetStoreId":"","bottomMargin":0,"height":32,"leftMargin":0,"name":"Hovered","rightMargin":0,"texture":"","tiled":false,"topMargin":0,"type":"PanelSpriteObject::PanelSprite","width":32,"variables":[],"effects":[],"behaviors":[{"name":"Tween","type":"Tween::TweenBehavior"}]},{"assetStoreId":"","bottomMargin":0,"height":32,"leftMargin":0,"name":"Pressed","rightMargin":0,"texture":"","tiled":false,"topMargin":0,"type":"PanelSpriteObject::PanelSprite","width":32,"variables":[],"effects":[],"behaviors":[]}],"objectsFolderStructure":{"folderName":"__ROOT","children":[{"objectName":"Label"},{"objectName":"Idle"},{"objectName":"Hovered"},{"objectName":"Pressed"}]}}]},{"author":"Bouh","category":"Input","extensionNamespace":"","fullName":"Gamepads (controllers)","helpPath":"/all-features/gamepad","iconUrl":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=","name":"Gamepads","previewIconUrl":"https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg","shortDescription":"Add support for gamepads (or other controllers) to your game, giving access to information such as button presses, axis positions, trigger pressure, etc...","version":"0.6.1","description":["Add support for gamepads (or other controllers).","","It gives access to:","- button presses","- axis positions and force","- trigger pressure","- configurable deadzone","- vibration","- automatic mappers for platformer characters and top-down movement","","The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))."],"origin":{"identifier":"Gamepads","name":"gdevelop-extension-store"},"tags":["controllers","gamepads","joysticks","axis","xbox","ps4","platformer","platform","top-down"],"authorIds":["2OwwM8ToR9dx9RJ2sAKTcrLmCB92","taRwmWxwAFYFL9yyBwB3cwBw0BO2","mnImQKdn8nQxwzkS5D6a1JB27V23"],"dependencies":[],"eventsFunctions":[{"description":"Get the value of the pressure on a gamepad trigger.","fullName":"Pressure on a gamepad trigger","functionType":"Expression","name":"TriggerPressure","sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const trigger = eventsFunctionContext.getArgument(\"trigger\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in expression: \"Pressure on a gamepad trigger\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r"," console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","switch (trigger) {\r"," case 'LT':\r"," case 'L2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r"," break;\r","\r"," case 'RT':\r"," case 'R2':\r"," eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r"," break;\r","\r"," default:\r"," eventsFunctionContext.returnValue = -1;\r"," break;\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Trigger button","name":"trigger","supplementaryInformation":"[\"LT\",\"RT\",\"L2\",\"R2\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"the force of gamepad stick (from 0 to 1).","fullName":"Stick force","functionType":"ExpressionAndCondition","name":"StickForce","sentence":"the gamepad _PARAM1_ _PARAM2_ stick force","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick force\"');\r"," return;\r","}\r","\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","\r","switch (stick) {\r"," case 'LEFT':\r"," eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId)), 0, 1);\r"," break;\r","\r"," case 'RIGHT':\r"," eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId)) + Math.abs(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId)), 0, 1);\r"," break;\r","\r"," default:\r"," eventsFunctionContext.returnValue = -1;\r"," break;\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Value of a stick rotation (deprecated)","functionType":"Expression","name":"StickRotationValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[{"type":{"value":"SetReturnNumber"},"parameters":["Gamepads::StickAngle(GetArgumentAsNumber(\"player_ID\"), GetArgumentAsString(\"stick\"))"]}]}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.","fullName":"Stick angle","functionType":"Expression","name":"StickAngle","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier is not valid in expression: \"Value of a stick rotation\"');\r"," return;\r","}\r","if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r"," return;\r","}\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","switch (stick) {\r"," case 'LEFT':\r"," eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId));\r"," break;\r","\r"," case 'RIGHT':\r"," eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId), gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId));\r"," break;\r","\r"," default:\r"," eventsFunctionContext.returnValue = -1;\r"," break;\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Get the value of axis of a gamepad stick.","fullName":"Value of a gamepad axis (deprecated)","functionType":"Expression","name":"AxisValue","private":true,"sentence":"Player _PARAM1_ push axis _PARAM2_ to _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r"," console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","let parameterError = false;\r","switch (stick) {\r"," case 'LEFT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r"," eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," }\r"," break;\r","\r"," case \"HORIZONTAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r"," break;\r","\r"," case \"VERTICAL\":\r"," eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r"," break;\r","\r"," default:\r"," break;\r"," }\r"," break;\r","\r"," default:\r"," break;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).","fullName":"Stick X force","functionType":"Expression","name":"StickForceX","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","const axisIndex = stick === 'right' ? 2 : 0;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).","fullName":"Stick Y force","functionType":"Expression","name":"StickForceY","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","if (stick != \"left\" && stick != \"right\") {\r"," console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r"," return;\r","}\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","const axisIndex = stick === 'right' ? 3 : 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Gamepad","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"Stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button released","functionType":"Condition","name":"C_Button_released","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in condition: \"Gamepad button released\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","if (button === \"\") {\r"," console.error('Parameter button is not valid in condition: \"Gamepad button released\"');\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","let buttonId;\r","\r","switch (button) {\r"," case 'A':\r"," case 'CROSS':\r"," buttonId = 0;\r"," break;\r"," case 'B':\r"," case 'CIRCLE':\r"," buttonId = 1;\r"," break;\r"," case 'X':\r"," case 'SQUARE':\r"," buttonId = 2;\r"," break;\r"," case 'Y':\r"," case 'TRIANGLE':\r"," buttonId = 3;\r"," break;\r"," case 'LB':\r"," case 'L1':\r"," buttonId = 4;\r"," break;\r"," case 'RB':\r"," case 'R1':\r"," buttonId = 5;\r"," break;\r"," case 'LT':\r"," case 'L2':\r"," buttonId = 6;\r"," break;\r"," case 'RT':\r"," case 'R2':\r"," buttonId = 7;\r"," break;\r","\r"," case 'UP':\r"," buttonId = 12;\r"," break;\r"," case 'DOWN':\r"," buttonId = 13;\r"," break;\r"," case 'LEFT':\r"," buttonId = 14;\r"," break;\r"," case 'RIGHT':\r"," buttonId = 15;\r"," break;\r","\r"," case 'BACK':\r"," case 'SHARE':\r"," buttonId = 8;\r"," break;\r"," case 'START':\r"," case 'OPTIONS':\r"," buttonId = 9;\r"," break;\r","\r"," case 'CLICK_STICK_LEFT':\r"," buttonId = 10;\r"," break;\r"," case 'CLICK_STICK_RIGHT':\r"," buttonId = 11;\r"," break;\r","\r"," //PS4\r"," case 'PS_BUTTON':\r"," buttonId = 16;\r"," break;\r"," case 'CLICK_TOUCHPAD':\r"," buttonId = 17;\r"," break;\r","\r"," default:\r"," console.error('The button: ' + button + ' in condition: \"Gamepad button released\" is not valid.');\r"," break;\r","}\r","\r","if (buttonId === undefined) {\r"," console.error('There is no buttons valid in condition: \"Gamepad button released\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r"," console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button released\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","//Define default value on pressed button or use previous value\r","gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r","\r","//Get state of button at previous frame\r","const previousStateButton = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r","\r","//When previousStateButton is true and actual button state is not pressed\r","//Player have release the button\r","if (previousStateButton === true && gamepad.buttons[buttonId].pressed === false) {\r"," // Save the last button used for the player \r"," gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r"," gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r"," eventsFunctionContext.returnValue = true;\r","\r","} else {\r"," gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r"," eventsFunctionContext.returnValue = false;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Name of the button","name":"button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the index of the last pressed button of a gamepad.","fullName":"Last pressed button (id)","functionType":"Expression","name":"LastButtonID","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["//Get function parameter\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","\r","//Player id is not valid\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in expression: \"Last pressed button (id)\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","\r","//Return the last button used by the player\r","eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].lastButtonUsed;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Check if any button is pressed on a gamepad.","fullName":"Any gamepad button pressed","functionType":"Condition","name":"C_Any_Button_pressed","sentence":"Any button of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameter\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in condition: \"Any gamepad button pressed\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","let buttonId;\r","for (let i = 0; i < gamepad.buttons.length; i++) { //For each buttons\r"," if (gamepad.buttons[i].pressed) { //One of them is pressed\r"," buttonId = i; //Save the button pressed\r"," break;\r"," }\r","}\r","\r","if (buttonId === undefined) {\r"," // No buttons are pressed.\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r"," console.error('Buttons on the gamepad are not accessible in condition: \"Any gamepad button pressed\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","//When a button is pressed, save the button in lastButtonUsed for each players\r","if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r","eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r","\r","\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Last pressed button (string)","functionType":"StringExpression","name":"LastButtonString","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in string expression: \"Last pressed button (LastButtonString)\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","if (controllerType === \"\") {\r"," console.error('Parameter controller type is not valid in string expression: \"Last pressed button (LastButtonString)\"');\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","if (gamepad !== null) { //Gamepad exist\r"," //Get last btn id\r"," const lastButtonUsedID = gdjs._extensionController.players[playerId].lastButtonUsed;\r","\r"," //Return last button as string \r"," eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r","\r","} else { //Gamepad dosen't exist\r"," console.error('Your controller is not supported or the gamepad wasn\\'t detected in string expression: \"Last pressed button (LastButtonString)\"');\r"," eventsFunctionContext.returnValue = \"Gamepad not connected\";\r","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Controller type","name":"controller_type","supplementaryInformation":"[\"Xbox\",\"PS4\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of gamepads.","fullName":"Gamepad count","functionType":"Expression","name":"GamepadCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get the last activated controller\r","const controllerId = gdjs._extensionController.lastActiveController;\r","\r","// Check if controller is active\r","const gamepad = gamepads[controllerId];\r","if (gamepad == null) {\r"," eventsFunctionContext.returnValue = 0;\r","} else {\r"," // Return active controller id\r"," eventsFunctionContext.returnValue = controllerId + 1;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".","fullName":"Gamepad button pressed","functionType":"Condition","name":"C_Button_pressed","sentence":"Button _PARAM2_ of gamepad _PARAM1_ is pressed","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in condition: \"Gamepad button pressed\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","if (button === \"\") {\r"," console.error('Parameter button is not valid in condition: \"Gamepad button pressed\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","let buttonId;\r","\r","switch (button) {\r"," case 'A':\r"," case 'CROSS':\r"," buttonId = 0;\r"," break;\r"," case 'B':\r"," case 'CIRCLE':\r"," buttonId = 1;\r"," break;\r"," case 'X':\r"," case 'SQUARE':\r"," buttonId = 2;\r"," break;\r"," case 'Y':\r"," case 'TRIANGLE':\r"," buttonId = 3;\r"," break;\r"," case 'LB':\r"," case 'L1':\r"," buttonId = 4;\r"," break;\r"," case 'RB':\r"," case 'R1':\r"," buttonId = 5;\r"," break;\r"," case 'LT':\r"," case 'L2':\r"," buttonId = 6;\r"," break;\r"," case 'RT':\r"," case 'R2':\r"," buttonId = 7;\r"," break;\r","\r"," case 'UP':\r"," buttonId = 12;\r"," break;\r"," case 'DOWN':\r"," buttonId = 13;\r"," break;\r"," case 'LEFT':\r"," buttonId = 14;\r"," break;\r"," case 'RIGHT':\r"," buttonId = 15;\r"," break;\r","\r"," case 'BACK':\r"," case 'SHARE':\r"," buttonId = 8;\r"," break;\r"," case 'START':\r"," case 'OPTIONS':\r"," buttonId = 9;\r"," break;\r","\r"," case 'CLICK_STICK_LEFT':\r"," buttonId = 10;\r"," break;\r"," case 'CLICK_STICK_RIGHT':\r"," buttonId = 11;\r"," break;\r","\r"," //PS4\r"," case 'PS_BUTTON':\r"," buttonId = 16;\r"," break;\r"," case 'CLICK_TOUCHPAD':\r"," buttonId = 17;\r"," break;\r","\r"," default:\r"," console.error('The button: ' + button + ' in condition: \"Gamepad button pressed\" is not valid.');\r"," eventsFunctionContext.returnValue = false;\r"," break;\r","}\r","\r","\r","\r","if (buttonId === undefined) {\r"," console.error('There is no buttons valid in condition: \"Gamepad button pressed\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","if (gamepad.buttons == null || gamepad.buttons[buttonId] == null) {\r"," console.error('Buttons on the gamepad are not accessible in condition: \"Gamepad button pressed\"');\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","//When a button is pressed, save the button in lastButtonUsed for each players\r","if (gamepad.buttons[buttonId].pressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r","eventsFunctionContext.returnValue = gamepad.buttons[buttonId].pressed;\r","\r","\r","\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Name of the button","name":"button","supplementaryInformation":"[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.","fullName":"Gamepad deadzone for sticks","functionType":"Expression","name":"Deadzone","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["//Get function parameter\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in expression: \"Gamepad deadzone for sticks\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","///Return the deadzone value for a given player\r","eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].deadzone;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.","fullName":"Set gamepad deadzone for sticks","functionType":"Action","name":"A_Set_deadzone","sentence":"Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["//Get function parameter\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in action: \"Set gamepad deadzone for sticks\", is not valid, must be between 0 and 4.');\r"," return;\r","}\r","\r","// clamp the newDeadzone in range [0, 1].\r","// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r","gdjs._extensionController.players[playerId].deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Deadzone for sticks, 0.2 by default (0 to 1)","name":"deadzone","type":"expression"}],"objectGroups":[]},{"description":"Check if a stick of a gamepad is pushed in a given direction.","fullName":"Gamepad stick pushed (axis)","functionType":"Condition","name":"C_Axis_pushed","sentence":"_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r","const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r","\r","if (playerId < 0 || playerId > 4) {\r"," console.error('Parameter gamepad identifier in condition: \"Gamepad stick pushed (axis)\", is not valid number, must be between 0 and 4.');\r"," return;\r","}\r","if (stick != \"LEFT\" && stick != \"RIGHT\") {\r"," console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r"," return;\r","}\r","if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r"," console.error('Parameter deadzone in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r"," return;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) {\r"," eventsFunctionContext.returnValue = false;\r"," return;\r","}\r","\r","\r","//Define in onFirstSceneLoaded function\r","const getNormalizedAxisValue = gdjs._extensionController.getNormalizedAxisValue;\r","\r","switch (stick) {\r"," case 'LEFT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'ANY':\r"," if ( getNormalizedAxisValue(gamepad.axes[0], playerId) < 0\r"," || getNormalizedAxisValue(gamepad.axes[0], playerId) > 0\r"," || getNormalizedAxisValue(gamepad.axes[1], playerId) < 0 \r"," || getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," default:\r"," console.error('The value Direction on stick Left on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r"," eventsFunctionContext.returnValue = false;\r"," break;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," switch (direction) {\r"," case 'LEFT':\r"," if (getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'RIGHT':\r"," if (getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'UP':\r"," if (getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'DOWN':\r"," if (getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," case 'ANY':\r"," if ( getNormalizedAxisValue(gamepad.axes[2], playerId) < 0\r"," || getNormalizedAxisValue(gamepad.axes[2], playerId) > 0\r"," || getNormalizedAxisValue(gamepad.axes[3], playerId) < 0 \r"," || getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r"," eventsFunctionContext.returnValue = true;\r"," return;\r"," }\r"," break;\r","\r"," default:\r"," console.error('The value Direction on stick Right on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r"," eventsFunctionContext.returnValue = false;\r"," break;\r"," }\r"," break;\r","\r"," default:\r"," console.error('The value Stick on the condition: \"Gamepad stick pushed (axis)\" is not valid.');\r"," eventsFunctionContext.returnValue = false;\r"," break;\r","}\r","\r","eventsFunctionContext.returnValue = false;\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Stick: \"Left\" or \"Right\"","name":"stick","supplementaryInformation":"[\"Left\",\"Right\"]","type":"stringWithSelector"},{"description":"Direction","name":"direction","supplementaryInformation":"[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]","type":"stringWithSelector"}],"objectGroups":[]},{"description":"Return the number of connected gamepads.","fullName":"Connected gamepads number","functionType":"Expression","name":"ConnectedGamepadsCount","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","// Gamepads can be disconnected and become null, so we have to filter them.\r","eventsFunctionContext.returnValue = Object.keys(gamepads).filter(key => !!gamepads[key]).length;\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"expression"},"parameters":[],"objectGroups":[]},{"description":"Return a string containing informations about the specified gamepad.","fullName":"Gamepad type","functionType":"StringExpression","name":"GamepadType","sentence":"Player _PARAM1_ use _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameter","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in string expression: \"Gamepad type\", is not valid number, must be between 0 and 4');"," return;","}","","const gamepad = gamepads[playerId];","","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.","if (gamepad == null) return;","","eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"expressionType":{"type":"string"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.","fullName":"Gamepad type","functionType":"Condition","name":"C_Controller_type","sentence":"Gamepad _PARAM1_ is a _PARAM2_ controller","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameters","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;","const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in condition: \"Gamepad type\", is not valid number, must be between 0 and 4.');"," return;","}","if (controllerType === \"\") {"," console.error('Parameter type in condition: \"Gamepad type\", is not a string.');"," return;","}","","const gamepad = gamepads[playerId];","","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.","if (gamepad == null) return;","","","if (controllerType == \"XBOX\") {"," eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);","} else {"," eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"},{"description":"Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)","name":"controller_type","type":"string"}],"objectGroups":[]},{"description":"Check if a gamepad is connected.","fullName":"Gamepad connected","functionType":"Condition","name":"C_Controller_X_is_connected","sentence":"Gamepad _PARAM1_ is plugged and connected","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameter","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in condition: \"Gamepad connected\", is not valid number, must be between 0 and 4.');"," return;","}","","// If gamepad was disconnected it will be null (so this will return false)","// If gamepad was never connected it will be undefined (so this will return false)","eventsFunctionContext.returnValue = !!gamepads[playerId];"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.","fullName":"Gamepad vibration","functionType":"Action","name":"A_Vibrate_controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","//Vibration work only on game in browser.","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameters","const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in action: \"Gamepad connected\", is not valid number, must be between 0 and 4.');"," return;","}","","const gamepad = gamepads[playerId];","","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.","if (gamepad == null) return;","","if (gamepad && gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: 1.0,"," strongMagnitude: 1.0"," });","}"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Player_ID","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"}],"objectGroups":[]},{"description":"Generate an advanced vibration on the specified controller. Incompatible with Firefox.","fullName":"Advanced gamepad vibration","functionType":"Action","name":"A_Advanced_Vibration_Controller","sentence":"Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","//Vibration work only on game in browser.","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameters","const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;","const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;","const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");","const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 4.');"," return;","}","if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {"," console.error('Parameter weakRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');"," return;","}","if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {"," console.error('Parameter strongRumble identifier in action: \"Advanced gamepad vibration\", is not valid number, must be between 0 and 1.');"," return;","}","","const gamepad = gamepads[playerId];","","//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.","if (gamepad == null) return;","","if (gamepad && gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: duration * 1000,"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","","gdjs._extensionController.players[playerId].rumble.duration = duration;","gdjs._extensionController.players[playerId].rumble.elapsedTime = 0;","gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;","gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Player_ID","type":"expression"},{"description":"Time of the vibration, in seconds (optional, default value is 1)","name":"Duration","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"description":"Change a vibration on the specified controller. Incompatible with Firefox.","fullName":"Change gamepad active vibration","functionType":"Action","name":"A_Change_Vibration_Magnitude","sentence":"Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */","//Vibration work only on game in browser.","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameters","const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;","const elapsedTime = gdjs._extensionController.players[playerId].rumble.elapsedTime || 0;","const originalDuration = gdjs._extensionController.players[playerId].rumble.duration || 1;","const strongRumbleMagnitude = eventsFunctionContext.getArgument(\"StrongMagnitude\");","const weakRumbleMagnitude = eventsFunctionContext.getArgument(\"WeakMagnitude\");","","","if (playerId < 0 || playerId > 4) {"," console.error('Parameter gamepad identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 4.');"," return;","}","if (weakRumbleMagnitude < 0 || weakRumbleMagnitude > 1) {"," console.error('Parameter weakRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');"," return;","}","if (strongRumbleMagnitude < 0 || strongRumbleMagnitude > 1) {"," console.error('Parameter strongRumble identifier in action: \"Change gamepad active vibration\", is not valid number, must be between 0 and 1.');"," return;","}","","const gamepad = gamepads[playerId];","","//we need keep this condition because when use have not yet plug the controller we can't get the controller in the gamepad variable.","if (gamepad == null) return;","","if (originalDuration - elapsedTime <= 0) return;","","if (gamepad && gamepad.vibrationActuator) {"," gamepad.vibrationActuator.playEffect(\"dual-rumble\", {"," startDelay: 0,"," duration: 1000 * (originalDuration - elapsedTime),"," weakMagnitude: weakRumbleMagnitude,"," strongMagnitude: strongRumbleMagnitude"," });","}","","gdjs._extensionController.players[playerId].rumble.weakMagnitude = weakRumbleMagnitude;","gdjs._extensionController.players[playerId].rumble.strongMagnitude = strongRumbleMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Player_ID","type":"expression"},{"description":"Strong rumble magnitude (from 0 to 1)","name":"StrongMagnitude","type":"expression"},{"description":"Weak rumble magnitude (from 0 to 1)","name":"WeakMagnitude","type":"expression"}],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onFirstSceneLoaded","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["//Define an new private object javascript for the gamepad extension\r","gdjs._extensionController = {\r"," players: {\r"," 0: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r"," 1: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r"," 2: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r"," 3: { mapping: 'DEFAULT', lastButtonUsed: -1, deadzone: 0.2, previousFrameStateButtons: {}, rumble: {} },\r"," },\r"," lastActiveController: -1, // Last active controller\r"," controllerButtonNames: { //Map associating controller button ids to button names\r"," \"XBOX\": {\r"," 0: \"A\",\r"," 1: \"B\",\r"," 2: \"X\",\r"," 3: \"Y\",\r"," 4: \"LB\",\r"," 5: \"RB\",\r"," 6: \"LT\",\r"," 7: \"RT\",\r"," 8: \"BACK\",\r"," 9: \"START\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"NONE\",\r"," 17: \"NONE\"\r"," },\r"," \"PS4\": {\r"," 0: \"CROSS\",\r"," 1: \"CIRCLE\",\r"," 2: \"SQUARE\",\r"," 3: \"TRIANGLE\",\r"," 4: \"L1\",\r"," 5: \"R1\",\r"," 6: \"L2\",\r"," 7: \"R2\",\r"," 8: \"SHARE\",\r"," 9: \"OPTIONS\",\r"," 10: \"CLICK_STICK_LEFT\",\r"," 11: \"CLICK_STICK_RIGHT\",\r"," 12: \"UP\",\r"," 13: \"DOWN\",\r"," 14: \"LEFT\",\r"," 15: \"RIGHT\",\r"," 16: \"PS_BUTTON\",\r"," 17: \"CLICK_TOUCHPAD\"\r"," }\r"," }\r","};\r","\r","gdjs._extensionController.getInputString = function (type, buttonId) {\r"," const controllerButtonNames = gdjs._extensionController.controllerButtonNames;\r"," if (controllerButtonNames[type] !== undefined) {\r"," return controllerButtonNames[type][buttonId];\r"," }\r","\r"," return \"UNKNOWN_BUTTON\";\r","}\r","\r","gdjs._extensionController.axisToAngle = function (deltaX, deltaY) {\r"," const rad = Math.atan2(deltaY, deltaX);\r"," const deg = rad * (180 / Math.PI);\r"," return deg;\r","}\r","\r","gdjs._extensionController.isXbox = function (gamepad) {\r"," return (gamepad ? (\r"," gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r"," // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r"," // name reported in Firefox corresponding to the driver being used by the controller\r"," // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r"," ) : false);\r","}\r","\r","//Returns the new value taking into account the dead zone for the player_ID given\r","gdjs._extensionController.getNormalizedAxisValue = function (v, player_ID) {\r"," // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r","\r"," // Anything smaller than this is assumed to be 0,0\r"," const DEADZONE = gdjs._extensionController.players[player_ID].deadzone;\r","\r"," if (Math.abs(v) < DEADZONE) {\r"," // In the dead zone, set to 0\r"," v = 0;\r","\r"," if (v == null) {\r"," return 0;\r"," } else {\r"," return v;\r"," }\r","\r"," } else {\r"," // We're outside the dead zone, but we'd like to smooth\r"," // this value out so it still runs nicely between 0..1.\r"," // That is, we don't want it to jump suddenly from 0 to\r"," // DEADZONE.\r","\r"," // Remap v from\r"," // DEADZONE..1 to 0..(1-DEADZONE)\r"," // or from\r"," // -1..-DEADZONE to -(1-DEADZONE)..0\r","\r"," v = v - Math.sign(v) * DEADZONE;\r","\r"," // Remap v from\r"," // 0..(1-DEADZONE) to 0..1\r"," // or from\r"," // -(1-DEADZONE)..0 to -1..0\r","\r"," return v / (1 - DEADZONE);\r"," }\r","};"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"fullName":"","functionType":"Action","name":"onScenePostEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["//Each time a player press a button i save the last button pressed for the next frame","/** @type {Gamepad[]} */","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);","","//Get function parameter","let countPlayers = Object.keys(gdjs._extensionController.players).length;","","//Repeat for each players","for (let i = 0; i < countPlayers; i++) {"," let gamepad = gamepads[i]; // Get the gamepad of the player",""," //We have to keep this condition because if the user hasn't plugged in his controller yet, we can't get the controller in the gamepad variable."," if (gamepad == null) {"," continue;"," }",""," for (let b = 0; b < Object.keys(gamepad.buttons).length; b++) { //For each buttons"," if (gamepad.buttons[b].pressed) { //One of them is pressed"," gdjs._extensionController.players[i].lastButtonUsed = b; //Save the button pressed",""," //Save the state of the button for the next frame."," gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: true };",""," // Update Last Active Controller"," gdjs._extensionController.lastActiveController = i;"," } else {"," gdjs._extensionController.players[i].previousFrameStateButtons[b] = { pressed: false };"," }"," }","",""," gdjs._extensionController.players[i].rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;"," if ("," gdjs._extensionController.players[i].rumble.duration - gdjs._extensionController.players[i].rumble.elapsedTime <= 0 &&"," (gdjs._extensionController.players[i].rumble.weakMagnitude || gdjs._extensionController.players[i].rumble.strongMagnitude)"," ) {"," gdjs._extensionController.players[i].rumble.weakMagnitude = 0;"," gdjs._extensionController.players[i].rumble.strongMagnitude = 0;"," }","","","}",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[],"objectGroups":[]},{"description":"Check if any button is released on a gamepad.","fullName":"Any gamepad button released","functionType":"Condition","name":"C_any_button_released","sentence":"Any button of gamepad _PARAM1_ is released","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[],"actions":[]},{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["/** @type {Gamepad[]} */\r","const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []);\r","\r","//Get function parameters\r","const playerId = eventsFunctionContext.getArgument(\"player_ID\") - 1;\r","\r","if (playerId < 0 || playerId > 4) {\r","\tconsole.error('Parameter gamepad identifier in condition: \"Any gamepad button released\", is not valid number, must be between 0 and 4.');\r","\treturn;\r","}\r","\r","const gamepad = gamepads[playerId];\r","\r","//we need keep this condition because when use have not yet plug her controller we can't get the controller in the gamepad variable.\r","if (gamepad == null) return;\r","\r","for (let buttonId = 0; buttonId < gamepad.buttons.length; buttonId++) { //For each buttons on current frame.\r","\r","\tif (buttonId === undefined) {\r","\t\teventsFunctionContext.returnValue = false;\r","\t\treturn;\r","\t}\r","\r","\t//Get previous value or define value by default for the current button\r","\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId] || { pressed: false };\r","\r","\t//Get state of the button at previous frame\r","\tconst previousStateButtonIsPressed = gdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed;\r","\r","\t//Get the state of the button on the current frame.\r","\tconst currentFrameStateButtonIsPressed = gamepad.buttons[buttonId].pressed;\r","\r","\t//When previousStateButtonIsPressed is true and actual button state is not pressed\r","\t//Player have release the button\r","\tif (previousStateButtonIsPressed === true && currentFrameStateButtonIsPressed === false) {\r","\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = true;\r","\t\teventsFunctionContext.returnValue = true;\r","\t\t//break;\r","\t\treturn;\r","\t} else {\r","\t\t//The player didn't released the button yet, the previous frame state is still true\r","\t\tgdjs._extensionController.players[playerId].previousFrameStateButtons[buttonId].pressed = false;\r","\t\teventsFunctionContext.returnValue = false;\r","\t}\r","\r","\tif (currentFrameStateButtonIsPressed) gdjs._extensionController.players[playerId].lastButtonUsed = buttonId;\r","}\r",""],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":true}],"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"player_ID","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the weak vibration motor on the gamepad of a player.","fullName":"Weak rumble magnitude","functionType":"Expression","name":"WeakVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.weakMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Player_ID","type":"expression"}],"objectGroups":[]},{"description":"Return the strength of the strong vibration motor on the gamepad of a player.","fullName":"Strong rumble magnitude","functionType":"Expression","name":"StrongVibrationMagnitude","sentence":"","events":[{"type":"BuiltinCommonInstructions::JsCode","inlineCode":["const playerId = eventsFunctionContext.getArgument(\"Player_ID\") - 1;\r","eventsFunctionContext.returnValue = gdjs._extensionController.players[playerId].rumble.strongMagnitude;"],"parameterObjects":"","useStrict":true,"eventsSheetExpanded":false}],"expressionType":{"type":"expression"},"parameters":[{"description":"The gamepad identifier: 1, 2, 3 or 4","name":"Player_ID","type":"expression"}],"objectGroups":[]}],"eventsBasedBehaviors":[{"description":"Control a platformer character with a gamepad.","fullName":"Platformer gamepad mapper","name":"PlatformerGamepadMapper","objectType":"","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseArrows"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseRightStick"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateLeftKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateRightKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateUpKey"},"parameters":["Object","PlatformerCharacter"]},{"type":{"value":"PlatformBehavior::SimulateLadderKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateDownKey"},"parameters":["Object","PlatformerCharacter"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"A or Cross\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"A\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"B or Circle\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"B\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"X or Square\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"X\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"Y or Triangle\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Y\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"LB or L1\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"LB\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"RB or R1\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"RB\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"LT or L2\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"LT\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyJumpButton"},"parameters":["Object","Behavior","=","\"RT or R2\""]},{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"RT\"","\"Left\""]}],"actions":[{"type":{"value":"PlatformBehavior::SimulateJumpKey"},"parameters":["Object","PlatformerCharacter"]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::PlatformerGamepadMapper","type":"behavior"}],"objectGroups":[]}],"propertyDescriptors":[{"value":"","type":"Behavior","label":"Platformer character behavior","description":"","group":"","extraInformation":["PlatformBehavior::PlatformerObjectBehavior"],"name":"PlatformerCharacter"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","description":"","group":"","extraInformation":[],"name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","description":"","group":"Controls","extraInformation":[],"name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","description":"","group":"Controls","extraInformation":[],"name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","description":"","group":"Controls","extraInformation":[],"name":"UseRightStick"},{"value":"A or Cross","type":"Choice","label":"Jump button","description":"","group":"Controls","extraInformation":["A or Cross","B or Circle","X or Square","Y or Triangle","LB or L1","RB or R1","LT or L2","RT or R2"],"name":"JumpButton"}],"sharedPropertyDescriptors":[]},{"description":"Control a top-down character with a gamepad.","fullName":"Top-down gamepad mapper","name":"TopDownGamepadMapper","objectType":"","eventsFunctions":[{"fullName":"","functionType":"Action","name":"doStepPreEvents","sentence":"","events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Controller_X_is_connected"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseArrows"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Up\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Button_pressed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Down\"","\"Left\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")","Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")","sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\"))"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Left\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::PlatformerGamepadMapper::PropertyUseRightStick"},"parameters":["Object","Behavior"]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"Analog\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")","Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"360°\""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateStick"},"parameters":["Object","TopDownMovement","sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\"))","1"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::TopDownGamepadMapper::PropertyStickMode"},"parameters":["Object","Behavior","=","\"8 Directions\""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Left\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateLeftKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Right\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateRightKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Up\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateUpKey"},"parameters":["Object","TopDownMovement"]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"Gamepads::C_Axis_pushed"},"parameters":["","Object.Behavior::PropertyGamepadIdentifier()","\"Right\"","\"Down\"",""]}],"actions":[{"type":{"value":"TopDownMovementBehavior::SimulateDownKey"},"parameters":["Object","TopDownMovement"]}]}]}]}]}],"parameters":[{"description":"Object","name":"Object","type":"object"},{"description":"Behavior","name":"Behavior","supplementaryInformation":"Gamepads::TopDownGamepadMapper","type":"behavior"}],"objectGroups":[]}],"propertyDescriptors":[{"value":"","type":"Behavior","label":"Top-down movement behavior","description":"","group":"","extraInformation":["TopDownMovementBehavior::TopDownMovementBehavior"],"name":"TopDownMovement"},{"value":"1","type":"Number","label":"Gamepad identifier (1, 2, 3 or 4)","description":"","group":"","extraInformation":[],"name":"GamepadIdentifier"},{"value":"true","type":"Boolean","label":"Use directional pad","description":"","group":"Controls","extraInformation":[],"name":"UseArrows"},{"value":"true","type":"Boolean","label":"Use left stick","description":"","group":"Controls","extraInformation":[],"name":"UseLeftStick"},{"value":"","type":"Boolean","label":"Use right stick","description":"","group":"Controls","extraInformation":[],"name":"UseRightStick"},{"value":"Analog","type":"Choice","label":"Stick mode","description":"","group":"Controls","extraInformation":["Analog","360°","8 Directions"],"name":"StickMode"}],"sharedPropertyDescriptors":[]}],"eventsBasedObjects":[]}],"externalLayouts":[],"externalSourceFiles":[]}