diff --git a/examples/crazygames-sdk-demo/README.md b/examples/crazygames-sdk-demo/README.md index 54121e512..c7376106d 100644 --- a/examples/crazygames-sdk-demo/README.md +++ b/examples/crazygames-sdk-demo/README.md @@ -1 +1 @@ -Showcase all the features from the CrazyGames SDK extension. The project can be exported as HTML5 game to be imported in the QA tools on CrazyGames website. \ No newline at end of file +Showcase all the features from the CrazyGames SDK V3 extension. The project can be exported as HTML5 game to be imported in the QA tools on CrazyGames website. \ No newline at end of file diff --git a/examples/crazygames-sdk-demo/TAGS.md b/examples/crazygames-sdk-demo/TAGS.md new file mode 100644 index 000000000..7a90342a7 --- /dev/null +++ b/examples/crazygames-sdk-demo/TAGS.md @@ -0,0 +1 @@ +advanced diff --git a/examples/crazygames-sdk-demo/assets/font/CantoraOne-Regular.ttf b/examples/crazygames-sdk-demo/assets/font/CantoraOne-Regular.ttf new file mode 100644 index 000000000..57446a27a Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/font/CantoraOne-Regular.ttf differ diff --git a/examples/crazygames-sdk-demo/assets/Annotation.png b/examples/crazygames-sdk-demo/assets/image/Annotation.png similarity index 100% rename from examples/crazygames-sdk-demo/assets/Annotation.png rename to examples/crazygames-sdk-demo/assets/image/Annotation.png diff --git a/examples/crazygames-sdk-demo/assets/Grey Button_Hovered.png b/examples/crazygames-sdk-demo/assets/image/Grey Button_Hovered.png similarity index 100% rename from examples/crazygames-sdk-demo/assets/Grey Button_Hovered.png rename to examples/crazygames-sdk-demo/assets/image/Grey Button_Hovered.png diff --git a/examples/crazygames-sdk-demo/assets/Grey Button_Idle.png b/examples/crazygames-sdk-demo/assets/image/Grey Button_Idle.png similarity index 100% rename from examples/crazygames-sdk-demo/assets/Grey Button_Idle.png rename to examples/crazygames-sdk-demo/assets/image/Grey Button_Idle.png diff --git a/examples/crazygames-sdk-demo/assets/Grey Button_Pressed.png b/examples/crazygames-sdk-demo/assets/image/Grey Button_Pressed.png similarity index 100% rename from examples/crazygames-sdk-demo/assets/Grey Button_Pressed.png rename to examples/crazygames-sdk-demo/assets/image/Grey Button_Pressed.png diff --git a/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Hovered.png b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Hovered.png new file mode 100644 index 000000000..308ed0591 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Hovered.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Idle.png b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Idle.png new file mode 100644 index 000000000..6ec6b334c Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Idle.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Pressed.png b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Pressed.png new file mode 100644 index 000000000..0a599e395 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Red Button With Shadow_Pressed.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Yellow Button_Hovered.png b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Hovered.png new file mode 100644 index 000000000..9bb3ab612 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Hovered.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Yellow Button_Idle.png b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Idle.png new file mode 100644 index 000000000..86bf6cf37 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Idle.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Yellow Button_Pressed.png b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Pressed.png new file mode 100644 index 000000000..ff0195f73 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Yellow Button_Pressed.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/Ziggy_Default.png b/examples/crazygames-sdk-demo/assets/image/Ziggy_Default.png new file mode 100644 index 000000000..d2283385b Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/Ziggy_Default.png differ diff --git a/examples/crazygames-sdk-demo/assets/image/thumbnail.png b/examples/crazygames-sdk-demo/assets/image/thumbnail.png new file mode 100644 index 000000000..a8a32d4d5 Binary files /dev/null and b/examples/crazygames-sdk-demo/assets/image/thumbnail.png differ diff --git a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json index 3560cb5ca..ff6c3a0d1 100644 --- a/examples/crazygames-sdk-demo/crazygames-sdk-demo.json +++ b/examples/crazygames-sdk-demo/crazygames-sdk-demo.json @@ -1,9 +1,9 @@ { - "firstLayout": "Demo", + "firstLayout": "Menu", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 224, + "major": 5, + "minor": 5, "revision": 0 }, "properties": { @@ -11,21 +11,20 @@ "antialiasingMode": "MSAA", "antialisingEnabledOnMobile": false, "folderProject": false, - "orientation": "landscape", + "orientation": "default", "packageName": "com.example.gamename", "pixelsRounding": false, - "projectUuid": "5b6ebfba-f696-40ad-874d-95b0f7865957", + "projectUuid": "011f8202-ef01-4325-bc45-c795e8c9f490", "scaleMode": "linear", - "sizeOnStartupMode": "adaptHeight", + "sizeOnStartupMode": "", "templateSlug": "crazygames-sdk-demo", - "useExternalSourceFiles": false, "version": "1.0.0", - "name": "Kindhearted Society (Crazygames sdk demo)", + "name": "CrazyGames sdk v3 demo", "description": "A demo of the various functionalities developed for CrazyGames games.", "author": "", "windowWidth": 1128, - "windowHeight": 615, - "latestCompilationDirectory": "C:\\Users\\RTX-Bouh\\Downloads\\Nouveau dossier", + "windowHeight": 800, + "latestCompilationDirectory": "", "maxFPS": 60, "minFPS": 20, "verticalSync": false, @@ -50,9 +49,10 @@ "placement": "bottom-left", "showWatermark": true }, - "authorIds": [], + "authorIds": [ + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92" + ], "authorUsernames": [ - "GDevelop", "Bouh" ], "categories": [], @@ -68,8 +68,7 @@ "resources": { "resources": [ { - "alwaysLoaded": false, - "file": "assets/Grey Button_Hovered.png", + "file": "assets/image/Grey Button_Hovered.png", "kind": "image", "metadata": "", "name": "Grey Button_Hovered.png", @@ -81,8 +80,7 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Grey Button_Idle.png", + "file": "assets/image/Grey Button_Idle.png", "kind": "image", "metadata": "", "name": "Grey Button_Idle.png", @@ -94,8 +92,7 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Grey Button_Pressed.png", + "file": "assets/image/Grey Button_Pressed.png", "kind": "image", "metadata": "", "name": "Grey Button_Pressed.png", @@ -107,20 +104,200 @@ } }, { - "alwaysLoaded": false, - "file": "assets/Annotation.png", + "file": "assets/image/Annotation.png", "kind": "image", "metadata": "", "name": "Annotation.png", "smoothed": true, "userAdded": true + }, + { + "file": "assets/image/Ziggy_Default.png", + "kind": "image", + "metadata": "", + "name": "Ziggy_Default.png", + "smoothed": true, + "userAdded": true + }, + { + "file": "assets/image/Red Button With Shadow_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/71ee2c8d8b72808c7f084252cd36c80c44bc07655a3729e5fe7459c634007e8a_Red Button With Shadow_Hovered.png", + "name": "Red Button With Shadow_Hovered.png" + } + }, + { + "file": "assets/image/Red Button With Shadow_Idle.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/6c6bf020fb86d99a9ecc993f8b90064d73d757bc2408050cf353c84bc36f6be2_Red Button With Shadow_Idle.png", + "name": "Red Button With Shadow_Idle.png" + } + }, + { + "file": "assets/image/Red Button With Shadow_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Red Button With Shadow_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b9ce526450d48adedb6875043465ae168fff1f6b01dd1ff7f43b7e7c1568cc21_Red Button With Shadow_Pressed.png", + "name": "Red Button With Shadow_Pressed.png" + } + }, + { + "file": "assets/font/CantoraOne-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "CantoraOne-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/05b0c1364a92b436b86ca819e66b63480d1bc2fb399f6c0cf8bffbf8199ccc2a_CantoraOne-Regular.ttf", + "name": "CantoraOne-Regular.ttf" + } + }, + { + "file": "assets/image/Yellow Button_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Hovered.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/c1e14acb64b9963341656c997853154dc4c86cd1c46fb12bfbe012d99712ef61_Yellow Button_Hovered.png", + "name": "Yellow Button_Hovered.png" + } + }, + { + "file": "assets/image/Yellow Button_Idle.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Idle.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/1cacfd123a1eb708837337c27982f6871f5127c5890dbf0775e0f411958fcbf1_Yellow Button_Idle.png", + "name": "Yellow Button_Idle.png" + } + }, + { + "file": "assets/image/Yellow Button_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Yellow Button_Pressed.png", + "smoothed": true, + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/928c3ea4db1da835c9f8cc5b7089a47228350209d2ff489e1484c31e5ce41b3d_Yellow Button_Pressed.png", + "name": "Yellow Button_Pressed.png" + } } ], "resourceFolders": [] }, - "objects": [], + "objects": [ + { + "assetStoreId": "5faf2b0415c271fa6e747283ed36297a95f04d2b6c477a7b011775fa6fb444ee", + "name": "Back_button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 3, + "BottomPadding": 32, + "TopPadding": 32, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Hovered.png", + "tiled": false, + "topMargin": 16, + "width": 192 + }, + "Idle": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Idle.png", + "tiled": false, + "topMargin": 16, + "width": 192 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Back", + "font": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "CantoraOne-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "color": "255;255;255" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 69, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Red Button With Shadow_Pressed.png", + "tiled": false, + "topMargin": 16, + "width": 192 + } + } + } + ], "objectsFolderStructure": { - "folderName": "__ROOT" + "folderName": "__ROOT", + "children": [ + { + "objectName": "Back_button" + } + ] }, "objectsGroups": [], "variables": [], @@ -128,24 +305,24 @@ { "b": 51, "disableInputWhenNotFocused": true, - "mangledName": "Demo", - "name": "Demo", + "mangledName": "Menu", + "name": "Menu", "r": 33, "standardSortMethod": true, "stopSoundsOnStartup": true, - "title": "", + "title": "Menu", "v": 34, "uiSettings": { "grid": false, "gridType": "rectangular", - "gridWidth": 64, - "gridHeight": 53, + "gridWidth": 32, + "gridHeight": 32, "gridOffsetX": 0, "gridOffsetY": 0, "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.9610368693714723, + "zoomFactor": 0.6854852482256868, "windowMask": false }, "objectsGroups": [], @@ -154,30 +331,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, - "layer": "", - "name": "Show_midgame_ad", - "persistentUuid": "d3fd78a3-7025-4225-b2d2-19ed371669d2", - "width": 211, - "x": 18, - "y": 415, - "zOrder": 1, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 25, - "height": 85, + "depth": 48, + "height": 106, "layer": "", - "name": "Show_rewarded_ad", - "persistentUuid": "3dbf1643-c3cb-4f45-8a14-9f392c4c82cc", - "width": 211, - "x": 18, - "y": 519, + "name": "VideoAds", + "persistentUuid": "4882816d-761d-4ad1-bb87-32a1fdb0610b", + "width": 571, + "x": 256, + "y": 160, "zOrder": 2, "numberProperties": [], "stringProperties": [], @@ -185,15 +346,14 @@ }, { "angle": 0, - "customSize": true, - "depth": 25, - "height": 85, + "customSize": false, + "height": 0, "layer": "", - "name": "Check_adblock", - "persistentUuid": "98fdc3a1-2eb5-42fb-bb15-51506dcd04a5", - "width": 206, - "x": 18, - "y": 312, + "name": "Title", + "persistentUuid": "f05b434d-bf77-4b22-8655-3a496e99763c", + "width": 0, + "x": 267, + "y": 35, "zOrder": 3, "numberProperties": [], "stringProperties": [], @@ -202,14 +362,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 1, + "height": 118, "layer": "", - "name": "Request_banners", - "persistentUuid": "042d641a-94a3-4db8-935b-fee3cfe2294c", - "width": 200, - "x": 243, - "y": 414, + "name": "Logo", + "persistentUuid": "f8340c0b-a25f-47e0-9f5e-4d823f0aa043", + "width": 235, + "x": 14, + "y": 18, "zOrder": 4, "numberProperties": [], "stringProperties": [], @@ -218,14 +378,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 74, + "height": 106, "layer": "", - "name": "Hide_all_banners", - "persistentUuid": "96e44efe-d2ad-48ad-8c61-f634a99bb029", - "width": 200, - "x": 243, - "y": 517, + "name": "Game", + "persistentUuid": "aa8b79a2-b4a4-4f9f-891b-46bf5324fe92", + "width": 286, + "x": 256, + "y": 416, "zOrder": 5, "numberProperties": [], "stringProperties": [], @@ -234,14 +394,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 74, + "height": 106, "layer": "", - "name": "Happy_time", - "persistentUuid": "872095af-65ec-45aa-b1b7-d44722cf7500", - "width": 201, - "x": 682, - "y": 312, + "name": "Banners", + "persistentUuid": "90d0327b-cd33-4bcf-9903-3c47b33e2c72", + "width": 286, + "x": 256, + "y": 288, "zOrder": 6, "numberProperties": [], "stringProperties": [], @@ -250,14 +410,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 74, + "height": 106, "layer": "", - "name": "Gameplay_start", - "persistentUuid": "3671b569-d018-4dbb-a258-662be240051d", - "width": 201, - "x": 682, - "y": 415, + "name": "User", + "persistentUuid": "7f20147f-6686-4cef-98d1-c51c96f38eb1", + "width": 271, + "x": 561, + "y": 288, "zOrder": 7, "numberProperties": [], "stringProperties": [], @@ -266,14 +426,14 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 74, + "height": 106, "layer": "", - "name": "Gameplay_stop", - "persistentUuid": "e83f58ed-d8be-4542-a202-e8bc474f93fa", - "width": 201, - "x": 682, - "y": 519, + "name": "Data", + "persistentUuid": "68cc526f-eaed-486a-8194-d5cee3aa7444", + "width": 271, + "x": 561, + "y": 416, "zOrder": 8, "numberProperties": [], "stringProperties": [], @@ -282,181 +442,210 @@ { "angle": 0, "customSize": true, - "depth": 25, - "height": 85, + "depth": 39, + "height": 106, "layer": "", - "name": "Generate_invite_link", - "persistentUuid": "e5f7996a-a5f4-4e8b-9e2d-ed9e7821f267", - "width": 213, - "x": 898, - "y": 312, + "name": "In_game_purchases", + "persistentUuid": "ccffcff9-f1ba-4eaf-8108-d140f8aca2c6", + "width": 581, + "x": 256, + "y": 544, "zOrder": 9, "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, + } + ], + "objects": [ { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Adblock_result", - "persistentUuid": "0f434295-7417-402b-bd3c-1652a16b13b3", - "width": 0, - "x": 36, - "y": 153, - "zOrder": 11, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "VideoAds", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Hovered.png", + "tiled": false, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": false, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "VideoAds", + "font": "", + "textAlignment": "center", + "characterSize": 60, + "color": { + "b": 42, + "g": 87, + "r": 139 + }, + "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": "VideoAds", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": false, + "topMargin": 32, + "width": 256 + } + } }, { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Invite_link", - "persistentUuid": "96dd4771-3214-4233-bbe0-42bb27d17651", - "width": 0, - "x": 36, - "y": 201, - "zOrder": 12, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 86, - "layer": "", - "name": "Logo", - "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", - "width": 171, - "x": 16, - "y": 12, - "zOrder": 13, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 92, - "layer": "", + "assetStoreId": "", + "bold": true, + "italic": false, "name": "Title", - "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", - "width": 889, - "x": 222, - "y": 27, - "zOrder": 14, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "Ads_result", - "persistentUuid": "ca630e96-a409-4bf2-bdc4-0585ce057249", - "width": 0, - "x": 32, - "y": 254, - "zOrder": 15, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 30, - "layer": "", - "name": "Link_invite", - "persistentUuid": "491dbc0f-6425-4574-a761-8db9f2270125", - "width": 845, - "x": 260, - "y": 202, - "zOrder": 16, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 32, - "height": 85, - "layer": "", - "name": "Open_invite_button", - "persistentUuid": "aaecba50-1709-4dd1-b4ab-47a27415dcca", - "width": 212, - "x": 898, - "y": 415, - "zOrder": 17, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 32, - "height": 85, - "layer": "", - "name": "Hide_invite_button", - "persistentUuid": "cc60573e-e718-46a6-8c4a-fb6d932c7251", - "width": 212, - "x": 898, - "y": 519, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } }, { - "angle": 0, - "customSize": true, - "depth": 38.49056603773584, - "height": 85, - "layer": "", - "name": "Loading_start", - "persistentUuid": "fb6ac4c6-eefb-40dc-aef7-9d01a747baff", - "width": 200, - "x": 468, - "y": 415, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] }, { - "angle": 0, - "customSize": true, - "depth": 38.49056603773585, - "height": 85, - "layer": "", - "name": "Loading_stop", - "persistentUuid": "8796b6da-1103-4def-b006-69dbace6c1d6", - "width": 200, - "x": 468, - "y": 517, - "zOrder": 20, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - } - ], - "objects": [ - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Show_midgame_ad", + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "Game", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -475,8 +664,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, + "texture": "Yellow Button_Hovered.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -485,8 +674,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, + "texture": "Yellow Button_Idle.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -495,14 +684,14 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Show midgame ad", + "string": "Game", "font": "", "textAlignment": "center", - "characterSize": 30, + "characterSize": 60, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -518,11 +707,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Show midgame ad", + "text": "Game", "font": "", "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" } }, "Pressed": { @@ -530,16 +720,16 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, + "texture": "Yellow Button_Pressed.png", + "tiled": false, "topMargin": 32, "width": 256 } } }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Show_rewarded_ad", + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "Banners", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -558,8 +748,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, + "texture": "Yellow Button_Hovered.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -568,8 +758,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, + "texture": "Yellow Button_Idle.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -578,14 +768,14 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Show rewarded ad", + "string": "Banners", "font": "", "textAlignment": "center", - "characterSize": 30, + "characterSize": 60, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -601,11 +791,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Show rewarded ad", + "text": "Banners", "font": "", "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" } }, "Pressed": { @@ -613,16 +804,16 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, + "texture": "Yellow Button_Pressed.png", + "tiled": false, "topMargin": 32, "width": 256 } } }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Check_adblock", + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "User", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -641,8 +832,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, + "texture": "Yellow Button_Hovered.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -651,8 +842,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, + "texture": "Yellow Button_Idle.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -661,14 +852,14 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Check adblock", + "string": "User", "font": "", "textAlignment": "center", - "characterSize": 30, + "characterSize": 60, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -684,11 +875,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Check adblock", + "text": "User", "font": "", "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" } }, "Pressed": { @@ -696,16 +888,16 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, + "texture": "Yellow Button_Pressed.png", + "tiled": false, "topMargin": 32, "width": 256 } } }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Request_banners", + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "Data", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -724,8 +916,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, + "texture": "Yellow Button_Hovered.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -734,8 +926,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, + "texture": "Yellow Button_Idle.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -744,14 +936,14 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Request banners", + "string": "Data", "font": "", "textAlignment": "center", - "characterSize": 30, + "characterSize": 60, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -767,11 +959,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Request banners", + "text": "Data", "font": "", "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" } }, "Pressed": { @@ -779,16 +972,16 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, + "texture": "Yellow Button_Pressed.png", + "tiled": false, "topMargin": 32, "width": 256 } } }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Hide_all_banners", + "assetStoreId": "615de0316452630b9f4f6a39decc82e2449b82c1afd1ff24d6470dad2922177b", + "name": "In_game_purchases", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -807,8 +1000,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, + "texture": "Yellow Button_Hovered.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -817,8 +1010,8 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, + "texture": "Yellow Button_Idle.png", + "tiled": false, "topMargin": 16, "width": 256 }, @@ -827,14 +1020,14 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Hide all banners", + "string": "In-game purchases", "font": "", "textAlignment": "center", - "characterSize": 30, + "characterSize": 60, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 42, + "g": 87, + "r": 139 }, "content": { "bold": false, @@ -850,11 +1043,12 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Hide all banners", + "text": "In-game purchases", "font": "", "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" + "verticalTextAlignment": "top", + "characterSize": 60, + "color": "139;87;42" } }, "Pressed": { @@ -862,806 +1056,550 @@ "height": 106, "leftMargin": 16, "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, + "texture": "Yellow Button_Pressed.png", + "tiled": false, "topMargin": 32, "width": 256 } } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Happy_time", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "VideoAds" }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Happy time", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "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": "Happy time", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } + { + "objectName": "Title" + }, + { + "objectName": "Logo" + }, + { + "objectName": "Game" + }, + { + "objectName": "Banners" + }, + { + "objectName": "User" + }, + { + "objectName": "Data" + }, + { + "objectName": "In_game_purchases" } - }, + ] + }, + "events": [ { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Gameplay_start", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Gameplay start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" }, - "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": "Gameplay start", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "" + ] } - } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::LoadSDK" + }, + "parameters": [ + "", + "" + ] + } + ] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Gameplay_stop", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Gameplay stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "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": "Gameplay stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "VideoAds", + "" + ] } - } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"VideoAds\"", + "" + ] + } + ] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Generate_invite_link", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Generate invite link", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "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": "Generate invite link", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "Game", + "" + ] } - } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Game\"", + "" + ] + } + ] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Get_room_id", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Get room id", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" }, - "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": "Get room id", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 + "parameters": [ + "Banners", + "" + ] } - } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Banners\"", + "" + ] + } + ] }, { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Adblock_result", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Adblock result: ----", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "Adblock result: ----", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": "255;255;255" - } + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "User", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"User\"", + "" + ] + } + ] }, { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Invite_link", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Invite link", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "Invite link", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": "255;255;255" - } + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Data", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Data\"", + "" + ] + } + ] }, { - "adaptCollisionMaskAutomatically": true, - "assetStoreId": "", - "name": "Logo", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": true, - "image": "Annotation.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [ - [ - { - "x": 0, - "y": 0 - }, - { - "x": 444, - "y": 0 - }, - { - "x": 444, - "y": 222 - }, - { - "x": 0, - "y": 222 - } - ] - ] - } - ] - } + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "In_game_purchases", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"In-game purchases\"", + "" ] } ] - }, + } + ], + "layers": [ { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Title", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "CrazyGames SDK v2 demo", - "font": "", - "textAlignment": "center", - "characterSize": 65, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "CrazyGames SDK v2 demo", - "font": "", - "textAlignment": "center", - "characterSize": 65, - "color": "255;255;255" - } + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" }, { - "assetStoreId": "", - "bold": true, - "italic": false, - "name": "Ads_result", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [], - "string": "Ads result: ----", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": { - "b": 255, - "g": 255, - "r": 255 - }, - "content": { - "bold": true, - "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": "Ads result: ----", - "font": "", - "textAlignment": "left", - "characterSize": 30, - "color": "255;255;255" - } + "name": "Effect", + "type": "EffectCapability::EffectBehavior" }, { - "assetStoreId": "", - "name": "Link_invite", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "initialValue": "No Link", - "placeholder": "Touch to start typing", - "fontResourceName": "", - "fontSize": 30, - "inputType": "text", - "textColor": "0;0;0", - "fillColor": "255;255;255", - "fillOpacity": 255, - "borderColor": "0;0;0", - "borderOpacity": 255, - "borderWidth": 1, - "readOnly": false, - "disabled": false - } + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Open_invite_button", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Open invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "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": "Open invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Hide_invite_button", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Hide invite button", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "VideoAds", + "name": "VideoAds", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.7130377630690402, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Show_midgame_ad", + "persistentUuid": "d3fd78a3-7025-4225-b2d2-19ed371669d2", + "width": 211, + "x": 69, + "y": 336, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Show_rewarded_ad", + "persistentUuid": "3dbf1643-c3cb-4f45-8a14-9f392c4c82cc", + "width": 211, + "x": 77, + "y": 442, + "zOrder": 2, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Check_adblock", + "persistentUuid": "98fdc3a1-2eb5-42fb-bb15-51506dcd04a5", + "width": 206, + "x": 73, + "y": 232, + "zOrder": 3, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Adblock_result", + "persistentUuid": "0f434295-7417-402b-bd3c-1652a16b13b3", + "width": 0, + "x": 318, + "y": 252, + "zOrder": 11, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Ads_result", + "persistentUuid": "ca630e96-a409-4bf2-bdc4-0585ce057249", + "width": 0, + "x": 92, + "y": 576, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "MidAds_result", + "persistentUuid": "1ebd5f27-4b39-4630-a9cf-add8d0690fda", + "width": 0, + "x": 317, + "y": 356, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RewardAds_result", + "persistentUuid": "284974ef-0920-4703-acd8-328ec7da87a0", + "width": 0, + "x": 313, + "y": 459, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "6fa95d22-5544-43e7-81de-20a8640abdb1", + "width": 0, + "x": 918, + "y": 718, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 66, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "deab0b4a-d216-410d-b8d2-e3e00a493dec", + "width": 885, + "x": 28, + "y": 717, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Show_midgame_ad", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Show midgame ad", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, "r": 72 }, "content": { @@ -1678,9 +1616,10 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Hide invite button", + "text": "Show midgame ad", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "72;72;79" } @@ -1699,7 +1638,7 @@ }, { "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Loading_start", + "name": "Show_rewarded_ad", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], @@ -1738,7 +1677,7 @@ "italic": false, "smoothed": true, "underlined": false, - "string": "Game loading start", + "string": "Show rewarded ad", "font": "", "textAlignment": "center", "characterSize": 30, @@ -1761,9 +1700,10 @@ "shadowOpacity": 127, "smoothed": true, "underlined": false, - "text": "Game loading start", + "text": "Show rewarded ad", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 30, "color": "72;72;79" } @@ -1778,275 +1718,7216 @@ "topMargin": 32, "width": 256 } - } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Check_adblock", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Check adblock", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Check adblock", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Adblock_result", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Adblock result: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Adblock result: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Ads_result", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Ads result: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Ads result: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "MidAds_result", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Mid Ads result: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Mid Ads result: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "RewardAds_result", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Reward Ads result: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Reward Ads result: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "Show_midgame_ad" + }, + { + "objectName": "Show_rewarded_ad" + }, + { + "objectName": "Check_adblock" + }, + { + "objectName": "Adblock_result" + }, + { + "objectName": "Ads_result" + }, + { + "objectName": "MidAds_result" + }, + { + "objectName": "RewardAds_result" + }, + { + "objectName": "Error_Info" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "General status of the ad, you can pause and mute the game here" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsVideoAdPlaying" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Ads_result", + "Text", + "=", + "\"Ad is playing\"" + ] + }, + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "0" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::AdFinishedPlaying" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Ads_result", + "Text", + "=", + "\"Ad is finished playing\"" + ] + }, + { + "type": { + "value": "ChangeTimeScale" + }, + "parameters": [ + "", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Show_midgame_ad", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::DisplayCrazyGamesAd" + }, + "parameters": [ + "", + "\"midgame\"", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::AdHadAnError" + }, + "parameters": [ + "Get_room_id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "MidAds_result", + "Text", + "=", + "\"Ad had an error, continue game\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::AdHadAnError" + }, + "parameters": [ + "Get_room_id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "MidAds_result", + "Text", + "=", + "\"Ad is successful, continue game\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Show_rewarded_ad", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::DisplayCrazyGamesAd" + }, + "parameters": [ + "", + "\"rewarded\"", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "You can reward the player here" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::AdHadAnError" + }, + "parameters": [ + "Get_room_id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "RewardAds_result", + "Text", + "=", + "\"Ad had an error, no rewards\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::AdHadAnError" + }, + "parameters": [ + "Get_room_id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "RewardAds_result", + "Text", + "=", + "\"Ad is successful, player rewarded\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Check_adblock", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::ScanForAdBlockers" + }, + "parameters": [ + "", + "\"rewarded\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsAdBlocked" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Adblock_result", + "Text", + "=", + "\"Adblock result: Not present\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsAdBlocked" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Adblock_result", + "Text", + "=", + "\"Adblock result: Detected\"" + ] + } + ] + } + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "Banners", + "name": "Banners", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.7130377630690402, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Request_banners", + "persistentUuid": "042d641a-94a3-4db8-935b-fee3cfe2294c", + "width": 333, + "x": 374, + "y": 313, + "zOrder": 4, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Hide_all_banners", + "persistentUuid": "96e44efe-d2ad-48ad-8c61-f634a99bb029", + "width": 333, + "x": 374, + "y": 422, + "zOrder": 5, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "90934fa4-06cb-46db-a724-758f5db6f436", + "width": 0, + "x": 925, + "y": 722, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 62, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "77d69e82-4544-446f-ac64-72c427ca6cae", + "width": 871, + "x": 35, + "y": 723, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Request_banners", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Request banners", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Request banners", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Hide_all_banners", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Hide all banners", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Hide all banners", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "Request_banners" + }, + { + "objectName": "Hide_all_banners" + }, + { + "objectName": "Error_Info" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Request_banners", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::DisplayBanner" + }, + "parameters": [ + "", + "\"banName\"", + "\"728x90\"", + "50", + "145", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Hide_all_banners", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::HideAllBanners" + }, + "parameters": [ + "", + "" + ] + } + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "Game", + "name": "Game", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.6897782140104503, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Happy_time", + "persistentUuid": "872095af-65ec-45aa-b1b7-d44722cf7500", + "width": 201, + "x": 862, + "y": 461, + "zOrder": 6, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Gameplay_start", + "persistentUuid": "3671b569-d018-4dbb-a258-662be240051d", + "width": 201, + "x": 315, + "y": 452, + "zOrder": 7, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Gameplay_stop", + "persistentUuid": "e83f58ed-d8be-4542-a202-e8bc474f93fa", + "width": 201, + "x": 319, + "y": 552, + "zOrder": 8, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 85, + "layer": "", + "name": "Generate_invite_link", + "persistentUuid": "e5f7996a-a5f4-4e8b-9e2d-ed9e7821f267", + "width": 213, + "x": 583, + "y": 614, + "zOrder": 9, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Invite_link", + "persistentUuid": "96dd4771-3214-4233-bbe0-42bb27d17651", + "width": 0, + "x": 27, + "y": 201, + "zOrder": 12, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 30, + "layer": "", + "name": "Link_invite", + "persistentUuid": "491dbc0f-6425-4574-a761-8db9f2270125", + "width": 845, + "x": 205, + "y": 198, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 85, + "layer": "", + "name": "Open_invite_button", + "persistentUuid": "aaecba50-1709-4dd1-b4ab-47a27415dcca", + "width": 212, + "x": 588, + "y": 405, + "zOrder": 17, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 85, + "layer": "", + "name": "Hide_invite_button", + "persistentUuid": "cc60573e-e718-46a6-8c4a-fb6d932c7251", + "width": 212, + "x": 588, + "y": 509, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 38.49056603773584, + "height": 85, + "layer": "", + "name": "Loading_start", + "persistentUuid": "fb6ac4c6-eefb-40dc-aef7-9d01a747baff", + "width": 200, + "x": 59, + "y": 454, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 38.49056603773585, + "height": 85, + "layer": "", + "name": "Loading_stop", + "persistentUuid": "8796b6da-1103-4def-b006-69dbace6c1d6", + "width": 200, + "x": 59, + "y": 551, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "IsInvited", + "persistentUuid": "7f647339-4d21-4aa0-bb71-1012f3add13d", + "width": 0, + "x": 27, + "y": 134, + "zOrder": 23, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "IsInstantMultiplayer", + "persistentUuid": "4028b46e-1848-49af-8ebd-922dfe239a7e", + "width": 0, + "x": 27, + "y": 261, + "zOrder": 26, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "DisabledChat", + "persistentUuid": "534db9ec-4b54-4eb1-809c-03f5425221c1", + "width": 0, + "x": 27, + "y": 318, + "zOrder": 27, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "5f3f4b76-9fd0-401e-a653-480a44a7c6a9", + "width": 0, + "x": 927, + "y": 725, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 59, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "36dde1c6-e0a1-4f01-8790-249444079ee1", + "width": 861, + "x": 48, + "y": 721, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 37.6875, + "height": 85, + "layer": "", + "name": "Get_room_id", + "persistentUuid": "c63d8475-ab0b-412a-b39c-8f808694c5f9", + "width": 201, + "x": 859, + "y": 564, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Room_ID", + "persistentUuid": "6f5be2b8-1e3f-468c-a807-7938a5f8475c", + "width": 0, + "x": 28, + "y": 374, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Happy_time", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Happy time", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Happy time", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Gameplay_start", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Gameplay start", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Gameplay start", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Gameplay_stop", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Gameplay stop", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Gameplay stop", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Generate_invite_link", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Generate invite link", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Generate invite link", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Get_room_id", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Get room id", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Get room id", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Invite_link", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Invite link", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Invite link", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "IsInvited", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Invited: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Invited: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "IsInstantMultiplayer", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Is Instant Multiplayer: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Is Instant Multiplayer: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "DisabledChat", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Disabled chat: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Disabled chat: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "Link_invite", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "initialValue": "No Link", + "placeholder": "Touch to start typing", + "fontResourceName": "", + "fontSize": 30, + "inputType": "text", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Open_invite_button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Open invite button", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Open invite button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Hide_invite_button", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Hide invite button", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Hide invite button", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Loading_start", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Game loading start", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Game loading start", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Loading_stop", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Game loading stop", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Game loading stop", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Room_ID", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Room ID: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Room ID: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Happy_time" + }, + { + "objectName": "Gameplay_start" + }, + { + "objectName": "Gameplay_stop" + }, + { + "objectName": "Generate_invite_link" + }, + { + "objectName": "Get_room_id" + }, + { + "objectName": "Invite_link" + }, + { + "objectName": "Room_ID" + }, + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "IsInvited" + }, + { + "objectName": "IsInstantMultiplayer" + }, + { + "objectName": "DisabledChat" + }, + { + "objectName": "Error_Info" + }, + { + "objectName": "Link_invite" + }, + { + "objectName": "Open_invite_button" + }, + { + "objectName": "Hide_invite_button" + }, + { + "objectName": "Loading_start" + }, + { + "objectName": "Loading_stop" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::LoadSDK" + }, + "parameters": [ + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "IsInvited", + "Text", + "=", + "\"Invited: \" + CrazyGamesAdApi::InviteParam(\"roomId\")" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "IsInstantMultiplayer", + "Text", + "=", + "\"Is Instant Multiplayer: \" + CrazyGamesAdApi::IsInstantMultiplayer()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "DisabledChat", + "Text", + "=", + "\"Disable Chat: \" + CrazyGamesAdApi::IsDisableChat()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Happy_time", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::DisplayHappyTime" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Gameplay_start", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::SetGameplayStarted" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Gameplay_stop", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::SetGameplayStopped" + }, + "parameters": [ + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Open_invite_button", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::InviteButton" + }, + "parameters": [ + "", + "\"123\"", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Hide_invite_button", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::HideInviteButton" + }, + "parameters": [ + "", + "\"123\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Generate_invite_link", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::GenerateInviteLink" + }, + "parameters": [ + "", + "\"123\"", + "" + ] + }, + { + "type": { + "value": "Clipboard::WriteText" + }, + "parameters": [ + "", + "CrazyGamesAdApi::InviteLink(\"123\")", + "" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Link_invite", + "Text", + "=", + "CrazyGamesAdApi::InviteLink(\"123\")" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Loading_start", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::SetLoadingStarted" + }, + "parameters": [ + "", + "\"rewarded\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Loading_stop", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::SetLoadingStopped" + }, + "parameters": [ + "", + "\"rewarded\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Get_room_id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Room_ID", + "Text", + "=", + "\"Room ID: \" + CrazyGamesAdApi::InviteParam(\"roomId\")" + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "User", + "name": "User", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.7130377630690402, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 87, + "layer": "", + "name": "Sign_In", + "persistentUuid": "8350c97b-0a7e-4ffa-8bfc-2cdf82c6df1d", + "width": 309, + "x": 39, + "y": 400, + "zOrder": 24, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "UserName", + "persistentUuid": "631da8c2-baa5-4347-86c5-70ae0126d918", + "width": 0, + "x": 43, + "y": 232, + "zOrder": 28, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "UserPic", + "persistentUuid": "32c8824c-babd-4f84-90fc-fff50bfcde32", + "width": 0, + "x": 41, + "y": 284, + "zOrder": 29, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 85, + "layer": "", + "name": "AccountLinking", + "persistentUuid": "fd324d99-af40-4f22-8967-f255a589dc51", + "width": 420, + "x": 646, + "y": 415, + "zOrder": 32, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "User_Available", + "persistentUuid": "cc332de8-621f-4f9f-953a-46bc4ff6aa9e", + "width": 0, + "x": 38, + "y": 164, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "SystemInfo", + "persistentUuid": "5f811655-a1ae-4e9c-b94c-f96cb374c4d6", + "width": 0, + "x": 50, + "y": 344, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 87, + "layer": "", + "name": "User_Token", + "persistentUuid": "9a2a5f7b-0298-4427-8e77-f5fc7cdc9996", + "width": 309, + "x": 42, + "y": 506, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "User_Changed", + "persistentUuid": "62e52424-15e4-4a18-a267-e4b879ac5ec3", + "width": 0, + "x": 724, + "y": 177, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 97, + "layer": "", + "name": "UserTokenTextArea", + "persistentUuid": "71b05b2a-f9f9-4f9c-9634-62541681bf78", + "width": 303, + "x": 48, + "y": 611, + "zOrder": 38, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 169, + "layer": "", + "name": "UserProfile", + "persistentUuid": "1b8416e7-6b17-4f17-9061-a3c0b734c2f3", + "width": 149, + "x": 427, + "y": 532, + "zOrder": 39, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "7bfea638-3987-4285-a3a3-cfb6ab6cf75b", + "width": 0, + "x": 929, + "y": 726, + "zOrder": 400, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Link_Account", + "persistentUuid": "23a1918a-f614-4cc8-afbd-022bea3ea5fb", + "width": 0, + "x": 670, + "y": 524, + "zOrder": 41, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 64, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "221b9edc-10dc-45bd-a228-b04e7e6937e4", + "width": 882, + "x": 38, + "y": 723, + "zOrder": 42, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Environment", + "persistentUuid": "3a94c43f-9bde-47ad-9d09-a647d8c443bd", + "width": 0, + "x": 677, + "y": 583, + "zOrder": 43, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Sign_In", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Show Auth Prompt", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Show Auth Prompt", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "AccountLinking", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Show Link Account Prompt", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Show Link Account Prompt", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "User_Token", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Get user token", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Get user token", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "User_Changed", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "User changed: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "User changed: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "User_Available", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "User account system available: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "User account system available: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "UserName", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "User Name: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "User Name: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "UserPic", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "User Picture: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "User Picture: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "SystemInfo", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "SystemInfo: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "SystemInfo: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "UserTokenTextArea", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "initialValue": "", + "placeholder": "", + "fontResourceName": "", + "fontSize": 20, + "inputType": "text area", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "UserProfile", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Ziggy_Default.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 880, + "y": 0 + }, + { + "x": 880, + "y": 1000 + }, + { + "x": 0, + "y": 1000 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Link_Account", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Link account response: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Link account response: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Environment", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Environment: ----", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Environment: ----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Sign_In" + }, + { + "objectName": "AccountLinking" + }, + { + "objectName": "Environment" + }, + { + "objectName": "User_Token" + }, + { + "objectName": "User_Changed" + }, + { + "objectName": "User_Available" + }, + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "UserName" + }, + { + "objectName": "UserPic" + }, + { + "objectName": "Link_Account" + }, + { + "objectName": "SystemInfo" + }, + { + "objectName": "Error_Info" + }, + { + "objectName": "UserTokenTextArea" + }, + { + "objectName": "UserProfile" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::LoadSDK" + }, + "parameters": [ + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Environment", + "Text", + "=", + "\"Environment: \" + CrazyGamesAdApi::Environment()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "SystemInfo", + "Text", + "=", + "\"System info: \" + CrazyGamesAdApi::SystemInfo()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "User_Available", + "Text", + "=", + "\"User system Available: \" + CrazyGamesAdApi::IsUserAccountAvailable()" + ] + }, + { + "type": { + "value": "Wait" + }, + "parameters": [ + "3" + ] + }, + { + "type": { + "value": "LoadImageFromURL::LoadURLIntoSprite" + }, + "parameters": [ + "", + "CrazyGamesAdApi::ProfilePic()", + "UserProfile", + "", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsUserAccountAvailable" + }, + "parameters": [ + "", + "=", + "\"true\"", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserName", + "Text", + "=", + "\"User Name: \" + CrazyGamesAdApi::UserName()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserPic", + "Text", + "=", + "\"User Picture: \" + CrazyGamesAdApi::ProfilePic()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "User_Token", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::AuthenticateUser" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserTokenTextArea", + "Text", + "=", + "CrazyGamesAdApi::UserToken()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::UserChanged" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserName", + "Text", + "=", + "\"User Name: \" + CrazyGamesAdApi::UserName()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserPic", + "Text", + "=", + "\"User Picture: \" + CrazyGamesAdApi::ProfilePic()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "AccountLinking", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::LinkAccount" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Link_Account", + "Text", + "=", + "\"Link account response: \" + CrazyGamesAdApi::LinkAccountResponse()" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Sign_In", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::ShowAuthWindow" + }, + "parameters": [ + "", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserName", + "Text", + "=", + "\"User Name: \" + CrazyGamesAdApi::UserName()" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "UserPic", + "Text", + "=", + "\"User Picture: \" + CrazyGamesAdApi::ProfilePic()" + ] + } + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "Data", + "name": "Data", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.7130377630690402, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 94, + "layer": "", + "name": "Save_user_data", + "persistentUuid": "289b3ea5-8a34-4455-aafd-60159eb18540", + "width": 202, + "x": 231, + "y": 424, + "zOrder": 25, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Player_ScoreLabel", + "persistentUuid": "f03cce58-952e-4a47-a075-f8f985e66432", + "width": 0, + "x": 211, + "y": 324, + "zOrder": 30, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Player_Score", + "persistentUuid": "5e43a416-4dda-4dde-a938-91ccb9be732b", + "width": 0, + "x": 413, + "y": 327, + "zOrder": 31, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 32, + "height": 94, + "layer": "", + "name": "Load_user_data", + "persistentUuid": "6a3d80e7-2027-4fb9-8380-4f7c79aa9283", + "width": 202, + "x": 478, + "y": 422, + "zOrder": 32, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "325556e9-a0da-4e3f-833b-a10048bd2ce4", + "width": 0, + "x": 924, + "y": 727, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 66, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "e0dca11a-32cb-4109-988a-8d558e9b10fe", + "width": 871, + "x": 30, + "y": 715, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Save_user_data", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Save session data", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Save session data", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Load_user_data", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Load session data", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Load session data", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Player_ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Player Score:", + "font": "", + "textAlignment": "left", + "characterSize": 30, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "Player Score:", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "Player_Score", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "initialValue": "0", + "placeholder": "Touch to start typing", + "fontResourceName": "", + "fontSize": 30, + "inputType": "number", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: -----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: -----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Save_user_data" + }, + { + "objectName": "Load_user_data" + }, + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "Player_ScoreLabel" + }, + { + "objectName": "Error_Info" + }, + { + "objectName": "Player_Score" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Save_user_data", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::SaveSessionData" + }, + "parameters": [ + "", + "\"highScore\"", + "ToNumber(Player_Score.Text())", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Load_user_data", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Player_Score", + "Text", + "=", + "ToString(CrazyGamesAdApi::SessionData(\"highScore\"))" + ] + } + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 51, + "disableInputWhenNotFocused": true, + "mangledName": "In_45game_32purchases", + "name": "In-game purchases", + "r": 33, + "standardSortMethod": true, + "stopSoundsOnStartup": true, + "title": "", + "v": 34, + "uiSettings": { + "grid": false, + "gridType": "rectangular", + "gridWidth": 64, + "gridHeight": 53, + "gridOffsetX": 0, + "gridOffsetY": 0, + "gridColor": 10401023, + "gridAlpha": 0.8, + "snap": false, + "zoomFactor": 0.6897782140104501, + "windowMask": false + }, + "objectsGroups": [], + "variables": [], + "instances": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 86, + "layer": "", + "name": "Logo", + "persistentUuid": "6a2b5ada-713b-4a85-a5eb-44d48e213306", + "width": 171, + "x": 16, + "y": 12, + "zOrder": 13, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 92, + "layer": "", + "name": "Title", + "persistentUuid": "142cb2e2-1e05-4d24-b951-c0dd93cf1504", + "width": 889, + "x": 222, + "y": 27, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 25, + "height": 83, + "layer": "", + "name": "Xolla_Token", + "persistentUuid": "c99521a8-c251-40ed-82bc-5d80a4339811", + "width": 299, + "x": 313, + "y": 173, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 288, + "layer": "", + "name": "Token", + "persistentUuid": "d33dcd4a-bd95-4f29-8b9f-89aacc09f396", + "width": 356, + "x": 321, + "y": 289, + "zOrder": 34, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "Back_button", + "persistentUuid": "fe0442f5-4650-448b-ab01-48dcb0dadb6f", + "width": 0, + "x": 932, + "y": 726, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 53, + "keepRatio": true, + "layer": "", + "name": "Error_Info", + "persistentUuid": "116f96de-1672-486f-9eda-2edea463154b", + "width": 862, + "x": 32, + "y": 730, + "zOrder": 36, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ], + "objects": [ + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "Xolla_Token", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "LeftPadding": 16, + "RightPadding": 16, + "PressedLabelOffsetY": 10, + "BottomPadding": 32, + "TopPadding": 16, + "HoveredFadeOutDuration": 0.25 + }, + "childrenContent": { + "Hovered": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Hovered.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Generate Ingame purchase token", + "font": "", + "textAlignment": "center", + "characterSize": 30, + "color": { + "b": 79, + "g": 72, + "r": 72 + }, + "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": "Generate Ingame purchase token", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "72;72;79" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Grey Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Logo", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "Annotation.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 0 + }, + { + "x": 444, + "y": 0 + }, + { + "x": 444, + "y": 222 + }, + { + "x": 0, + "y": 222 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Title", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "characterSize": 65, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "CrazyGames SDK v3 demo", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 65, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "Token", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "initialValue": "", + "placeholder": "token will displayed here", + "fontResourceName": "", + "fontSize": 30, + "inputType": "text area", + "textColor": "0;0;0", + "fillColor": "255;255;255", + "fillOpacity": 255, + "borderColor": "0;0;0", + "borderOpacity": 255, + "borderWidth": 1, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Error_Info", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "ErrorInfo: -----", + "font": "", + "textAlignment": "left", + "characterSize": 20, + "color": { + "b": 255, + "g": 255, + "r": 255 + }, + "content": { + "bold": true, + "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": "ErrorInfo: -----", + "font": "", + "textAlignment": "left", + "verticalTextAlignment": "top", + "characterSize": 20, + "color": "255;255;255" + } + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Xolla_Token" + }, + { + "objectName": "Logo" + }, + { + "objectName": "Title" + }, + { + "objectName": "Error_Info" + }, + { + "objectName": "Token" + } + ] + }, + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Back_button" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::LastError" + }, + "parameters": [ + "", + "!=", + "\"\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Error_Info", + "Text", + "=", + "CrazyGamesAdApi::LastError()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Xolla_Token", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "CrazyGamesAdApi::GenerateXsollaToken" + }, + "parameters": [ + "", + "" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Token", + "Text", + "=", + "CrazyGamesAdApi::XsollaToken()" + ] + } + ] + } + ] + } + ], + "layers": [ + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "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": [ + { + "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" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + } + ], + "externalEvents": [ + { + "associatedLayout": "Demo", + "name": "Back_button", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "Back_button", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Scene" + }, + "parameters": [ + "", + "\"Menu\"", + "yes" + ] + } + ] + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "", + "category": "General", + "extensionNamespace": "", + "fullName": "Load images from a URL", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWZpbGUtZG93bmxvYWQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsMkg2QzQuODksMiA0LDIuODkgNCw0VjIwQzQsMjEuMTEgNC44OSwyMiA2LDIySDE4QzE5LjExLDIyIDIwLDIxLjExIDIwLDIwVjhMMTQsMk0xMiwxOUw4LDE1SDEwLjVWMTJIMTMuNVYxNUgxNkwxMiwxOU0xMyw5VjMuNUwxOC41LDlIMTNaIiAvPjwvc3ZnPg==", + "name": "LoadImageFromURL", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/file-download.svg", + "shortDescription": "Adds multiple actions to load images from a URL into the game.", + "version": "1.0.0", + "description": [ + "With this extension, you can load images from any URL (including a DataURL) into a sprite or image resource.", + "Loading it into a sprite will load the URL into a sprite, replacing the image it displays until the sprite's displayed image is changed, e.g. by going to the next frame of an animation or switching animations.", + "Loading it into a resource will discard the old image that a resource was using and replace it with the image loaded from a URL. Any sprite that is displaying this resource as a part of their animation will start showing the new image instead of the old one. The old image of the resource will not be accessible anymore unless you restart the game or reload the original image from a URL into it." + ], + "origin": { + "identifier": "LoadImageFromURL", + "name": "gdevelop-extension-store" + }, + "tags": [ + "resource", + "art", + "image", + "url", + "base64", + "data", + "url", + "load", + "json", + "file", + "download", + "get", + "request" + ], + "authorIds": [ + "ZgrsWuRTAkXgeuPV9bo0zuEcA2w1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Replaces the image contained by a sprite by a new one, from a URL. This will only affect the sprite in question and only until the image in it is changed through its animation or another action, unless you also modify the resource.", + "fullName": "Load URL into a sprite", + "functionType": "Action", + "name": "LoadURLIntoSprite", + "sentence": "Load URL _PARAM1_ into sprite _PARAM2_ (and into the corresponding resource: _PARAM3_)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (eventsFunctionContext.getArgument(\"ChangeResource\")) {", + " const texture = PIXI.BaseTexture.from(eventsFunctionContext.getArgument(\"URL\"));", + " for (const obj of objects) obj.getRendererObject().texture.baseTexture = texture;", + "} else {", + " const texture = PIXI.Texture.from(eventsFunctionContext.getArgument(\"URL\"));", + " for (const obj of objects) obj.getRendererObject().texture = texture;", + "}", + "" + ], + "parameterObjects": "Object", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "The URL to load the new image for the sprite from", + "name": "URL", + "type": "string" + }, + { + "description": "The object to modify", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Modify the resource?", + "longDescription": "If yes, modifies the image contained in the resource of the sprite's current frame instead of just the sprite's displayed image. This makes the changes affect all other sprites that also display this resource, and allows the change to persist after changing animations or the current frame.", + "name": "ChangeResource", + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Replaces the image contained by a resource by a new one, from a URL. This will update all sprites displaying the resource.", + "fullName": "Load URL into an image resource", + "functionType": "Action", + "name": "LoadURLIntoImageResource", + "sentence": "Load URL _PARAM1_ into resource _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "runtimeScene", + " .getGame()", + " .getImageManager()", + " .getPIXITexture(eventsFunctionContext.getArgument(\"Resource\"))", + " .baseTexture = PIXI.BaseTexture.from(eventsFunctionContext.getArgument(\"URL\"));", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "The URL to load the new image for the resource from", + "name": "URL", + "type": "string" + }, + { + "description": "The resource to modify", + "name": "Resource", + "type": "imageResource" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Ads", + "extensionNamespace": "", + "fullName": "CrazyGames SDK v3", + "helpPath": "/extensions/crazy-games-ad-api/details", + "iconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", + "name": "CrazyGamesAdApi", + "previewIconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", + "shortDescription": "Allow games to be hosted on CrazyGames website and display ads.", + "version": "3.0.0", + "description": "Please refer to [CrazyGames' guide](https://docs.crazygames.com/sdk/html5-v3/intro/) to know when to call the different actions.", + "origin": { + "identifier": "CrazyGamesAdApi", + "name": "gdevelop-extension-store" + }, + "tags": [ + "api", + "crazygames", + "ads", + "authentication", + "monetization" + ], + "authorIds": [ + "rotBq28wITdtfsrE7McHQri4k2w2", + "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", + "mnImQKdn8nQxwzkS5D6a1JB27V23", + "taRwmWxwAFYFL9yyBwB3cwBw0BO2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "gdjs._crazyGamesExtension = {", + " isSdkReady: false,", + " isPlayingVideoAd: false,", + " hasVideoAdJustFinishedPlaying: false,", + " adHadAnError: false,", + " lastErrorDescription: \"\",", + " linkAccountResponse: \"\",", + " isAdBlockerDetected: false,", + " links: new Map(),", + " userChanged: false,", + " userId: null,", + " userSignedIn: false,", + " userToken: null,", + " xsollaToken: null,", + "};" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Get link account response.", + "fullName": "Link account response", + "functionType": "StringExpression", + "group": "User", + "name": "LinkAccountResponse", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.linkAccountResponse;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "the last error from the CrazyGames API.", + "fullName": "Get last error", + "functionType": "ExpressionAndCondition", + "group": "General", + "name": "LastError", + "sentence": "CrazyGames API last error is", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.lastErrorDescription", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "async": true, + "description": "Check if an user is signed into CrazyGames. If signed in, retrieves username and profile picture.", + "fullName": "Check and load if an user is signed in CrazyGames", + "functionType": "Action", + "group": "User", + "name": "UserSignIn", + "sentence": "Check if user is signed in CrazyGames", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "console.log(\"Checking if the user is signed in start\");", + "", + "async function getUser() {", + " const isAvailable = CrazyGames.SDK.user.isUserAccountAvailable;", + " console.log(\"User account system available:\", isAvailable);", + "", + " try {", + " const user = await CrazyGames.SDK.user.getUser();", + " if (user) {", + " console.log(\"User info:\", user);", + " // Example: Display the user's username in the game", + " gdjs._crazyGamesExtension.userSignedIn = true;", + " gdjs._crazyGamesExtension.username = user.username;", + " gdjs._crazyGamesExtension.profilePictureUrl = user.profilePictureUrl;", + " eventsFunctionContext.task.resolve();", + " console.log(\"Checking user is signed in done\");", + " } else {", + " console.log(\"No user is signed in.\");", + " // Optionally, prompt the user to sign in", + " gdjs._crazyGamesExtension.userSignedIn = false;", + " gdjs._crazyGamesExtension.username = null;", + " gdjs._crazyGamesExtension.profilePictureUrl = null;", + " eventsFunctionContext.task.resolve();", + " console.log(\"Checking user is signed in done\");", + " }", + " } catch (error) {", + " console.error(\"Error retrieving user info:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " eventsFunctionContext.task.resolve();", + " console.log(\"Checking user is signed in done\");", + " }", + "}", + "", + "getUser();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if the user is signed in.", + "fullName": "User is signed in", + "functionType": "Condition", + "group": "User", + "name": "UserSignedIn", + "sentence": "User is signed in", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.userSignedIn;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Return an invite link.", + "fullName": "Invite link", + "functionType": "StringExpression", + "group": "Game", + "name": "InviteLink", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const roomId = eventsFunctionContext.getArgument(\"RoomId\");\r", + "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.links.get(roomId) || \"\";" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Room id", + "name": "RoomId", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Display an invite button.", + "fullName": "Display invite button", + "functionType": "Action", + "group": "Game", + "name": "InviteButton", + "sentence": "Display an invite button for the room id: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const logger = new gdjs.Logger(\"CrazyGames SDK\");", + "", + "const roomId = eventsFunctionContext.getArgument(\"RoomId\");", + "", + "CrazyGames.SDK.game.showInviteButton({", + " roomId,", + " //param2: \"value\",", + " //param3: \"value\"", + "}, (error, result) => {", + " if (error) {", + " logger.error(\"Invite button link error\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " } else {", + " logger.log(\"Invite button link\", result);", + " }", + "});" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ] + } + ], + "parameters": [ + { + "description": "Room id", + "name": "RoomId", + "type": "string" + } + ], + "objectGroups": [] }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "Loading_stop", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [], - "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 - }, - "childrenContent": { - "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Game loading stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": { - "b": 79, - "g": 72, - "r": 72 - }, - "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": "Game loading stop", - "font": "", - "textAlignment": "center", - "characterSize": 30, - "color": "72;72;79" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 + "fullName": "", + "functionType": "Action", + "name": "onScenePostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = false;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } - } - } - ], - "objectsFolderStructure": { - "folderName": "__ROOT", - "children": [ - { - "objectName": "Show_midgame_ad" - }, - { - "objectName": "Show_rewarded_ad" - }, - { - "objectName": "Check_adblock" - }, - { - "objectName": "Request_banners" - }, - { - "objectName": "Hide_all_banners" - }, - { - "objectName": "Happy_time" - }, - { - "objectName": "Gameplay_start" - }, - { - "objectName": "Loading_start" - }, - { - "objectName": "Loading_stop" - }, - { - "objectName": "Gameplay_stop" - }, - { - "objectName": "Generate_invite_link" - }, - { - "objectName": "Open_invite_button" - }, - { - "objectName": "Hide_invite_button" - }, - { - "objectName": "Get_room_id" - }, - { - "objectName": "Adblock_result" - }, - { - "objectName": "Ads_result" - }, - { - "objectName": "Invite_link" - }, - { - "objectName": "Logo" - }, - { - "objectName": "Title" - }, - { - "objectName": "Link_invite" - } - ] - }, - "events": [ + ], + "parameters": [], + "objectGroups": [] + }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 68, - "g": 255, - "r": 0, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "CrazyGames Interactions\n" + "async": true, + "description": "Load CrazyGames SDK.", + "fullName": "Load SDK", + "functionType": "Action", + "group": "General", + "name": "LoadSDK", + "sentence": "Load CrazyGames SDK", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const logger = new gdjs.Logger(\"CrazyGames SDK\");\r", + "\r", + "if (!window['CrazyGamesSingleton']) {\r", + " window.CrazyGamesSingleton = (function () {\r", + " let isInitializing = false;\r", + " let isInitialized = false;\r", + " let initPromise = null;\r", + "\r", + " async function initialize() {\r", + " if (isInitialized) {\r", + " console.log(\"CrazyGames SDK is already initialized.\");\r", + " return Promise.resolve();\r", + " }\r", + " if (isInitializing) {\r", + " console.log(\"CrazyGames SDK initialization is in progress...\");\r", + " return initPromise; // Return the same promise to avoid duplicate calls\r", + " }\r", + "\r", + " isInitializing = true;\r", + " initPromise = new Promise(async (resolve, reject) => {\r", + " try {\r", + " await CrazyGames.SDK.init();\r", + " if (CrazyGames.SDK.environment == 'disabled') {\r", + " throw new Error('not in local or crazy game environment');\r", + " }\r", + " console.log(\"CrazyGames SDK initialized successfully.\");\r", + " isInitialized = true;\r", + " resolve();\r", + " } catch (error) {\r", + " console.error(\"Failed to initialize CrazyGames SDK:\", error);\r", + " gdjs._crazyGamesExtension.lastErrorDescription = error.toString();\r", + " reject(error);\r", + " } finally {\r", + " isInitializing = false;\r", + " }\r", + " });\r", + "\r", + " return initPromise;\r", + " }\r", + "\r", + " return { initialize };\r", + " })();\r", + "}\r", + "\r", + "// Function to check if CrazyGames SDK is already loaded\r", + "function isCrazyGamesLoaded() {\r", + " return window.CrazyGames && window.CrazyGames.SDK;\r", + "}\r", + "\r", + "// Function to initialize CrazyGames SDK safely\r", + "async function initializeGame() {\r", + " gdjs._crazyGamesExtension.isSdkReady = true;\r", + "\r", + " // Add user listener\r", + " const listener = (user) => {\r", + " gdjs._crazyGamesExtension.userChanged = true;\r", + " gdjs._crazyGamesExtension.username = user.username;\r", + " gdjs._crazyGamesExtension.profilePictureUrl = user.profilePictureUrl;\r", + " };\r", + "\r", + " CrazyGames.SDK.user.addAuthListener(listener);\r", + "\r", + " eventsFunctionContext.task.resolve();\r", + "}\r", + "\r", + "// Load SDK only if it's missing\r", + "if (!isCrazyGamesLoaded()) {\r", + " const scriptElement = document.createElement('script');\r", + " scriptElement.src = 'https://sdk.crazygames.com/crazygames-sdk-v3.js';\r", + "\r", + " scriptElement.onload = async () => {\r", + " console.log(\"CrazyGames SDK script loaded.\");\r", + " await CrazyGamesSingleton.initialize();\r", + " if (CrazyGames.SDK.environment != 'disabled') {\r", + " initializeGame();\r", + " }\r", + " eventsFunctionContext.task.resolve();\r", + " };\r", + "\r", + " document.body.appendChild(scriptElement);\r", + "} else {\r", + " console.log(\"CrazyGames SDK already loaded.\");\r", + "\r", + " (async function () {\r", + " await CrazyGamesSingleton.initialize();\r", + " if (CrazyGames.SDK.environment != 'disabled') {\r", + " initializeGame();\r", + " }\r", + " eventsFunctionContext.task.resolve();\r", + " })();\r", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Check if the CrazyGames SDK is ready to be used.", + "fullName": "CrazyGames SDK is ready", + "functionType": "Condition", + "group": "General", + "name": "IsSDKLoaded", + "sentence": "CrazyGames SDK is ready", + "events": [ { - "type": { - "value": "CrazyGamesAdApi::IsSDKLoaded" - }, - "parameters": [ - "", - "" + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isSdkReady;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Let CrazyGames know gameplay started.", + "fullName": "Gameplay started", + "functionType": "Action", + "group": "Game", + "name": "SetGameplayStarted", + "sentence": "Let CrazyGames know gameplay started", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "CrazyGames.SDK.game.gameplayStart();", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } ] } ], - "actions": [], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Let CrazyGames know gameplay stopped.", + "fullName": "Gameplay stopped", + "functionType": "Action", + "group": "Game", + "name": "SetGameplayStopped", + "sentence": "Let CrazyGames know gameplay stopped", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Hide_all_banners", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::HideAllBanners" - }, - "parameters": [ - "", + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "CrazyGames.SDK.game.gameplayStop();", "" - ] + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Let CrazyGames know loading started.", + "fullName": "Loading started", + "functionType": "Action", + "group": "Game", + "name": "SetLoadingStarted", + "sentence": "Let CrazyGames know loading started", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Request_banners", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::DisplayBanner" - }, - "parameters": [ - "", - "\"banName\"", - "\"728x90\"", - "100", - "50", - "" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "CrazyGames.SDK.game.loadingStart();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Let CrazyGames know loading stopped.", + "fullName": "Loading stopped", + "functionType": "Action", + "group": "Game", + "name": "SetLoadingStopped", + "sentence": "Let CrazyGames know loading stopped", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CrazyGamesAdApi::IsVideoAdPlaying" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Get_room_id", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Ads_result", - "Text", - "=", - "\"An ads is playing\"" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "CrazyGames.SDK.game.loadingStop();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "async": true, + "description": "Display a video ad. The game is automatically muted while the video is playing.", + "fullName": "Display video ad", + "functionType": "Action", + "group": "Video Ads", + "name": "DisplayCrazyGamesAd", + "sentence": "Display _PARAM1_ video ad", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Open_invite_button", + "", "" ] } @@ -2054,11 +8935,9 @@ "actions": [ { "type": { - "value": "CrazyGamesAdApi::InviteButton" + "value": "BuiltinAsync::ResolveAsyncEventsFunction" }, "parameters": [ - "", - "\"123\"", "" ] } @@ -2069,134 +8948,243 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Hide_invite_button", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::HideInviteButton" - }, - "parameters": [ + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const logger = new gdjs.Logger(\"CrazyGames SDK\");", + "const adType = eventsFunctionContext.getArgument(\"AdType\");", + "const volume = runtimeScene.getSoundManager().getGlobalVolume();", "", - "\"123\"" - ] + "try {", + " CrazyGames.SDK.ad.requestAd(adType, {", + " adStarted: () => {", + " gdjs._crazyGamesExtension.isPlayingVideoAd = true;", + " runtimeScene.getSoundManager().setGlobalVolume(0);", + " gdjs._crazyGamesExtension.adHadAnError = false;", + " },", + " adFinished: () => {", + " gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = true;", + " gdjs._crazyGamesExtension.isPlayingVideoAd = false;", + " gdjs._crazyGamesExtension.adHadAnError = false;", + " if (runtimeScene.getSoundManager().getGlobalVolume() === 0) {", + " runtimeScene.getSoundManager().setGlobalVolume(volume);", + " }", + " eventsFunctionContext.task.resolve();", + " },", + " adError: (error, errorData) => {", + " gdjs._crazyGamesExtension.isPlayingVideoAd = false;", + " gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = true;", + " gdjs._crazyGamesExtension.adHadAnError = true;", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " if (runtimeScene.getSoundManager().getGlobalVolume() === 0) {", + " runtimeScene.getSoundManager().setGlobalVolume(volume);", + " }", + " //logger.error(`Error ${adType} ad (callback): `, JSON.stringify(error), errorData); // causes a blocker error", + " eventsFunctionContext.task.resolve();", + " },", + " });", + "", + "} catch (e) {", + " console.error(\"Unexpected error displaying ad:\", e);", + " eventsFunctionContext.task.resolve();", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ] - }, + } + ], + "parameters": [ + { + "description": "Ad Type", + "name": "AdType", + "supplementaryInformation": "[\"midgame\",\"rewarded\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "description": "Checks if a video ad just finished playing successfully.", + "fullName": "Video ad just finished playing", + "functionType": "Condition", + "group": "Video Ads", + "name": "AdFinishedPlaying", + "sentence": "Video ad just finished playing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CrazyGamesAdApi::AdFinishedPlaying" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Get_room_id", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Ads_result", - "Text", - "=", - "\"An advert ended with success\"" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Checks if a video ad is playing.", + "fullName": "Video ad is playing", + "functionType": "Condition", + "group": "Video Ads", + "name": "IsVideoAdPlaying", + "sentence": "Video ad is playing", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Generate_invite_link", + "", "" ] } ], - "actions": [ - { - "type": { - "value": "CrazyGamesAdApi::GenerateInviteLink" - }, - "parameters": [ - "", - "\"123\"", - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Link_invite", - "Text", - "=", - "CrazyGamesAdApi::InviteLink(\"123\")" - ] - }, + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isPlayingVideoAd;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if the user changed.", + "fullName": "User changed", + "functionType": "Condition", + "group": "User", + "name": "UserChanged", + "sentence": "User changed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Clipboard::WriteText" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ "", - "CrazyGamesAdApi::InviteLink(\"123\")", "" ] } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "if (gdjs._crazyGamesExtension.userChanged) {\r", + " eventsFunctionContext.returnValue = true;\r", + "}\r", + "\r", + "gdjs._crazyGamesExtension.userChanged = false;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Check if a video ad had an error.", + "fullName": "Video ad had an error", + "functionType": "Condition", + "group": "Video Ads", + "name": "AdHadAnError", + "sentence": "Video ad had an error", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Gameplay_start", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::SetGameplayStarted" - }, - "parameters": [ - "", - "" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.adHadAnError;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "async": true, + "description": "Generate an invite link to invite friends to join your game sessions. This URL can be added to the clipboard or displayed in the game to let the user select it.", + "fullName": "Generate an invite link", + "functionType": "Action", + "group": "Game", + "name": "GenerateInviteLink", + "sentence": "Generate an invite link for _PARAM1_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Gameplay_stop", + "", "" ] } @@ -2204,10 +9192,9 @@ "actions": [ { "type": { - "value": "CrazyGamesAdApi::SetGameplayStoped" + "value": "BuiltinAsync::ResolveAsyncEventsFunction" }, "parameters": [ - "", "" ] } @@ -2218,61 +9205,101 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Happy_time", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::DisplayHappyTime" - }, - "parameters": [ + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const roomId = eventsFunctionContext.getArgument(\"RoomId\");", "", - "" - ] + "const logger = new gdjs.Logger(\"CrazyGames SDK\");", + "const link = CrazyGames.SDK.game.inviteLink({", + " roomId: roomId,", + "});", + "", + "gdjs._crazyGamesExtension.links.set(roomId, link);", + "logger.info(link);", + "eventsFunctionContext.task.resolve();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ] - }, + } + ], + "parameters": [ + { + "description": "Room id", + "name": "RoomId", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Display an happy time by emitting sparkling confetti. The celebration should remain a special moment.", + "fullName": "Display happy time", + "functionType": "Action", + "group": "Game", + "name": "DisplayHappyTime", + "sentence": "Display happy time", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Show_midgame_ad", + "", "" ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "CrazyGamesAdApi::DisplayCrazyGamesAd" - }, - "parameters": [ - "", - "\"midgame\"", - "" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "CrazyGames.SDK.game.happytime();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "async": true, + "description": "Scan for ad blockers.", + "fullName": "Scan for ad blockers", + "functionType": "Action", + "group": "Video Ads", + "name": "ScanForAdBlockers", + "sentence": "Scan for ad blockers", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ - "Show_rewarded_ad", + "", "" ] } @@ -2280,11 +9307,9 @@ "actions": [ { "type": { - "value": "CrazyGamesAdApi::DisplayCrazyGamesAd" + "value": "BuiltinAsync::ResolveAsyncEventsFunction" }, "parameters": [ - "", - "\"rewarded\"", "" ] } @@ -2295,319 +9320,278 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "Check_adblock", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "CrazyGamesAdApi::ScanForAdBlockers" + "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ "", - "\"rewarded\"" + "" ] } ], + "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "CrazyGamesAdApi::IsAdBlocked" - }, - "parameters": [ - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Adblock_result", - "Text", - "=", - "\"Adblock result: Not present\"" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CrazyGamesAdApi::IsAdBlocked" - }, - "parameters": [ - "", - "" - ] - } + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const logger = new gdjs.Logger(\"CrazyGames SDK\");", + "", + "// Detecting Ad Blockers", + "async function checkAdBlocker() {", + " try {", + " const isAdBlocked = await CrazyGames.SDK.ad.hasAdblock();", + " if (isAdBlocked) {", + " console.log(\"Ad blocker detected.\", result);", + " gdjs._crazyGamesExtension.isAdBlockerDetected = true;", + "", + " // Handle ad blocker scenario", + " } else {", + " console.log(\"No ad blocker detected.\");", + " gdjs._crazyGamesExtension.isAdBlockerDetected = false;", + " }", + "", + " } catch (error) {", + " console.error(\"Error checking for ad blocker:\", error);", + " logger.error(\"Unable to scan adblockers.\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " }", + "", + " eventsFunctionContext.task.resolve();", + "}", + "", + "checkAdBlocker();" ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "Adblock_result", - "Text", - "=", - "\"Adblock result: Detected\"" - ] - } - ] + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true } ] } - ] + ], + "parameters": [], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "Loading_start", - "" - ] - } - ], - "actions": [ + "description": "Check if user is using an ad blocker. This condition is always false before the \"Scan for ad blockers\" is called.", + "fullName": "Ad blocker is detected", + "functionType": "Condition", + "group": "Video Ads", + "name": "IsAdBlocked", + "sentence": "Ad blocker is detected", + "events": [ { - "type": { - "value": "CrazyGamesAdApi::SetLoadingStarted" - }, - "parameters": [ - "", - "\"rewarded\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isAdBlockerDetected;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } ] } - ] + ], + "parameters": [], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "async": true, + "description": "Display a banner that can be called once per 60 seconds.", + "fullName": "Display a banner", + "functionType": "Action", + "group": "Banners", + "name": "DisplayBanner", + "sentence": "Display a banner: _PARAM1_ at position _PARAM3_ ; _PARAM4_ with size _PARAM2_", + "events": [ { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "Loading_stop", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "CrazyGamesAdApi::SetLoadingStopped" - }, - "parameters": [ - "", - "\"rewarded\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const logger = new gdjs.Logger(\"CrazyGames SDK\");", + "const bannerName = eventsFunctionContext.getArgument(\"BannerName\");", + "const positionX = eventsFunctionContext.getArgument(\"PositionX\");", + "const positionY = eventsFunctionContext.getArgument(\"PositionY\");", + "const adDimension = eventsFunctionContext.getArgument(\"Size\").split(\"x\");", + "const size = {", + " width: Number(adDimension[0]) || 0,", + " height: Number(adDimension[1]) || 0", + "}", + "", + "// Create a container for the banner if needed", + "if (document.getElementById(bannerName) === null) {", + " const div = document.createElement('div');", + " div.id = bannerName;", + " div.setAttribute(\"style\", \"pointer-events: none; position:fixed; z-index:1; width: \" + size.width + \"px; height: \" + size.height + \"px;left:\" + positionX + \"px; top:\" + positionY + \"px;\");", + "", + " const body = document.getElementsByTagName(\"body\")[0];", + " // Insert the new container in first position in the body", + " body.insertBefore(div, body.firstChild);", + "}", + "", + "", + "// Available sizes:", + "// 970x90", + "// 320x50", + "// 160x600", + "// 336x280", + "// 728x90", + "// 300x600", + "// 468x60", + "// 970x250", + "// 300x250", + "// 250x250", + "// 120x600", + "// x, y coordinates are from the top left of the screen", + "CrazyGames.SDK.banner.requestBanner({", + " id: bannerName,", + " width: size.width,", + " height: size.height,", + "}, (error, result) => {", + " if (error) {", + " logger.error(\"Error on request banner.\", error);", + " } else {", + " // Result is always undefined when requesting banners", + " logger.log(\"End request banner\", result === undefined ? \"Requesting banners\" : result);", + " eventsFunctionContext.task.resolve();", + " }", + "});" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } ] } - ] - } - ], - "layers": [ - { - "ambientLightColorB": 200, - "ambientLightColorG": 200, - "ambientLightColorR": 200, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 3, - "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": [ + "parameters": [ { - "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" - }, - { - "name": "Text", - "type": "TextContainerCapability::TextContainerBehavior" - } - ] - } - ], - "externalEvents": [], - "eventsFunctionsExtensions": [ - { - "author": "", - "category": "Ads", - "extensionNamespace": "", - "fullName": "CrazyGames SDK v2", - "helpPath": "/extensions/crazy-games-ad-api/details", - "iconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", - "name": "CrazyGamesAdApi", - "previewIconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODkiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgODkgMTAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0LjkwMzQgMjUuODkyOUM4NS4wNzI3IDE4LjY4MjQgODQuNjQ5NCA2LjExNjk0IDgwLjA3NzYgMC44NzQ4NTlDNzcuNTcyOSAtMS45OTY2NCA3MS42MTgzIDIuODA4MDEgNjcuNzY2MSA2LjUxOTA5QzYxLjM4MSAzLjQwNzcxIDUzLjUzNTUgMS44NzY3MSA0My45OTY4IDEuODc2NzFDMzQuNDU4IDEuODc2NzEgMjYuNjE5NiAzLjQxNDc2IDIwLjI0MTYgNi41MTkwOUMxNi4zODI0IDIuODA4MDEgMTAuNDM0OCAtMS45ODk1OSA3LjkzMDE0IDAuODgxOTE1QzMuMzY1MzcgNi4xMTY5NCAyLjkzNSAxOC42NDAxIDMuMTA0MzIgMjUuODU3NkMxLjA1MTIzIDMxLjUwMTkgMCAzOC4wOTE1IDAgNDUuNjEyNUMwIDYxLjQzMDQgNC41Mjk1IDczLjE0MjIgMTMuNDU0NCA4MC40NzI3QzE5LjQ2NTYgODUuMzk3MyAyNy4zMTgxIDg4LjIzMzUgMzcuMzIyNSA4OS4wODcyQzM2Ljg2MDcgODkuMzE4MSAzNi4zOTIzIDg5LjU0NjggMzUuOTE3NyA4OS43Nzg1TDM1LjkxNjMgODkuNzc5MkwzNS45MTU5IDg5Ljc3OTRDMzUuMTg3NSA5MC4xMzUgMzQuNDQ0NyA5MC40OTc3IDMzLjY4OSA5MC44ODYzTDMwLjA2MjYgOTIuNjY0MkwyOC4wMDI1IDkzLjY3MzFDMjcuNDEwMiA5My45ODI5IDI2LjgxMjMgOTQuMjgyIDI2LjIwNjUgOTQuNTg1MkwyNi4yMDYyIDk0LjU4NTRDMjQuNzY5NyA5NS4zMDQyIDIzLjI4ODQgOTYuMDQ1NSAyMS43MzAzIDk3LjAwMzJMMjEuMTg3IDk3LjI5MjVDMjEuMDMxOCA5Ny40MDU0IDIwLjg4MzcgOTcuNTk1OSAyMC44NTU0IDk3LjgwNzVDMjAuNzg0OSA5OC4yMDk3IDIxLjA2MDEgOTguNTkwNyAyMS40NjIyIDk4LjY0NzFDMjIuMDU4NyA5OC43MzY4IDIyLjY1MzMgOTguODM0NSAyMy4yNDggOTguOTMyMkwyMy4yNDgzIDk4LjkzMjJDMjQuNjY1IDk5LjE2NSAyNi4wODE2IDk5LjM5NzcgMjcuNTIyNyA5OS41MjE5TDI5LjA0NjYgOTkuNjkxM0MyOS41NDc2IDk5Ljc0NzcgMzAuMDU1NSA5OS43OSAzMC41NzA2IDk5LjgxODNMMzMuNjMyNiA5OS45ODc2QzM3LjczMTcgMTAwLjA1OCA0MS44NTkxIDk5LjgzMjQgNDUuOTUxMSA5OS4xOTAzQzUwLjAzNjEgOTguNTc2NSA1NC4wNTA2IDk3LjQzMzYgNTcuOTA5OCA5NS44NDYxQzYxLjc1NSA5NC4yNTg3IDY1LjQyMzcgOTIuMTkxNSA2OC43NDY4IDg5LjY3MjhDNzUuMzM2NCA4NC41NTc3IDgwLjUxNSA3Ny42NzE3IDgzLjU5ODEgNjkuOTk1NkM4NC43MjcgNjcuMjE1OCA4NS41NjY2IDY0LjMzMDIgODYuMTczMyA2MS40MDIyQzg3LjM5MzkgNTYuNzAzNCA4OC4wMTQ4IDUxLjQ0MDEgODguMDE0OCA0NS42MTI1Qzg4LjAxNDggMzguMTEyNyA4Ni45NzA2IDMxLjUzNzIgODQuOTI0NSAyNS45TDg0LjkwMzQgMjUuODkyOVpNNDMuOTg5NyA3My41MjMyQzI3LjEyNzYgNzMuNTIzMiAxNS45MDI2IDY4Ljc4MiAxNS45MDI2IDQ1LjYwNTRDMTUuOTAyNiAzNC42NzY4IDE4LjQwNzMgMjcuMjc1OCAyMy41NzE3IDIzLjAyODVDMjcuOTMxOSAxOS40MzAzIDM0LjYyMDMgMTcuNjg3NiA0My45ODk3IDE3LjY4NzZDNTMuMzU5MiAxNy42ODc2IDYwLjA0NzYgMTkuNDQ0NCA2NC40MDc4IDIzLjAyODVDNjkuNTU4MSAyNy4yNjg3IDcyLjA3NjkgMzQuNjU1NiA3Mi4wNzY5IDQ1LjYwNTRDNzIuMDc2OSA2OC43ODIgNjAuODUxOSA3My41MjMyIDQzLjk4OTcgNzMuNTIzMlpNMzUuMDI5NiAzOS42NzE5QzM1LjAyOTYgMzcuNTkwNiAzNi40MTI0IDM1LjgyNjggMzguMzEwMyAzNS4yMzQxQzM3LjI2NjEgMzQuMjY3NiAzNS44NjkxIDMzLjY3NDkgMzQuMzMxMSAzMy42NzQ5QzMxLjEwNjggMzMuNjc0OSAyOC40NjgxIDM2LjI5OTUgMjguNDY4MSAzOS41MDI2VjUxLjE1NzlDMjguNDY4MSA1NC4zNjEgMzEuMTA2OCA1Ni45ODU2IDM0LjMzMTEgNTYuOTg1NkMzNy41NTU0IDU2Ljk4NTYgNDAuMTk0IDU0LjM2ODEgNDAuMTk0IDUxLjE1NzlWNDQuMzAwMkM0MC4wMzE4IDQ0LjMxNDMgMzkuODY5NSA0NC4zMjg0IDM5LjcwNzIgNDQuMzI4NEMzNy4xMTc5IDQ0LjMyODQgMzUuMDIyNSA0Mi4yNDcxIDM1LjAyMjUgMzkuNjc5TDM1LjAyOTYgMzkuNjcxOVpNNTcuMjExNCAzNC44ODg0QzU1LjQxMjMgMzUuNTM3NSA1NC4xMjgyIDM3LjI0NDkgNTQuMTI4MiAzOS4yNTU3VjM5LjI2MjdDNTQuMTI4MiA0MS44MzA4IDU2LjIyMzYgNDMuOTEyMSA1OC44MTI5IDQzLjkxMjFDNTkuMDUyOCA0My45MTIxIDU5LjI4NTYgNDMuODkxIDU5LjUxMTQgNDMuODU1N1Y1MS4xNTc5QzU5LjUxMTQgNTQuMzY4MSA1Ni44NzI3IDU2Ljk4NTYgNTMuNjQ4NCA1Ni45ODU2QzUwLjQyNDIgNTYuOTg1NiA0Ny43ODU1IDU0LjM2MSA0Ny43ODU1IDUxLjE1NzlWMzkuNTAyNkM0Ny43ODU1IDM2LjI5OTUgNTAuNDI0MiAzMy42NzQ5IDUzLjY0ODQgMzMuNjc0OUM1NC45ODg5IDMzLjY3NDkgNTYuMjIzNiAzNC4xMzM1IDU3LjIxMTQgMzQuODg4NFoiIGZpbGw9IiMwQzBEMTQiLz4KPC9zdmc+Cg==", - "shortDescription": "Allow games to be hosted on CrazyGames website and display ads.", - "version": "1.3.0", - "description": [ - "Please refer to [CrazyGames' guide](https://docs.crazygames.com/sdk/html5-v2/intro/) to know when to call the different actions.", - "", - "### Patch note", - "- 1.3.0: The SDK have to be manually called via an action." - ], - "origin": { - "identifier": "CrazyGamesAdApi", - "name": "gdevelop-extension-store" - }, - "tags": [ - "api", - "crazygames" - ], - "authorIds": [ - "rotBq28wITdtfsrE7McHQri4k2w2", - "2OwwM8ToR9dx9RJ2sAKTcrLmCB92", - "mnImQKdn8nQxwzkS5D6a1JB27V23", - "taRwmWxwAFYFL9yyBwB3cwBw0BO2" - ], - "dependencies": [], - "globalVariables": [], - "sceneVariables": [], - "eventsFunctions": [ - { - "fullName": "", - "functionType": "Action", - "name": "onFirstSceneLoaded", - "sentence": "", - "events": [ + "description": "Banner name", + "name": "BannerName", + "type": "string" + }, { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "gdjs._crazyGamesExtension = {", - " isSdkReady: false,", - " isPlayingVideoAd: false,", - " hasVideoAdJustFinishedPlaying: false,", - " isAdBlockerDetected: false,", - " links: new Map(),", - "};" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "description": "Ad size", + "name": "Size", + "supplementaryInformation": "[\"970x90\",\"320x50\",\"160x600\",\"336x280\",\"728x90\",\"300x600\",\"468x60\",\"970x250\",\"300x250\",\"250x250\",\"120x600\"]", + "type": "stringWithSelector" + }, + { + "description": "Position X", + "name": "PositionX", + "type": "expression" + }, + { + "description": "Position Y", + "name": "PositionY", + "type": "expression" } ], - "parameters": [], "objectGroups": [] }, { - "description": "Return an invite link.", - "fullName": "Invite link", - "functionType": "StringExpression", - "group": "Invite", - "name": "InviteLink", - "sentence": "", + "description": "Hide a banner.", + "fullName": "Hide a banner", + "functionType": "Action", + "group": "Banners", + "name": "HideBanner", + "sentence": "Hide the banner: _PARAM1_", "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const roomId = eventsFunctionContext.getArgument(\"RoomId\");\r", - "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.links.get(roomId) || \"\";" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": true - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const bannerName = eventsFunctionContext.getArgument(\"BannerName\");\r", + "CrazyGames.SDK.banner.clearBanner(bannerName);\r", + "" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { - "description": "Room id", - "name": "RoomId", + "description": "Banner name", + "name": "BannerName", "type": "string" } ], "objectGroups": [] }, { - "description": "Display an invite button.", - "fullName": "Display invite button", + "description": "Hide all banners.", + "fullName": "Hide all banners", "functionType": "Action", - "group": "Invite", - "name": "InviteButton", - "sentence": "Display an invite button for the room id: _PARAM1_", + "group": "Banners", + "name": "HideAllBanners", + "sentence": "Hide all the banners", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2627,115 +9611,306 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const logger = new gdjs.Logger(\"CrazyGames SDK\");", - "", - "const roomId = eventsFunctionContext.getArgument(\"RoomId\");", - "", - "window.CrazyGames.SDK.game.showInviteButton({", - " roomId,", - " //param2: \"value\",", - " //param3: \"value\"", - "}, (error, result) => {", - " if (error) {", - " logger.error(\"Invite button link error\", error);", - " } else {", - " logger.log(\"Invite button link\", result);", - " }", - "});" + "CrazyGames.SDK.banner.clearAllBanners();\r", + "" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] } ], - "parameters": [ - { - "description": "Room id", - "name": "RoomId", - "type": "string" - } - ], + "parameters": [], "objectGroups": [] }, { - "fullName": "", + "description": "Hide the invite button.", + "fullName": "Hide invite button", "functionType": "Action", - "name": "onScenePostEvents", - "sentence": "", + "group": "Game", + "name": "HideInviteButton", + "sentence": "Hide invite button", "events": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = false;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "CrazyGames.SDK.game.hideInviteButton();", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] } ], "parameters": [], "objectGroups": [] }, { - "description": "Load CrazyGames SDK.", - "fullName": "Load SDK", - "functionType": "Action", - "name": "LoadSDK", - "sentence": "Load CrazyGames SDK", + "description": "Get the environment.", + "fullName": "Get the environment", + "functionType": "StringExpression", + "group": "General", + "name": "Environment", + "sentence": "display environment into _PARAM1_", "events": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const logger = new gdjs.Logger(\"CrazyGames SDK\");\r", - "const addScript = (src) => {\r", - " return new Promise((resolve, reject) => {\r", - " const scriptElement = document.createElement('script');\r", - "\r", - " scriptElement.setAttribute('src', src);\r", - " scriptElement.addEventListener('load', resolve);\r", - " scriptElement.addEventListener('error', reject);\r", - "\r", - " document.body.appendChild(scriptElement);\r", - " });\r", - "}\r", - "addScript('https://sdk.crazygames.com/crazygames-sdk-v2.js').then(() => {\r", - " gdjs._crazyGamesExtension.isSdkReady = true;\r", - " logger.log(\"CrazyGames SDK successfully initialized.\");\r", - "})" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": true + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = CrazyGames.SDK.environment;", + "parameterObjects": "TextObject", + "useStrict": true, + "eventsSheetExpanded": false + } + ] } ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Check if the CrazyGames SDK is ready to be used.", - "fullName": "CrazyGames SDK is ready", - "functionType": "Condition", - "name": "IsSDKLoaded", - "sentence": "CrazyGames SDK is ready", + "async": true, + "description": "Retrieve user data.", + "fullName": "Retrieve user data", + "functionType": "Action", + "group": "User", + "name": "AuthenticateUser", + "sentence": "Retrieve user data", "events": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isSdkReady;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "console.log(\"Retrieving user start\");", + "async function authenticate() {", + " const isAvailable = CrazyGames.SDK.user.isUserAccountAvailable;", + " console.log(\"User account system available:\", isAvailable);", + "", + " try {", + " const user = await CrazyGames.SDK.user.getUser();", + " if (user) {", + " console.log(\"User info:\", user);", + "", + " const data = await getUserSession();", + " gdjs._crazyGamesExtension.userId = data.userId;", + " gdjs._crazyGamesExtension.username = user.username;", + " gdjs._crazyGamesExtension.profilePictureUrl = user.profilePictureUrl;", + " gdjs._crazyGamesExtension.userToken = await CrazyGames.SDK.user.getUserToken();", + "", + " eventsFunctionContext.task.resolve();", + " console.log(\"Retrieving user done\");", + " } else {", + " console.log(\"No user is signed in.\");", + " // Optionally, prompt the user to sign in", + " await showAuthPrompt();", + "", + " }", + " } catch (error) {", + " console.error(\"Error retrieving user info:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " eventsFunctionContext.task.resolve();", + " console.log(\"Retrieving user done\");", + " }", + "}", + "", + "async function showAuthPrompt() {", + " try {", + " const user = await CrazyGames.SDK.user.showAuthPrompt();", + " if (user) {", + " console.log(\"User signed in:\", user);", + " // Proceed with authenticated user", + " const data = await getUserSession();", + " gdjs._crazyGamesExtension.userId = data.userId;", + " gdjs._crazyGamesExtension.username = user.username;", + " gdjs._crazyGamesExtension.profilePictureUrl = user.profilePictureUrl;", + " eventsFunctionContext.task.resolve();", + " } else {", + " console.log(\"User dismissed the auth prompt.\");", + " // Handle the case where the user cancels the sign-in process", + " eventsFunctionContext.task.resolve();", + " }", + " } catch (error) {", + " console.error(\"Error during auth prompt:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " eventsFunctionContext.task.resolve();", + " }", + "}", + "", + "", + "async function getUserSession() {", + " let token = null;", + "", + " try {", + " console.log(\"Requesting a user token.\");", + " token = await CrazyGames.SDK.user.getUserToken();", + "", + " } catch (error) {", + " console.error(\"Error retrieving new user token:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " return null;", + " }", + "", + " return decodeJWT(token);", + "}", + "", + "// Decode in a lambda or server if you have one as decoding in clientside is not secure", + "function decodeJWT(token) {", + "", + " const parts = token.split('.');", + " if (parts.length !== 3) {", + " throw new Error('Invalid JWT format');", + " }", + "", + " const base64Url = parts[1];", + " const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');", + " const jsonPayload = decodeURIComponent(atob(base64).split('').map((char) => {", + " return '%' + ('00' + char.charCodeAt(0).toString(16)).slice(-2);", + " }).join(''));", + "", + " return JSON.parse(jsonPayload);", + "}", + "", + "async function handleLoggedInUser(user) {", + " const userToken = await CrazyGames.getUserToken();", + "", + " // Check if the CrazyGames account is linked to an in-game account", + " const isLinked = await checkIfAccountIsLinked(userToken);", + "", + " if (isLinked) {", + " // Case: There is a game account linked to this CrazyGames account", + " const gameData = await fetchGameData(userToken);", + " startGameWithData(gameData);", + " } else {", + " // Check if the user is logged into your in-game account", + " const isLoggedIntoGameAccount = await checkIfLoggedIntoGameAccount();", + "", + " if (isLoggedIntoGameAccount) {", + " // Case: User is logged into in-game account but not linked to CrazyGames", + " showLinkAccountButton();", + " } else {", + " // Case: No in-game account exists, create a new one linked to CrazyGames", + " const newGameData = await createNewGameAccount(userToken);", + " startGameWithData(newGameData);", + " }", + " }", + "}", + "", + "authenticate();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ] } ], "parameters": [], "objectGroups": [] }, { - "description": "Let CrazyGames know gameplay started.", - "fullName": "Gameplay started", + "async": true, + "description": "Show CrazyGames login window.", + "fullName": "Show CrazyGames login window", "functionType": "Action", - "name": "SetGameplayStarted", - "sentence": "Let CrazyGames know gameplay started", + "group": "User", + "name": "ShowAuthWindow", + "sentence": "Show CrazyGames login window", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2754,12 +9929,71 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "window.CrazyGames.SDK.game.gameplayStart();", - "" + "async function showAuthPrompt() {", + " try {", + " const user = await CrazyGames.SDK.user.showAuthPrompt();", + " if (user) {", + " console.log(\"User signed in:\", user);", + " // Proceed with authenticated user", + " await getUserData();", + " const data = await getUserSession();", + " gdjs._crazyGamesExtension.userId = data.userId;", + " gdjs._crazyGamesExtension.username = user.username;", + " gdjs._crazyGamesExtension.profilePictureUrl = user.profilePictureUrl;", + " eventsFunctionContext.task.resolve();", + " } else {", + " console.log(\"User dismissed the auth prompt.\");", + " // Handle the case where the user cancels the sign-in process", + " eventsFunctionContext.task.resolve();", + " }", + " } catch (error) {", + " console.error(\"Error during auth prompt:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " eventsFunctionContext.task.resolve();", + " }", + "}", + "", + "async function getUserData() {", + " const userData = await getUserSession();", + " console.log(\"Decoded user data:\", userData);", + "", + "}", + "", + "async function getUserSession() {", + " let token = null;", + "", + " try {", + " console.log(\"Requesting a user token.\");", + " token = await CrazyGames.SDK.user.getUserToken();", + " } catch (error) {", + " console.error(\"Error retrieving new user token:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " return null;", + " }", + "", + " return decodeJWT(token);", + "}", + "", + "function decodeJWT(token) {", + " const parts = token.split('.');", + " if (parts.length !== 3) {", + " throw new Error('Invalid JWT format');", + " }", + "", + " const base64Url = parts[1];", + " const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');", + " const jsonPayload = decodeURIComponent(atob(base64).split('').map((char) => {", + " return '%' + ('00' + char.charCodeAt(0).toString(16)).slice(-2);", + " }).join(''));", + "", + " return JSON.parse(jsonPayload);", + "}", + "", + "showAuthPrompt();" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ] } @@ -2768,12 +10002,39 @@ "objectGroups": [] }, { - "description": "Let CrazyGames know gameplay stopped.", - "fullName": "Gameplay stopped", + "async": true, + "description": "Show account link prompt.", + "fullName": "Show account link prompt", "functionType": "Action", - "name": "SetGameplayStoped", - "sentence": "Let CrazyGames know gameplay stopped", + "group": "User", + "name": "LinkAccount", + "sentence": "Show account link prompt", "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "BuiltinAsync::ResolveAsyncEventsFunction" + }, + "parameters": [ + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -2792,12 +10053,24 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "window.CrazyGames.SDK.game.gameplayStop();", - "" + "async function linkAccount() {", + " try {", + " const response = await CrazyGames.SDK.user.showAccountLinkPrompt();", + " console.log(\"Link account response\", response);", + " gdjs._crazyGamesExtension.linkAccountResponse = response.response;", + " } catch (error) {", + " console.log(\"Error:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " }", + "", + " eventsFunctionContext.task.resolve();", + "}", + "", + "linkAccount();" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ] } @@ -2806,11 +10079,12 @@ "objectGroups": [] }, { - "description": "Let CrazyGames know loading started.", - "fullName": "Loading started", - "functionType": "Action", - "name": "SetLoadingStarted", - "sentence": "Let CrazyGames know loading started", + "description": "the username.", + "fullName": "Username", + "functionType": "ExpressionAndCondition", + "group": "User", + "name": "UserName", + "sentence": "Username is", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2829,10 +10103,7 @@ "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "window.CrazyGames.SDK.game.sdkGameLoadingStart();", - "" - ], + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.username;", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false @@ -2840,15 +10111,41 @@ ] } ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Let CrazyGames know loading stopped.", - "fullName": "Loading stopped", - "functionType": "Action", - "name": "SetLoadingStopped", - "sentence": "Let CrazyGames know loading stopped", + "description": "the CrazyGames User ID.", + "fullName": "CrazyGames User ID", + "functionType": "ExpressionAndCondition", + "group": "User", + "name": "CrazyGamesUserID", + "sentence": "CrazyGames user ID is", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.userId;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Get user signed in profile picture url.", + "fullName": "Get user signed in profile picture url", + "functionType": "StringExpression", + "group": "User", + "name": "ProfilePic", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2867,10 +10164,7 @@ "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "window.CrazyGames.SDK.game.sdkGameLoadingStop();", - "" - ], + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.profilePictureUrl;", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false @@ -2878,15 +10172,19 @@ ] } ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Display a video ad. The game is automatically muted while the video is playing.", - "fullName": "Display video ad", - "functionType": "Action", - "name": "DisplayCrazyGamesAd", - "sentence": "Display _PARAM1_ video ad", + "description": "Return true when the user prefers to instantly join a lobby.", + "fullName": "Is instantly joining a lobby", + "functionType": "StringExpression", + "group": "Game", + "name": "IsInstantMultiplayer", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -2905,113 +10203,72 @@ "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const logger = new gdjs.Logger(\"CrazyGames SDK\");", - "", - "const adType = eventsFunctionContext.getArgument(\"AdType\");", - "", - "const volume = runtimeScene.getSoundManager().getGlobalVolume();", - "window.CrazyGames.SDK.ad.requestAd(adType, {", - " adStarted: () => {", - " gdjs._crazyGamesExtension.isPlayingVideoAd = true;", - " runtimeScene.getSoundManager().setGlobalVolume(0);", - " },", - " adFinished: () => {", - " gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = true;", - " gdjs._crazyGamesExtension.isPlayingVideoAd = false;", - " if (runtimeScene.getSoundManager().getGlobalVolume() === 0) {", - " runtimeScene.getSoundManager().setGlobalVolume(volume);", - " }", - " },", - " adError: (error, errorData) => {", - " gdjs._crazyGamesExtension.isPlayingVideoAd = false;", - " gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying = true;", - " if (runtimeScene.getSoundManager().getGlobalVolume() === 0) {", - " runtimeScene.getSoundManager().setGlobalVolume(volume);", - " }", - " logger.error(`Error ${adType} ad (callback): `, error, errorData);", - " },", - "});" - ], + "inlineCode": "eventsFunctionContext.returnValue = CrazyGames.SDK.game.isInstantMultiplayer;", "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] } ], - "parameters": [ - { - "description": "Ad Type", - "name": "AdType", - "supplementaryInformation": "[\"midgame\",\"rewarded\"]", - "type": "stringWithSelector" - } - ], - "objectGroups": [] - }, - { - "description": "Checks if a video ad just finished playing successfully.", - "fullName": "Video ad just finished playing", - "functionType": "Condition", - "name": "AdFinishedPlaying", - "sentence": "Video ad just finished playing", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.hasVideoAdJustFinishedPlaying;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Checks if a video ad is playing.", - "fullName": "Video ad is playing", - "functionType": "Condition", - "name": "IsVideoAdPlaying", - "sentence": "Video ad is playing", + "description": "Return true if the user prefers the chat disabled.", + "fullName": "Is the user chat disabled", + "functionType": "StringExpression", + "group": "Game", + "name": "IsDisableChat", + "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isPlayingVideoAd;", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CrazyGamesAdApi::IsSDKLoaded" + }, + "parameters": [ + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = CrazyGames.SDK.game.settings.disableChat;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] } ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Check if Ad had an error.", - "fullName": "Check if Ad had an error", - "functionType": "Condition", - "name": "AdHadAnError", - "private": true, - "sentence": "Ad had an error", - "events": [], - "parameters": [], - "objectGroups": [] - }, - { - "async": true, - "description": "Generate an invite link to invite friends to join your game sessions. This URL can be added to the clipboard or displayed in the game to let the user select it.", - "fullName": "Generate an invite link", - "functionType": "Action", - "group": "Invite", - "name": "GenerateInviteLink", - "sentence": "Generate an invite link for _PARAM1_", + "description": "Retrieves user system info, browser, version and device.", + "fullName": "Retrieves user system info", + "functionType": "StringExpression", + "group": "User", + "name": "SystemInfo", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, "value": "CrazyGamesAdApi::IsSDKLoaded" }, "parameters": [ @@ -3020,17 +10277,32 @@ ] } ], - "actions": [ + "actions": [], + "events": [ { - "type": { - "value": "BuiltinAsync::ResolveAsyncEventsFunction" - }, - "parameters": [ - "" - ] + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = JSON.stringify(CrazyGames.SDK.user.systemInfo);", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false } ] - }, + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Get invite parameters if user is invited to this game.", + "fullName": "Get invite parameters", + "functionType": "StringExpression", + "group": "Game", + "name": "InviteParam", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3049,43 +10321,40 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const roomId = eventsFunctionContext.getArgument(\"RoomId\");", - "", - "const logger = new gdjs.Logger(\"CrazyGames SDK\");", - "window.CrazyGames.SDK.game.inviteLink(", - " { roomId },", - " (error, link) => {", - " if (error) {", - " logger.error(\"Invite link error.\", error);", - " } else {", - " gdjs._crazyGamesExtension.links.set(roomId, link);", - " eventsFunctionContext.task.resolve();", - " }", - " }", - ");" + "const param = eventsFunctionContext.getArgument(\"Param\").toString();\r", + "eventsFunctionContext.returnValue = CrazyGames.SDK.game.getInviteParam(param);" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] } ], + "expressionType": { + "type": "string" + }, "parameters": [ { - "description": "Room id", - "name": "RoomId", + "description": "Param", + "name": "Param", "type": "string" } ], "objectGroups": [] }, { - "description": "Display an happy time by emitting sparkling confetti. The celebration should remain a special moment.", - "fullName": "Display happy time", + "description": "Save the session data.", + "fullName": "Save session data", "functionType": "Action", - "name": "DisplayHappyTime", - "sentence": "Display happy time", + "group": "Data", + "name": "SaveSessionData", + "sentence": "Save session data, with the id: _PARAM1_ to: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3104,50 +10373,52 @@ "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "window.CrazyGames.SDK.game.happytime();", + "inlineCode": [ + "// Storing Persistent User Data", + "async function saveUserData(key, value) {", + " try {", + " await CrazyGames.SDK.data.setItem(key, value);", + " console.log(`Data saved: ${key} = ${value}`);", + " } catch (error) {", + " console.error(\"Error saving user data:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", + " }", + "}", + "", + "const key = eventsFunctionContext.getArgument('Id').toString();", + "const value = eventsFunctionContext.getArgument('Value').valueOf();", + "", + "saveUserData(key, value);" + ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": false + "eventsSheetExpanded": true } ] } ], - "parameters": [], + "parameters": [ + { + "description": "Id", + "name": "Id", + "type": "string" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], "objectGroups": [] }, { - "async": true, - "description": "Scan for adblockers.", - "fullName": "Scan for adblockers", - "functionType": "Action", - "name": "ScanForAdBlockers", - "sentence": "Scan for adblockers", + "description": "Get user session data.", + "fullName": "Get user session data", + "functionType": "Expression", + "group": "Data", + "name": "SessionData", + "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "CrazyGamesAdApi::IsSDKLoaded" - }, - "parameters": [ - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "BuiltinAsync::ResolveAsyncEventsFunction" - }, - "parameters": [ - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -3166,53 +10437,103 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const logger = new gdjs.Logger(\"CrazyGames SDK\");", - "window.CrazyGames.SDK.ad.hasAdblock((error, result) => {", - " if (error) {", - " logger.error(\"Unable to scan adblockers.\", error);", - " gdjs._crazyGamesExtension.latestError = error;", - " } else {", - " gdjs._crazyGamesExtension.isAdBlockerDetected = result;", - " eventsFunctionContext.task.resolve();", - " }", - "});" + "const key = eventsFunctionContext.getArgument('Id').toString();\r", + "\r", + "eventsFunctionContext.returnValue = CrazyGames.SDK.data.getItem(key);" ], "parameterObjects": "", "useStrict": true, - "eventsSheetExpanded": true + "eventsSheetExpanded": false } ] } ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Id", + "name": "Id", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the availability of the user's account.", + "fullName": "Is user account available", + "functionType": "ExpressionAndCondition", + "group": "User", + "name": "IsUserAccountAvailable", + "sentence": "The CrazyGames user account is available", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = window.CrazyGames.SDK.user.isUserAccountAvailable;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { - "description": "Check if user is using an ad blocker. This condition is always false before the \"Scan for adblockers\" is called.", - "fullName": "Ad blocker is detected", - "functionType": "Condition", - "name": "IsAdBlocked", - "sentence": "Ad blocker is detected", + "description": "Retrieve the user's session token for authentication.", + "fullName": "Get User Token", + "functionType": "StringExpression", + "group": "User", + "name": "UserToken", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.userToken;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Retrieve the authentication token from Xsolla.", + "fullName": "Get Xsolla Token", + "functionType": "StringExpression", + "group": "User", + "name": "XsollaToken", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.isAdBlockerDetected;", + "inlineCode": "eventsFunctionContext.returnValue = gdjs._crazyGamesExtension.xsollaToken;", "parameterObjects": "", "useStrict": true, "eventsSheetExpanded": false } ], + "expressionType": { + "type": "string" + }, "parameters": [], "objectGroups": [] }, { "async": true, - "description": "Display a banner that can be called once per 60 seconds.", - "fullName": "Display a banner", + "description": "Generate Xsolla token.", + "fullName": "Generate Xsolla token", "functionType": "Action", - "group": "Banner", - "name": "DisplayBanner", - "sentence": "Display a banner: _PARAM1_ at position _PARAM3_ ; _PARAM4_ with size _PARAM2_", + "group": "User", + "name": "GenerateXsollaToken", + "sentence": "Generate Xsolla token", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -3257,43 +10578,18 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "const logger = new gdjs.Logger(\"CrazyGames SDK\");", - "const bannerName = eventsFunctionContext.getArgument(\"BannerName\");", - "const positionX = eventsFunctionContext.getArgument(\"PositionX\");", - "const positionY = eventsFunctionContext.getArgument(\"PositionY\");", - "const adDimension = eventsFunctionContext.getArgument(\"Size\").split(\"x\");", - "const size = {", - " width: Number(adDimension[0]) || 0,", - " height: Number(adDimension[1]) || 0", - "}", - "", - "// Create a container for the banner if needed", - "if (document.getElementById(bannerName) === null) {", - " const div = document.createElement('div');", - " div.id = bannerName;", - " div.setAttribute(\"style\", \"pointer-events: none; position:fixed; z-index:1; width: \" + size.width + \"px; height: \" + size.height + \"px;left:\" + positionX + \"px; top:\" + positionY + \"px;\");", - "", - " const body = document.getElementsByTagName(\"body\")[0];", - " // Insert the new container in first position in the body", - " body.insertBefore(div, body.firstChild);", - "}", - "", - "", - "// Available size '728x90', '300x250', '320x50', '468x60', '320x100'", - "// x, y coordinates are from the top left of the screen", - "window.CrazyGames.SDK.banner.requestBanner({", - " id: bannerName,", - " width: size.width,", - " height: size.height,", - "}, (error, result) => {", - " if (error) {", - " logger.error(\"Error on request banner.\", error);", - " } else {", - " // Result is always undefined when requesting banners", - " logger.log(\"End request banner\", result === undefined ? \"Requesting banners\" : result);", + "(async () => {", + " try {", + " const token = await window.CrazyGames.SDK.user.getXsollaUserToken();", + " gdjs._crazyGamesExtension.xsollaToken = token;", + " console.log(\"Get Xsolla token result\", token);", + " eventsFunctionContext.task.resolve();", + " } catch (error) {", + " console.log(\"Error:\", error);", + " gdjs._crazyGamesExtension.lastErrorDescription = JSON.stringify(error);", " eventsFunctionContext.task.resolve();", " }", - "});" + "})();" ], "parameterObjects": "", "useStrict": true, @@ -3302,98 +10598,6 @@ ] } ], - "parameters": [ - { - "description": "Banner name", - "name": "BannerName", - "type": "string" - }, - { - "description": "Ad size", - "name": "Size", - "supplementaryInformation": "[\"728x90\",\"300x250\",\"320x50\",\"468x60\",\"320x100\"]", - "type": "stringWithSelector" - }, - { - "description": "Position X", - "name": "PositionX", - "type": "expression" - }, - { - "description": "Position Y", - "name": "PositionY", - "type": "expression" - } - ], - "objectGroups": [] - }, - { - "description": "Hide a banner.", - "fullName": "Hide a banner", - "functionType": "Action", - "group": "Banner", - "name": "HideBanner", - "sentence": "Hide the banner: _PARAM1_", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "const bannerName = eventsFunctionContext.getArgument(\"BannerName\");\r", - "window.CrazyGames.SDK.banner.clearBanner(bannerName);\r", - "" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "parameters": [ - { - "description": "Banner name", - "name": "BannerName", - "type": "string" - } - ], - "objectGroups": [] - }, - { - "description": "Hide all banners.", - "fullName": "Hide all banners", - "functionType": "Action", - "group": "Banner", - "name": "HideAllBanners", - "sentence": "Hide all the banners", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": [ - "window.CrazyGames.SDK.banner.clearAllBanners();\r", - "" - ], - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], - "parameters": [], - "objectGroups": [] - }, - { - "description": "Hide the invite button.", - "fullName": "Hide invite button", - "functionType": "Action", - "group": "Invite", - "name": "HideInviteButton", - "sentence": "Hide invite button", - "events": [ - { - "type": "BuiltinCommonInstructions::JsCode", - "inlineCode": "window.CrazyGames.SDK.game.hideInviteButton();", - "parameterObjects": "", - "useStrict": true, - "eventsSheetExpanded": false - } - ], "parameters": [], "objectGroups": [] } @@ -4855,9 +12059,16 @@ ], "eventsBasedObjects": [ { + "areaMaxX": 64, + "areaMaxY": 64, + "areaMaxZ": 64, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, "defaultName": "Button", "description": "A button that can be customized.", "fullName": "Button (panel sprite)", + "isUsingLegacyInstancesRenderer": true, "name": "PanelSpriteButton", "eventsFunctions": [ { @@ -6248,6 +13459,7 @@ "text": "Text", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -6335,7 +13547,39 @@ "objectName": "Pressed" } ] - } + }, + "objectsGroups": [], + "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": [] + } + ], + "instances": [] } ] }, @@ -12484,6 +19728,5 @@ "eventsBasedObjects": [] } ], - "externalLayouts": [], - "externalSourceFiles": [] + "externalLayouts": [] } \ No newline at end of file diff --git a/examples/crazygames-sdk-demo/preview.png b/examples/crazygames-sdk-demo/preview.png new file mode 100644 index 000000000..a8a32d4d5 Binary files /dev/null and b/examples/crazygames-sdk-demo/preview.png differ