diff --git a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json index 1ec8788bb..f5a7dc629 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -803,13 +803,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 1, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -855,13 +855,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 1, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ] @@ -874,13 +874,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 0, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -3440,24 +3440,22 @@ "Physics2", "0.5" ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score", + "=", + "TimerElapsedTime(\"Time\")" + ] } ], "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CompareTimer" - }, - "parameters": [ - "", - "\"Time\"", - ">=", - "HighScore" - ] - } - ], + "conditions": [], "actions": [ { "type": { @@ -3473,7 +3471,7 @@ }, "parameters": [ "", - "\"Game\"", + "\"Leaderboard\"", "" ] } @@ -3520,17 +3518,7 @@ "parameters": [ "HighScore", "=", - "TimerElapsedTime(\"Time\")" - ] - }, - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Score", - "=", - "HighScore" + "Score" ] }, { @@ -3551,24 +3539,6 @@ "BestTimeText", "\"248;231;28\"" ] - }, - { - "type": { - "value": "Wait" - }, - "parameters": [ - "1.5" - ] - }, - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Leaderboard\"", - "" - ] } ] } diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index 9fdeafd2f..0dab19d32 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -199,15 +199,6 @@ "name": "gdevelop-asset-store" } }, - { - "alwaysLoaded": false, - "file": "thumbnail.png", - "kind": "image", - "metadata": "", - "name": "thumbnail.png", - "smoothed": true, - "userAdded": true - }, { "alwaysLoaded": false, "file": "desktop-icon-512.png", @@ -451,45 +442,6 @@ "smoothed": true, "userAdded": true }, - { - "alwaysLoaded": false, - "file": "assets/Grey Button_Hovered.png", - "kind": "image", - "metadata": "", - "name": "Grey Button_Hovered.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/b43e0035dca80ea2fad5c5d65de926dae0185038e5f9cb21d5f20234f30d1c76_Grey Button_Hovered.png", - "name": "Grey Button_Hovered.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Grey Button_Idle.png", - "kind": "image", - "metadata": "", - "name": "Grey Button_Idle.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/da7fc2efa0882eb5dfa0266315f2483c2f68d86a6751dc309ea9e9d0dd4759ba_Grey Button_Idle.png", - "name": "Grey Button_Idle.png" - } - }, - { - "alwaysLoaded": false, - "file": "assets/Grey Button_Pressed.png", - "kind": "image", - "metadata": "", - "name": "Grey Button_Pressed.png", - "smoothed": true, - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/49c35e14af0e1f7aae407455cb944de96328955870e5f1500f63723ad879a42e_Grey Button_Pressed.png", - "name": "Grey Button_Pressed.png" - } - }, { "alwaysLoaded": false, "file": "assets/Grey Button_Idle.png", @@ -568,6 +520,56 @@ "name": "assets/thumbnail-game.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/Yellow Jelly Button_Hovered.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Hovered.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/5cc04ef76aad172a63070469c328ceb3f74207115ad9c2321ccfe0d5755677a0_Yellow Jelly Button_Hovered.png", + "name": "Yellow Jelly Button_Hovered.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Yellow Jelly Button_Idle.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Idle.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/04f6f22d3160fa528875b199bb7bd4f35cf3f20fb8fde4a5d960f01df9bee3a3_Yellow Jelly Button_Idle.png", + "name": "Yellow Jelly Button_Idle.png" + } + }, + { + "alwaysLoaded": false, + "file": "assets/Yellow Jelly Button_Pressed.png", + "kind": "image", + "metadata": "", + "name": "Yellow Jelly Button_Pressed.png", + "smoothed": true, + "userAdded": true, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/11abe8b7d577c30b71789404003c50b3fe73d63492fd30669a5153bc67ac0a60_Yellow Jelly Button_Pressed.png", + "name": "Yellow Jelly Button_Pressed.png" + } + }, + { + "file": "assets/Rubik-Regular.ttf", + "kind": "font", + "metadata": "", + "name": "Rubik-Regular.ttf", + "userAdded": false, + "origin": { + "identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/edbc88d46437d6403d3670eb084bcbdf08872c9f54a34ed1536c1013c412bd3b_Rubik-Regular.ttf", + "name": "Rubik-Regular.ttf" + } } ], "resourceFolders": [] @@ -612,7 +614,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.2513639033607487, + "zoomFactor": 0.296700446389139, "windowMask": false }, "objectsGroups": [], @@ -643,16 +645,16 @@ }, { "angle": 0, - "customSize": false, - "height": 0, - "keepRatio": true, + "customSize": true, + "depth": 0.7533843437316066, + "height": 1280, "layer": "", - "name": "Start", - "persistentUuid": "f2b90890-dbe7-461a-b1d6-bbf8562d6a97", - "width": 0, - "x": 231, - "y": 927, - "zOrder": 12, + "name": "Background", + "persistentUuid": "b7b198d8-9488-40cf-9db1-e4ecf0948490", + "width": 720, + "x": 0, + "y": 0, + "zOrder": 0, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -660,16 +662,16 @@ { "angle": 0, "customSize": true, - "depth": 1, - "height": 1809, + "depth": 48, + "height": 164, "keepRatio": true, "layer": "", - "name": "Background", - "persistentUuid": "b7b198d8-9488-40cf-9db1-e4ecf0948490", - "width": 1455, - "x": -355, - "y": -201, - "zOrder": 0, + "name": "Start", + "persistentUuid": "3ab9933c-090d-4487-962a-4651bb6a85e8", + "width": 431, + "x": 135, + "y": 936, + "zOrder": 12, "numberProperties": [], "stringProperties": [], "initialVariables": [] @@ -686,15 +688,26 @@ "underlined": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "string": "LANE RUNNER", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", - "characterSize": 80, + "characterSize": 90, "color": { - "b": 236, - "g": 236, - "r": 61 + "b": 61, + "g": 159, + "r": 236 }, "content": { "bold": false, @@ -714,62 +727,94 @@ "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", "verticalTextAlignment": "top", - "characterSize": 80, - "color": "61;236;236" + "characterSize": 90, + "color": "236;159;61" } }, { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "assetStoreId": "2d701679df0e067e63e657f3a7de8b0c076c1c0db19e7c6070c186b28a611df2", + "height": 256, + "name": "Background", + "texture": "tiled_black space.png", + "type": "TiledSpriteObject::TiledSprite", + "width": 256, + "variables": [], + "effects": [], + "behaviors": [ + { + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ] + }, + { + "assetStoreId": "055eaaaceaa6fa09820aff95e0291764fbd98d84a9c2fb8cb3c4e059010a477b", "name": "Start", "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "content": { - "LeftPadding": 16, - "RightPadding": 16, - "PressedLabelOffsetY": 10, - "BottomPadding": 32, - "TopPadding": 16, - "HoveredFadeOutDuration": 0.25 + "BottomPadding": 16, + "TopPadding": 0, + "LeftPadding": 10, + "RightPadding": 10, + "PressedLabelOffsetY": 3 }, "childrenContent": { "Hovered": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Hovered.png", - "tiled": true, - "topMargin": 16, + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "rightMargin": 32, + "texture": "Yellow Jelly Button_Hovered.png", + "tiled": false, + "topMargin": 50, "width": 256 }, "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Idle.png", - "tiled": true, - "topMargin": 16, + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "rightMargin": 32, + "texture": "Yellow Jelly Button_Idle.png", + "tiled": false, + "topMargin": 50, "width": 256 }, "Label": { - "bold": false, + "bold": true, "italic": false, "smoothed": true, "underlined": false, "string": "Start", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Rubik-Regular.ttf", "textAlignment": "center", - "characterSize": 60, + "characterSize": 80, "color": { - "b": 79, - "g": 72, - "r": 72 + "b": 0, + "g": 42, + "r": 117 }, "content": { - "bold": false, + "bold": true, "isOutlineEnabled": false, "isShadowEnabled": false, "italic": false, @@ -783,35 +828,24 @@ "smoothed": true, "underlined": false, "text": "Start", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", + "font": "Rubik-Regular.ttf", "textAlignment": "center", "verticalTextAlignment": "top", - "characterSize": 60, - "color": "72;72;79" + "characterSize": 80, + "color": "117;42;0" } }, "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Grey Button_Pressed.png", - "tiled": true, - "topMargin": 32, + "bottomMargin": 50, + "height": 128, + "leftMargin": 37, + "rightMargin": 32, + "texture": "Yellow Jelly Button_Pressed.png", + "tiled": false, + "topMargin": 50, "width": 256 } } - }, - { - "assetStoreId": "2d701679df0e067e63e657f3a7de8b0c076c1c0db19e7c6070c186b28a611df2", - "height": 256, - "name": "Background", - "texture": "tiled_black space.png", - "type": "TiledSpriteObject::TiledSprite", - "width": 256, - "variables": [], - "effects": [], - "behaviors": [] } ], "objectsFolderStructure": { @@ -905,6 +939,10 @@ } ], "behaviorsSharedData": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior" + }, { "name": "Effect", "type": "EffectCapability::EffectBehavior" diff --git a/examples/3d-lane-runner/assets/Grey Button_Hovered.png b/examples/3d-lane-runner/assets/Grey Button_Hovered.png deleted file mode 100644 index 8065deaec..000000000 Binary files a/examples/3d-lane-runner/assets/Grey Button_Hovered.png and /dev/null differ diff --git a/examples/3d-lane-runner/assets/Grey Button_Pressed.png b/examples/3d-lane-runner/assets/Grey Button_Pressed.png deleted file mode 100644 index 6735c8e5e..000000000 Binary files a/examples/3d-lane-runner/assets/Grey Button_Pressed.png and /dev/null differ diff --git a/examples/3d-lane-runner/assets/Rubik-Regular.ttf b/examples/3d-lane-runner/assets/Rubik-Regular.ttf new file mode 100644 index 000000000..8b7b632f9 Binary files /dev/null and b/examples/3d-lane-runner/assets/Rubik-Regular.ttf differ diff --git a/examples/3d-lane-runner/assets/Yellow Jelly Button_Hovered.png b/examples/3d-lane-runner/assets/Yellow Jelly Button_Hovered.png new file mode 100644 index 000000000..486718b3a Binary files /dev/null and b/examples/3d-lane-runner/assets/Yellow Jelly Button_Hovered.png differ diff --git a/examples/3d-lane-runner/assets/Yellow Jelly Button_Idle.png b/examples/3d-lane-runner/assets/Yellow Jelly Button_Idle.png new file mode 100644 index 000000000..f8537b75a Binary files /dev/null and b/examples/3d-lane-runner/assets/Yellow Jelly Button_Idle.png differ diff --git a/examples/3d-lane-runner/assets/Yellow Jelly Button_Pressed.png b/examples/3d-lane-runner/assets/Yellow Jelly Button_Pressed.png new file mode 100644 index 000000000..c95313089 Binary files /dev/null and b/examples/3d-lane-runner/assets/Yellow Jelly Button_Pressed.png differ diff --git a/examples/3d-road-crosser/3d-road-crosser.json b/examples/3d-road-crosser/3d-road-crosser.json index bdf252566..1dcdd3f83 100644 --- a/examples/3d-road-crosser/3d-road-crosser.json +++ b/examples/3d-road-crosser/3d-road-crosser.json @@ -1,7 +1,7 @@ { "firstLayout": "", "gdVersion": { - "build": 213, + "build": 217, "major": 5, "minor": 4, "revision": 0 @@ -445,6 +445,15 @@ "name": "assets/thumbnail-game.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/rotate-screen-icon.png", + "kind": "image", + "metadata": "", + "name": "assets/rotate-screen-icon.png", + "smoothed": true, + "userAdded": false } ], "resourceFolders": [] @@ -627,7 +636,7 @@ }, { "folded": true, - "name": "Heighscore", + "name": "Highscore", "type": "number", "value": 0 }, @@ -771,7 +780,7 @@ "height": 0, "keepRatio": true, "layer": "Game Over", - "name": "GameOverHeighscoreText", + "name": "GameOverHighscoreText", "persistentUuid": "7147577d-cba5-4745-bd87-4accf829d7aa", "width": 0, "x": 167, @@ -1274,6 +1283,24 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "UI", + "locked": true, + "name": "NewScreenOrientationChecker", + "persistentUuid": "da72da51-0038-473d-b694-6f280f0693ef", + "sealed": true, + "width": 0, + "x": 0, + "y": 0, + "zOrder": 33, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -1896,6 +1923,7 @@ "text": "0", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 60, "color": "255;255;255" } @@ -1990,6 +2018,7 @@ "text": "0", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 60, "color": "250;241;126" } @@ -2132,6 +2161,7 @@ "text": "Score:", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 100, "color": "255;255;255" } @@ -2140,7 +2170,7 @@ "assetStoreId": "", "bold": true, "italic": false, - "name": "GameOverHeighscoreText", + "name": "GameOverHighscoreText", "smoothed": true, "type": "TextObject::Text", "underlined": false, @@ -2186,6 +2216,7 @@ "text": "Highscore:", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 70, "color": "255;255;255" } @@ -2268,6 +2299,7 @@ "text": "RETRY", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2362,6 +2394,7 @@ "text": "SUMBIT SCORE", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2463,6 +2496,7 @@ "text": "PLAY", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2564,6 +2598,7 @@ "text": "SHOP", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -2665,6 +2700,7 @@ "text": "LEADERBOARD", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3469,6 +3505,7 @@ "text": "100", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "250;241;126" } @@ -3554,6 +3591,7 @@ "text": "BUY", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3709,6 +3747,7 @@ "text": "BACK", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3810,6 +3849,7 @@ "text": "SETTINGS", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3893,6 +3933,7 @@ "text": "It displays the value when it changes.", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 30, "color": "255;255;255" } @@ -3959,6 +4000,7 @@ "text": "Sound volume:", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -4000,9 +4042,21 @@ "text": "ROAD\nCROSSER", "font": "45bf060c897266594bc78a4b12350be50bbc315510afc75ff4336b62228e68dc_MPLUS1p-Black.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 100, "color": "80;227;194" } + }, + { + "assetStoreId": "", + "name": "NewScreenOrientationChecker", + "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "IsForceShown": false + } } ], "objectsFolderStructure": { @@ -4114,7 +4168,7 @@ "objectName": "GameOverScoreText" }, { - "objectName": "GameOverHeighscoreText" + "objectName": "GameOverHighscoreText" }, { "objectName": "RetryButton" @@ -4195,6 +4249,9 @@ }, { "objectName": "Title" + }, + { + "objectName": "NewScreenOrientationChecker" } ] }, @@ -4303,9 +4360,9 @@ }, "parameters": [ "\"Save\"", - "\"Heighscore\"", + "\"Highscore\"", "", - "Heighscore" + "Highscore" ] }, { @@ -5856,7 +5913,18 @@ "parameters": [] } ], - "actions": [], + "actions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::Activate" + }, + "parameters": [ + "SubmitScoreButton", + "yes", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -5868,7 +5936,7 @@ "parameters": [ "Score", ">", - "Heighscore" + "Highscore" ] } ], @@ -5878,7 +5946,7 @@ "value": "SetNumberVariable" }, "parameters": [ - "Heighscore", + "Highscore", "=", "Score" ] @@ -5889,18 +5957,8 @@ }, "parameters": [ "\"Save\"", - "\"Heighscore\"", - "Heighscore" - ] - }, - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::Activate" - }, - "parameters": [ - "SubmitScoreButton", - "yes", - "" + "\"Highscore\"", + "Highscore" ] } ] @@ -5991,10 +6049,10 @@ "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "GameOverHeighscoreText", + "GameOverHighscoreText", "Text", "+", - "NewLine() + Heighscore" + "NewLine() + Highscore" ] } ] @@ -6061,7 +6119,7 @@ "value": "SetCenter" }, "parameters": [ - "GameOverHeighscoreText", + "GameOverHighscoreText", "=", "SceneWindowWidth() / 2", "=", @@ -6116,39 +6174,6 @@ ], "actions": [], "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "NumberVariable" - }, - "parameters": [ - "Score", - "!=", - "Heighscore" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::Activate" - }, - "parameters": [ - "SubmitScoreButton", - "", - "" - ] - } - ] - }, { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -6181,71 +6206,53 @@ "conditions": [ { "type": { - "value": "NumberVariable" + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" }, "parameters": [ - "Score", - "=", - "Heighscore" + "", + "\"c03f2d77-3863-4bfd-91cc-82c44a57d8ee\"", + "Score" ] } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "\"c03f2d77-3863-4bfd-91cc-82c44a57d8ee\"", - "Score" - ] - } + "type": { + "await": true, + "value": "PlayerAuthentication::OpenAuthenticationWindow" + }, + "parameters": [ + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "await": true, - "value": "PlayerAuthentication::OpenAuthenticationWindow" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" - }, - "parameters": [ - "", - "\"c03f2d77-3863-4bfd-91cc-82c44a57d8ee\"", - "Score" - ] - } + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "\"c03f2d77-3863-4bfd-91cc-82c44a57d8ee\"", + "Score" ] } ] @@ -6277,7 +6284,7 @@ }, "parameters": [ "SubmitScoreButton", - "\"SUBMITED!\"", + "\"SUBMITTED\"", "" ] } @@ -6308,7 +6315,7 @@ }, "parameters": [ "SubmitScoreButton", - "\"ERROR\"", + "\"SUBMIT\"", "" ] }, @@ -8067,6 +8074,939 @@ ], "externalEvents": [], "eventsFunctionsExtensions": [ + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Screen Orientation Checker", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", + "name": "ScreenOrientationChecker", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", + "shortDescription": "Display a screen asking the user to rotate their phone/tablet if not in the right orientation.", + "version": "0.0.1", + "description": "Display a screen asking the user to rotate their phone/tablet if not in the right orientation.", + "tags": [ + "screen", + "orientation" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "globalVariables": [ + { + "name": "TargetOrientation", + "type": "string", + "value": "" + } + ], + "sceneVariables": [], + "eventsFunctions": [ + { + "fullName": "Get game target orientation", + "functionType": "StringExpression", + "name": "ProjectOrientation", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "ScreenOrientationChecker::ProjectOrientation()" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "Automatically display a black screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Put this at position 0;0 on a UI layer (or a layer where the camera is not moving).", + "fullName": "Screen Orientation Checker", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "ScreenOrientationChecker", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::IsMobile" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Object", + "Resizable", + "ScreenWidth()", + "ScreenHeight()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "BackgroundPainter", + "0", + "0", + "SceneWindowWidth()", + "SceneWindowHeight()" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "inverted": true, + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 150" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Animate the icon" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game", + "fullName": "Force show the screen", + "functionType": "Condition", + "group": "Screen Orientation Checker configuration", + "name": "IsForceShown", + "sentence": "_PARAM0_ is forced to be shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game", + "fullName": "Force show the screen", + "functionType": "Action", + "group": "Screen Orientation Checker configuration", + "name": "SetIsForceShown", + "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Force show the screen?", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsShown" + }, + { + "value": "", + "type": "Boolean", + "label": "Force show the screen", + "description": "Use this to test the screen in your game", + "group": "", + "extraInformation": [], + "name": "IsForceShown" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "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": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "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": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 198, + "y": 62, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] + }, { "author": "", "category": "User interface", @@ -18096,6 +19036,7 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -21456,6 +22397,7 @@ "text": "Text", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } diff --git a/examples/3d-road-crosser/assets/rotate-screen-icon.png b/examples/3d-road-crosser/assets/rotate-screen-icon.png new file mode 100644 index 000000000..a7726dee3 Binary files /dev/null and b/examples/3d-road-crosser/assets/rotate-screen-icon.png differ diff --git a/examples/3d-shark-frenzy/3d-shark-frenzy.json b/examples/3d-shark-frenzy/3d-shark-frenzy.json index 6b7416b37..f14c89834 100644 --- a/examples/3d-shark-frenzy/3d-shark-frenzy.json +++ b/examples/3d-shark-frenzy/3d-shark-frenzy.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 213, + "build": 217, "major": 5, "minor": 4, "revision": 0 @@ -591,6 +591,15 @@ "name": "assets/thumbnail-game.png", "smoothed": true, "userAdded": true + }, + { + "alwaysLoaded": false, + "file": "assets/rotate-screen-icon.png", + "kind": "image", + "metadata": "", + "name": "assets/rotate-screen-icon.png", + "smoothed": true, + "userAdded": false } ], "resourceFolders": [] @@ -622,7 +631,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.6897782140104507, + "zoomFactor": 0.3216911764705893, "windowMask": false }, "objectsGroups": [ @@ -803,6 +812,22 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "Orientation Checker", + "name": "ScreenOrientationChecker", + "persistentUuid": "f5133945-f4ad-4cbd-ab5e-45310ae6443e", + "width": 0, + "x": 0, + "y": 0, + "zOrder": 10, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] } ], "objects": [ @@ -815,11 +840,11 @@ "behaviors": [ { "name": "Anchor", + "rightEdgeAnchor": 0, "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } @@ -884,6 +909,7 @@ "text": "PLAY", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -909,11 +935,11 @@ "behaviors": [ { "name": "Anchor", + "rightEdgeAnchor": 0, "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } @@ -958,11 +984,11 @@ "behaviors": [ { "name": "Anchor", + "rightEdgeAnchor": 0, "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } @@ -1027,6 +1053,7 @@ "text": "LEADERBOARD", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -1052,11 +1079,11 @@ "behaviors": [ { "name": "Anchor", + "rightEdgeAnchor": 0, "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } @@ -1121,6 +1148,7 @@ "text": "SETTINGS", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -1215,7 +1243,18 @@ "type": "PanelSpriteSlider::PanelSpriteSlider", "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "content": { "BarTopPadding": 3, "BarLeftPadding": 3, @@ -1276,6 +1315,7 @@ "text": "It displays the value when it changes.", "font": "CantoraOne-Regular.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 16, "color": "255;255;255" } @@ -1298,7 +1338,18 @@ "type": "PanelSpriteButton::PanelSpriteButton", "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "content": { "LeftPadding": 16, "RightPadding": 16, @@ -1359,6 +1410,7 @@ "text": "BACK", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -1385,7 +1437,18 @@ "underlined": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "name": "Anchor", + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "type": "AnchorBehavior::AnchorBehavior", + "useLegacyBottomAndRightAnchors": false + } + ], "string": "Sound volume:", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", @@ -1412,6 +1475,7 @@ "text": "Sound volume:", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -1428,12 +1492,12 @@ "effects": [], "behaviors": [ { + "leftEdgeAnchor": 1, "name": "Anchor", + "rightEdgeAnchor": 2, "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, - "leftEdgeAnchor": 4, "relativeToOriginalWindowSize": true, - "rightEdgeAnchor": 4, "topEdgeAnchor": 0, "useLegacyBottomAndRightAnchors": false } @@ -1464,9 +1528,21 @@ "text": "Shark Frenzy", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 120, "color": "255;255;255" } + }, + { + "assetStoreId": "", + "name": "ScreenOrientationChecker", + "type": "ScreenOrientationChecker::ScreenOrientationChecker", + "variables": [], + "effects": [], + "behaviors": [], + "content": { + "IsForceShown": false + } } ], "objectsFolderStructure": { @@ -1510,6 +1586,9 @@ "objectName": "BackButton" } ] + }, + { + "objectName": "ScreenOrientationChecker" } ] }, @@ -1891,9 +1970,42 @@ "isLocked": false, "name": "Settings", "renderingType": "", - "visibility": false, + "visibility": true, "cameras": [], "effects": [] + }, + { + "ambientLightColorB": 200, + "ambientLightColorG": 200, + "ambientLightColorR": 200, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 3, + "cameraType": "", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "Orientation Checker", + "renderingType": "", + "visibility": true, + "cameras": [], + "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": [ @@ -3186,6 +3298,7 @@ "text": "100 / 100", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 14, "color": "255;255;255" } @@ -3240,6 +3353,7 @@ "text": "★ 0", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -3286,6 +3400,7 @@ "text": "10", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -3459,6 +3574,7 @@ "text": "100 / 100", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 14, "color": "255;255;255" } @@ -3502,6 +3618,7 @@ "text": "1X", "font": "CantoraOne-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "248;231;28" } @@ -3802,6 +3919,7 @@ "text": "Score: 0", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3884,6 +4002,7 @@ "text": "MENU", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -3978,6 +4097,7 @@ "text": "SUBMIT SCORE", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 35, "color": "255;255;255" } @@ -4042,6 +4162,7 @@ "text": "Highscore: 0", "font": "CantoraOne-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -7505,6 +7626,939 @@ ], "externalEvents": [], "eventsFunctionsExtensions": [ + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Screen Orientation Checker", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNjcmVlbi1yb3RhdGlvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik03LjUsMjEuNUM0LjI1LDE5Ljk0IDEuOTEsMTYuNzYgMS41NSwxM0gwLjA1QzAuNTYsMTkuMTYgNS43MSwyNCAxMiwyNEwxMi42NiwyMy45N0w4Ljg1LDIwLjE2TTE0LjgzLDIxLjE5TDIuODEsOS4xN0w5LjE3LDIuODFMMjEuMTksMTQuODNNMTAuMjMsMS43NUM5LjY0LDEuMTYgOC42OSwxLjE2IDguMTEsMS43NUwxLjc1LDguMTFDMS4xNiw4LjcgMS4xNiw5LjY1IDEuNzUsMTAuMjNMMTMuNzcsMjIuMjVDMTQuMzYsMjIuODQgMTUuMzEsMjIuODQgMTUuODksMjIuMjVMMjIuMjUsMTUuODlDMjIuODQsMTUuMyAyMi44NCwxNC4zNSAyMi4yNSwxMy43N0wxMC4yMywxLjc1TTE2LjUsMi41QzE5Ljc1LDQuMDcgMjIuMDksNy4yNCAyMi40NSwxMUgyMy45NUMyMy40NCw0Ljg0IDE4LjI5LDAgMTIsMEwxMS4zNCwwLjAzTDE1LjE1LDMuODRMMTYuNSwyLjVaIiAvPjwvc3ZnPg==", + "name": "ScreenOrientationChecker", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/0126888931a4a4f82bb2824df9f096347ace1c47f510c44df42aa8dc9e49e24a_screen-rotation.svg", + "shortDescription": "Display a screen asking the user to rotate their phone/tablet if not in the right orientation.", + "version": "0.0.1", + "description": "Display a screen asking the user to rotate their phone/tablet if not in the right orientation.", + "tags": [ + "screen", + "orientation" + ], + "authorIds": [ + "wWP8BSlAW0UP4NeaHa2LcmmDzmH2" + ], + "dependencies": [], + "globalVariables": [ + { + "name": "TargetOrientation", + "type": "string", + "value": "" + } + ], + "sceneVariables": [], + "eventsFunctions": [ + { + "fullName": "Get game target orientation", + "functionType": "StringExpression", + "name": "ProjectOrientation", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": "eventsFunctionContext.returnValue = runtimeScene.getGame().getGameData().properties.orientation;", + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onFirstSceneLoaded", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "ScreenOrientationChecker::ProjectOrientation()" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 400, + "areaMaxY": 200, + "areaMaxZ": 0, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "", + "description": "Automatically display a black screen asking the player to rotate their screen if needed - on mobile phones and tablets only. Put this at position 0;0 on a UI layer (or a layer where the camera is not moving).", + "fullName": "Screen Orientation Checker", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "ScreenOrientationChecker", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check if the screen must be shown" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemInfo::IsMobile" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "SceneWindowWidth()", + ">", + "SceneWindowHeight()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "!=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "SceneWindowWidth()", + "<=", + "SceneWindowHeight()" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"landscape\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "TargetOrientation", + "=", + "\"portrait\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Show/hide the screen as needed" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ResizableCapability::ResizableBehavior::SetSize" + }, + "parameters": [ + "Object", + "Resizable", + "ScreenWidth()", + "ScreenHeight()" + ] + }, + { + "type": { + "value": "PrimitiveDrawing::Rectangle" + }, + "parameters": [ + "BackgroundPainter", + "0", + "0", + "SceneWindowWidth()", + "SceneWindowHeight()" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "Object", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsShown" + }, + "parameters": [ + "Object" + ] + }, + { + "type": { + "inverted": true, + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Object" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "MettreY" + }, + "parameters": [ + "Icon", + "=", + "Text.Y() - 150" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Animate the icon" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + }, + { + "type": { + "inverted": true, + "value": "Tween::Exists" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"", + "8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Tween::HasFinished" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Tween::TweenBehavior::AddObjectAngleTween2" + }, + "parameters": [ + "Icon", + "Tween", + "\"RotateBack\"", + "-8", + "\"easeInOutQuad\"", + "2", + "" + ] + }, + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Icon", + "Tween", + "\"Rotate\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the screen should be forced to be shown. Use this to test the screen in your game", + "fullName": "Force show the screen", + "functionType": "Condition", + "group": "Screen Orientation Checker configuration", + "name": "IsForceShown", + "sentence": "_PARAM0_ is forced to be shown", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::PropertyIsForceShown" + }, + "parameters": [ + "Object" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Change if the screen should be forced to be shown. Use this to test the screen in your game", + "fullName": "Force show the screen", + "functionType": "Action", + "group": "Screen Orientation Checker configuration", + "name": "SetIsForceShown", + "sentence": "Force _PARAM0_ to be shown: _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + }, + "parameters": [ + "Object", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ScreenOrientationChecker::ScreenOrientationChecker::SetPropertyIsForceShown" + }, + "parameters": [ + "Object", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "ScreenOrientationChecker::ScreenOrientationChecker", + "type": "object" + }, + { + "defaultValue": "yes", + "description": "Force show the screen?", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsShown" + }, + { + "value": "", + "type": "Boolean", + "label": "Force show the screen", + "description": "Use this to test the screen in your game", + "group": "", + "extraInformation": [], + "name": "IsForceShown" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": true, + "italic": false, + "name": "Text", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 4, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "string": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "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": "Rotate screen to play", + "font": "", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 30, + "color": "255;255;255" + } + }, + { + "assetStoreId": "", + "name": "BackgroundPainter", + "type": "PrimitiveDrawing::Drawer", + "variables": [], + "effects": [], + "behaviors": [], + "fillOpacity": 255, + "outlineSize": 1, + "outlineOpacity": 255, + "absoluteCoordinates": true, + "clearBetweenFrames": true, + "antialiasing": "none", + "fillColor": { + "r": 0, + "g": 0, + "b": 0 + }, + "outlineColor": { + "r": 0, + "g": 0, + "b": 0 + } + }, + { + "adaptCollisionMaskAutomatically": true, + "assetStoreId": "", + "name": "Icon", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 0, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + }, + { + "name": "Tween", + "type": "Tween::TweenBehavior" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": false, + "timeBetweenFrames": 0.08, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "assets/rotate-screen-icon.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 52.5, + "y": 56.5 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 0, + "y": 1 + }, + { + "x": 105, + "y": 1 + }, + { + "x": 105, + "y": 113 + }, + { + "x": 0, + "y": 113 + } + ] + ] + } + ] + } + ] + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Text" + }, + { + "objectName": "BackgroundPainter" + }, + { + "objectName": "Icon" + } + ] + }, + "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": [ + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 35, + "keepRatio": true, + "layer": "", + "name": "Text", + "persistentUuid": "65c003ea-19c0-4f18-a189-a02a24378f35", + "width": 207, + "x": 104, + "y": 120, + "zOrder": 15, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "BackgroundPainter", + "persistentUuid": "49ff4576-6406-41de-a43b-1355529d61fe", + "width": 0, + "x": 38, + "y": 17, + "zOrder": 14, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "keepRatio": true, + "layer": "", + "name": "Icon", + "persistentUuid": "39cbfc66-13f4-43dc-b6ef-2bda83153277", + "width": 0, + "x": 198, + "y": 62, + "zOrder": 16, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] + }, { "author": "", "category": "Visual effect", @@ -23697,6 +24751,7 @@ "text": "It displays the value when it changes.", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -26439,6 +27494,7 @@ "text": "Text", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -33910,6 +34966,7 @@ "text": "2 / 3", "font": "", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -63474,7 +64531,7 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": false, - "zoomFactor": 0.05366288772177734, + "zoomFactor": 0.11894533708001637, "windowMask": false } } diff --git a/examples/3d-shark-frenzy/assets/rotate-screen-icon.png b/examples/3d-shark-frenzy/assets/rotate-screen-icon.png new file mode 100644 index 000000000..a7726dee3 Binary files /dev/null and b/examples/3d-shark-frenzy/assets/rotate-screen-icon.png differ