From a290ff4015577600fc63eb1a5194ca68d1b48767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Thu, 10 Oct 2024 20:35:46 +0200 Subject: [PATCH] [Car coin hunt] Use a custom object for the leaderboard dialog --- .../3d-car-coin-hunt/3d-car-coin-hunt.json | 1893 +++++++++++------ examples/3d-lane-runner/3d-lane-runner.json | 439 +--- examples/3d-lane-runner/assets/Star.glb | Bin 5460 -> 0 bytes 3 files changed, 1245 insertions(+), 1087 deletions(-) delete mode 100644 examples/3d-lane-runner/assets/Star.glb 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 367c3bcfd..a98d3e2b9 100644 --- a/examples/3d-car-coin-hunt/3d-car-coin-hunt.json +++ b/examples/3d-car-coin-hunt/3d-car-coin-hunt.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 213, + "build": 215, "major": 5, "minor": 4, "revision": 0 @@ -791,6 +791,7 @@ "text": "CAR COIN HUNT", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 100, "color": "248;231;28" } @@ -873,6 +874,7 @@ "text": "Start", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "72;72;79" } @@ -1361,6 +1363,7 @@ "text": "Best: 0", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 25, "color": "255;255;255" } @@ -1402,6 +1405,7 @@ "text": "Remaining: 0", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 25, "color": "255;255;255" } @@ -1443,6 +1447,7 @@ "text": "Time:", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 40, "color": "255;255;255" } @@ -1484,6 +1489,7 @@ "text": "Arrow keys to drive. Collect all coins.", "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 20, "color": "255;255;255" } @@ -3734,28 +3740,10 @@ "gridColor": 16777215, "gridAlpha": 0.21, "snap": true, - "zoomFactor": 0.6652993502634535, + "zoomFactor": 0.6022931537048508, "windowMask": false }, - "objectsGroups": [ - { - "name": "PanelContent", - "objects": [ - { - "name": "ScoreText" - }, - { - "name": "PlayerNameInput" - }, - { - "name": "SubmitButton" - }, - { - "name": "RestartButton" - } - ] - } - ], + "objectsGroups": [], "variables": [ { "name": "LeaderboardScore", @@ -3797,351 +3785,21 @@ { "angle": 0, "customSize": false, - "height": 67, - "layer": "", - "name": "ScoreText", - "persistentUuid": "722f1233-75ba-4128-8905-4ac5dd26bc1e", - "width": 384, - "x": 386, - "y": 184, - "zOrder": 18, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 96, - "layer": "", - "name": "PlayerNameInput", - "persistentUuid": "a681abd2-5235-4165-a003-4a9553d79cb5", - "width": 416, - "x": 344, - "y": 288, - "zOrder": 19, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": false, - "height": 0, - "layer": "", - "name": "RestartButton", - "persistentUuid": "9e303562-d182-4829-a5eb-148a1af72803", - "width": 0, - "x": 528, - "y": 448, - "zOrder": 35, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 106, - "layer": "", - "name": "SubmitButton", - "persistentUuid": "3aa859c1-2135-4384-a300-bfb28b424a52", - "width": 128, - "x": 824, - "y": 278, - "zOrder": 37, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 480, + "height": 496, + "keepRatio": true, "layer": "", - "name": "Panel", - "persistentUuid": "ef024407-8612-4ce2-99b1-0f3e932160eb", - "width": 688, + "name": "LeaderboardDialog", + "persistentUuid": "24fb9077-19e6-49ff-b3c3-65ff89f4364f", + "width": 704, "x": 304, "y": 128, - "zOrder": 1, + "zOrder": 38, "numberProperties": [], "stringProperties": [], "initialVariables": [] } ], "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreText", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "string": "Score", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "textAlignment": "", - "characterSize": 40, - "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": "Score", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "textAlignment": "", - "characterSize": 40, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "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": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "🡲", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "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": "🡲", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "textAlignment": "center", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "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": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Restart", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "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": "Restart", - "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", - "textAlignment": "center", - "characterSize": 40, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [] - }, { "assetStoreId": "b8200f0619b25c76e3d392f1d0d16d7547bf1c96097bc23af81b68cf11e57677", "name": "Coin", @@ -4194,25 +3852,36 @@ "width": 64, "animations": [] } + }, + { + "assetStoreId": "", + "name": "LeaderboardDialog", + "type": "LeaderboardDialog::LeaderboardDialog", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "LeaderboardId": "0d5ac561-afa4-45dc-bf58-561d557f7954", + "DefaultPlayerName": "" + } } ], "objectsFolderStructure": { "folderName": "__ROOT", "children": [ { - "objectName": "ScoreText" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitButton" - }, - { - "objectName": "RestartButton" - }, - { - "objectName": "Panel" + "objectName": "LeaderboardDialog" }, { "objectName": "Coin" @@ -4220,6 +3889,18 @@ ] }, "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ @@ -4235,124 +3916,24 @@ "actions": [ { "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" }, "parameters": [ - "ScoreText", - "Text", + "LeaderboardDialog", "=", - "\"Time: \" + TimeFormatter::SecondsToHHMMSS000(GlobalVariable(Score))" - ] - }, - { - "type": { - "value": "Sticker::Sticker::Stick" - }, - "parameters": [ - "PanelContent", - "Sticker", - "Panel", + "Score", "" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" - }, - "parameters": [ - "" - ] - } - ] }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - }, - { - "type": { - "value": "StringVariable" - }, - "parameters": [ - "PlayerName", - "!=", - "\"0\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "GlobalVariableString(PlayerName)" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ { "type": { - "value": "SetCenterX" + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" }, "parameters": [ - "Panel", + "LeaderboardDialog", "=", - "SceneWindowWidth() / 2" + "PlayerName", + "" ] } ] @@ -4362,58 +3943,22 @@ "conditions": [ { "type": { - "value": "PlayerAuthentication::HasPlayerLoggedIn" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "TextContainerCapability::TextContainerBehavior::SetValue" - }, - "parameters": [ - "PlayerNameInput", - "Text", - "=", - "PlayerAuthentication::Username()" - ] - }, - { - "type": { - "value": "TextInput::TextInputObject::SetDisabled" - }, - "parameters": [ - "PlayerNameInput", - "yes" - ] - }, - { - "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "LeaderboardDialog::LeaderboardDialog::IsRestartClicked" }, "parameters": [ + "LeaderboardDialog", "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::IsLeaderboardViewErrored" - }, - "parameters": [] - } ], "actions": [ { "type": { - "value": "PlayerAuthentication::DisplayAuthenticationBanner" + "value": "Scene" }, "parameters": [ + "", + "\"Game\"", "" ] } @@ -4424,10 +3969,10 @@ "conditions": [ { "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + "value": "LeaderboardDialog::LeaderboardDialog::IsScoreSubmitted" }, "parameters": [ - "RestartButton", + "LeaderboardDialog", "" ] } @@ -4435,10 +3980,12 @@ "actions": [ { "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" + "value": "SetStringVariable" }, "parameters": [ - "" + "PlayerName", + "=", + "LeaderboardDialog.PlayerName()" ] }, { @@ -4454,182 +4001,28 @@ ] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" - }, - "parameters": [ - "SubmitButton", - "" - ] - } - ], - "actions": [], + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Coins animation", + "source": "", + "type": "BuiltinCommonInstructions::Group", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "Leaderboards::SaveConnectedPlayerScore" + "value": "DepartScene" }, "parameters": [ - "", - "\"0d5ac561-afa4-45dc-bf58-561d557f7954\"", - "Score" + "" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "PlayerAuthentication::IsPlayerAuthenticated" - }, - "parameters": [] - } ], - "actions": [ - { - "type": { - "value": "Leaderboards::SavePlayerScore" - }, - "parameters": [ - "", - "\"0d5ac561-afa4-45dc-bf58-561d557f7954\"", - "Score", - "PlayerNameInput.Text()" - ] - }, - { - "type": { - "value": "SetStringVariable" - }, - "parameters": [ - "PlayerName", - "=", - "PlayerNameInput.Text()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "PlayerAuthentication::HideAuthenticationBanner" - }, - "parameters": [ - "" - ] - }, - { - "type": { - "value": "Leaderboards::DisplayLeaderboard" - }, - "parameters": [ - "", - "\"0d5ac561-afa4-45dc-bf58-561d557f7954\"", - "yes" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Allow to try and submit again in case of error." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" - }, - "parameters": [] - }, - { - "type": { - "value": "Leaderboards::HasLastSaveSucceeded" - }, - "parameters": [ - "\"0d5ac561-afa4-45dc-bf58-561d557f7954\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Scene" - }, - "parameters": [ - "", - "\"Game\"", - "" - ] - } - ] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Coins animation", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [], - "events": [ + "actions": [], + "events": [ { "type": "BuiltinCommonInstructions::Repeat", "repeatExpression": "100", @@ -4834,6 +4227,38 @@ } ], "behaviorsSharedData": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior" + }, + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Object3D", + "type": "Scene3D::Base3DBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, { "name": "ScreenWrap", "type": "ScreenWrap::ScreenWrap" @@ -4841,6 +4266,10 @@ { "name": "Sticker", "type": "Sticker::Sticker" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" } ] } @@ -25855,6 +25284,7 @@ "text": "Text", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -37101,6 +36531,1095 @@ } ], "eventsBasedObjects": [] + }, + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "", + "helpPath": "", + "iconUrl": "", + "name": "LeaderboardDialog", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [ + { + "areaMaxX": 688, + "areaMaxY": 480, + "areaMaxZ": 48, + "areaMinX": 0, + "areaMinY": 0, + "areaMinZ": 0, + "defaultName": "LeaderboardDialog", + "description": "", + "fullName": "Leaderboard dialog", + "isInnerAreaFollowingParentSize": true, + "isUsingLegacyInstancesRenderer": false, + "name": "LeaderboardDialog", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetScore" + }, + "parameters": [ + "Object", + "=", + "0", + "" + ] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "DefaultPlayerName", + "" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::HasPlayerLoggedIn" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "PlayerAuthentication::Username()" + ] + }, + { + "type": { + "value": "TextInput::TextInputObject::SetDisabled" + }, + "parameters": [ + "PlayerNameInput", + "yes" + ] + }, + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::IsLeaderboardViewErrored" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::DisplayAuthenticationBanner" + }, + "parameters": [ + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Handle leaderboards.\nTo create a leaderboard, make sure your game is registered in Home > Profile > Games Dashboard and then, click on \"Manage game\" > Leaderboards. When a leaderboard is created, it should be available in the actions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "SubmitButton", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SaveConnectedPlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "Leaderboards::SavePlayerScore" + }, + "parameters": [ + "", + "LeaderboardId", + "Score", + "PlayerNameInput.Text()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "Leaderboards::DisplayLeaderboard" + }, + "parameters": [ + "", + "LeaderboardId", + "yes" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the score.", + "fullName": "Score", + "functionType": "ExpressionAndCondition", + "name": "Score", + "sentence": "the score", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Score" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "Score", + "name": "SetScore", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyScore" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + }, + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "ScoreLabel", + "Text", + "=", + "\"Time: \" + TimeFormatter::SecondsToHHMMSS000(Score)" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the default player name.", + "fullName": "Default player name", + "functionType": "ExpressionAndCondition", + "name": "DefaultPlayerName", + "sentence": "the default player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "DefaultPlayerName" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "DefaultPlayerName", + "name": "SetDefaultPlayerName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::SetPropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "=", + "Value" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "PlayerAuthentication::IsPlayerAuthenticated" + }, + "parameters": [] + }, + { + "type": { + "value": "LeaderboardDialog::LeaderboardDialog::PropertyDefaultPlayerName" + }, + "parameters": [ + "Object", + "!=", + "\"0\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "PlayerNameInput", + "Text", + "=", + "DefaultPlayerName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "the player name.", + "fullName": "Player name", + "functionType": "ExpressionAndCondition", + "name": "PlayerName", + "sentence": "the player name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "PlayerNameInput.Text::Value()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the restart button of the dialog is clicked.", + "fullName": "Restart button clicked", + "functionType": "Condition", + "name": "IsRestartClicked", + "sentence": "Restart button of _PARAM0_ is clicked", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "PanelSpriteButton::PanelSpriteButton::IsClicked" + }, + "parameters": [ + "RestartButton", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayerAuthentication::HideAuthenticationBanner" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the score has been sucessfully submitted by the dialog.", + "fullName": "Score is submitted", + "functionType": "Condition", + "name": "IsScoreSubmitted", + "sentence": "_PARAM0_ submitted a score", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Allow to try and submit again in case of error." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Leaderboards::HasPlayerJustClosedLeaderboardView" + }, + "parameters": [] + }, + { + "type": { + "value": "Leaderboards::HasLastSaveSucceeded" + }, + "parameters": [ + "LeaderboardId" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "LeaderboardDialog::LeaderboardDialog", + "type": "object" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Default player name", + "description": "", + "group": "", + "extraInformation": [], + "name": "DefaultPlayerName" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Score" + }, + { + "value": "", + "type": "String", + "label": "Leaderboard Id", + "description": "", + "group": "", + "extraInformation": [], + "name": "LeaderboardId" + } + ], + "objects": [ + { + "assetStoreId": "", + "bold": false, + "italic": false, + "name": "ScoreLabel", + "smoothed": true, + "type": "TextObject::Text", + "underlined": false, + "variables": [], + "effects": [], + "behaviors": [], + "string": "Time:", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "", + "characterSize": 40, + "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": "Time:", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "", + "verticalTextAlignment": "top", + "characterSize": 40, + "color": "72;72;79" + } + }, + { + "assetStoreId": "", + "name": "PlayerNameInput", + "type": "TextInput::TextInputObject", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "content": { + "initialValue": "", + "placeholder": "PlayerName", + "fontResourceName": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "fontSize": 40, + "inputType": "text", + "textColor": "72;72;79", + "fillColor": "231;232;243", + "fillOpacity": 255, + "borderColor": "255;255;255", + "borderOpacity": 255, + "borderWidth": 6, + "readOnly": false, + "disabled": false + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "SubmitButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 0, + "leftEdgeAnchor": 0, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "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": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Send", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", + "name": "RestartButton", + "type": "PanelSpriteButton::PanelSpriteButton", + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 4, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 4, + "topEdgeAnchor": 0, + "useLegacyBottomAndRightAnchors": false + } + ], + "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": true, + "topMargin": 16, + "width": 256 + }, + "Idle": { + "bottomMargin": 32, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Idle.png", + "tiled": true, + "topMargin": 16, + "width": 256 + }, + "Label": { + "bold": false, + "italic": false, + "smoothed": true, + "underlined": false, + "string": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "characterSize": 40, + "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": "Restart", + "font": "27d4da0f7767cf3fbf14eb2c8da758dbcfc7b5038c9214d5e6ed62db6476a6e5_Chango-Regular.ttf", + "textAlignment": "center", + "verticalTextAlignment": "top", + "characterSize": 40, + "color": "139;87;42" + } + }, + "Pressed": { + "bottomMargin": 16, + "height": 106, + "leftMargin": 16, + "rightMargin": 16, + "texture": "Yellow Button_Pressed.png", + "tiled": true, + "topMargin": 32, + "width": 256 + } + } + }, + { + "assetStoreId": "", + "bottomMargin": 32, + "height": 128, + "leftMargin": 16, + "name": "Panel", + "rightMargin": 16, + "texture": "assets\\Grey Button_Idle.png", + "tiled": false, + "topMargin": 16, + "type": "PanelSpriteObject::PanelSprite", + "width": 128, + "variables": [], + "effects": [], + "behaviors": [ + { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", + "bottomEdgeAnchor": 2, + "leftEdgeAnchor": 1, + "relativeToOriginalWindowSize": true, + "rightEdgeAnchor": 2, + "topEdgeAnchor": 1, + "useLegacyBottomAndRightAnchors": false + } + ] + } + ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "ScoreLabel" + }, + { + "objectName": "PlayerNameInput" + }, + { + "objectName": "SubmitButton" + }, + { + "objectName": "RestartButton" + }, + { + "objectName": "Panel" + } + ] + }, + "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": false, + "height": 71, + "layer": "", + "name": "ScoreLabel", + "persistentUuid": "e0571581-5b6f-4e0b-928a-92dd21b3851d", + "width": 606, + "x": 36, + "y": 41, + "zOrder": 18, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 1, + "height": 96, + "layer": "", + "name": "PlayerNameInput", + "persistentUuid": "1b66c419-4bc7-406f-91e7-7deeb515ff67", + "width": 360, + "x": 40, + "y": 160, + "zOrder": 19, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": false, + "height": 0, + "layer": "", + "name": "RestartButton", + "persistentUuid": "d9bfca46-e22c-42c9-a581-b88dbe1f5967", + "width": 0, + "x": 224, + "y": 320, + "zOrder": 35, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 48, + "height": 106, + "layer": "", + "name": "SubmitButton", + "persistentUuid": "3ad1036e-666f-4a8c-9b85-6d882e192ee8", + "width": 216, + "x": 432, + "y": 150, + "zOrder": 37, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + }, + { + "angle": 0, + "customSize": true, + "depth": 0, + "height": 480, + "layer": "", + "name": "Panel", + "persistentUuid": "273f403b-d896-4fa8-81bd-ef1d5d6bd006", + "width": 688, + "x": 0, + "y": 0, + "zOrder": 1, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [] + } + ] + } + ] } ], "externalLayouts": [ diff --git a/examples/3d-lane-runner/3d-lane-runner.json b/examples/3d-lane-runner/3d-lane-runner.json index e0cb0ae7d..180c5cedb 100644 --- a/examples/3d-lane-runner/3d-lane-runner.json +++ b/examples/3d-lane-runner/3d-lane-runner.json @@ -1,7 +1,7 @@ { "firstLayout": "Menu", "gdVersion": { - "build": 213, + "build": 215, "major": 5, "minor": 4, "revision": 0 @@ -547,17 +547,6 @@ "smoothed": true, "userAdded": true }, - { - "file": "assets/Star.glb", - "kind": "model3D", - "metadata": "", - "name": "Star.glb", - "userAdded": false, - "origin": { - "identifier": "https://asset-resources.gdevelop.io/public-resources/3D Platformer Pack/f8b83ac3e94c49207c1cbf82f09c6509758d4654248928eb848ec1686207a147_Star.glb", - "name": "Star.glb" - } - }, { "alwaysLoaded": false, "file": "assets/tiled_black space.png", @@ -724,6 +713,7 @@ "text": "LANE RUNNER", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 80, "color": "61;236;236" } @@ -795,6 +785,7 @@ "text": "Start", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "72;72;79" } @@ -1868,6 +1859,7 @@ "text": "Coins: 0", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -1909,6 +1901,7 @@ "text": "HighScore: 0", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -1950,6 +1943,7 @@ "text": "Controls: Arrow keys and space bar.", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "left", + "verticalTextAlignment": "top", "characterSize": 50, "color": "255;255;255" } @@ -3357,28 +3351,10 @@ "gridColor": 16777215, "gridAlpha": 0.21, "snap": true, - "zoomFactor": 0.622602677652846, + "zoomFactor": 0.4619377619140885, "windowMask": false }, - "objectsGroups": [ - { - "name": "PanelContent", - "objects": [ - { - "name": "ScoreLabel" - }, - { - "name": "PlayerNameInput" - }, - { - "name": "SubmitButton" - }, - { - "name": "RestartButton" - } - ] - } - ], + "objectsGroups": [], "variables": [ { "name": "LeaderboardScore", @@ -3420,279 +3396,9 @@ } ], "objects": [ - { - "assetStoreId": "", - "bold": false, - "italic": false, - "name": "ScoreLabel", - "smoothed": true, - "type": "TextObject::Text", - "underlined": false, - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "string": "Score", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "", - "characterSize": 60, - "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": "Score", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "", - "characterSize": 60, - "color": "72;72;79" - } - }, - { - "assetStoreId": "", - "name": "PlayerNameInput", - "type": "TextInput::TextInputObject", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "content": { - "initialValue": "", - "placeholder": "PlayerName", - "fontResourceName": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "fontSize": 40, - "inputType": "text", - "textColor": "72;72;79", - "fillColor": "231;232;243", - "fillOpacity": 255, - "borderColor": "255;255;255", - "borderOpacity": 255, - "borderWidth": 6, - "readOnly": false, - "disabled": false - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "SubmitButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "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": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Send", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "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": "Send", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "center", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "bfab3a269992cf43081e2cb8053c28aaef11f2f9e0d0cbdc00207ea271f69c2c", - "name": "RestartButton", - "type": "PanelSpriteButton::PanelSpriteButton", - "variables": [], - "effects": [], - "behaviors": [ - { - "name": "Sticker", - "type": "Sticker::Sticker", - "OnlyFollowPosition": true - } - ], - "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": true, - "topMargin": 16, - "width": 256 - }, - "Idle": { - "bottomMargin": 32, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Idle.png", - "tiled": true, - "topMargin": 16, - "width": 256 - }, - "Label": { - "bold": false, - "italic": false, - "smoothed": true, - "underlined": false, - "string": "Restart", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "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": "Restart", - "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", - "textAlignment": "center", - "characterSize": 60, - "color": "139;87;42" - } - }, - "Pressed": { - "bottomMargin": 16, - "height": 106, - "leftMargin": 16, - "rightMargin": 16, - "texture": "Yellow Button_Pressed.png", - "tiled": true, - "topMargin": 32, - "width": 256 - } - } - }, - { - "assetStoreId": "", - "bottomMargin": 32, - "height": 128, - "leftMargin": 16, - "name": "Panel", - "rightMargin": 16, - "texture": "assets\\Grey Button_Idle.png", - "tiled": false, - "topMargin": 16, - "type": "PanelSpriteObject::PanelSprite", - "width": 128, - "variables": [], - "effects": [], - "behaviors": [] - }, { "assetStoreId": "e1d597218297d0cacb1061c48d8b3d12fd0b00af028ffa593aac3141bd005345", - "name": "Star", + "name": "Coin", "type": "Scene3D::Model3DObject", "variables": [ { @@ -3734,7 +3440,7 @@ "height": 64, "keepAspectRatio": true, "materialType": "StandardWithoutMetalness", - "modelResourceName": "Star.glb", + "modelResourceName": "Coin.glb", "originLocation": "ModelOrigin", "rotationX": 0, "rotationY": 0, @@ -3751,13 +3457,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 4, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 4, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -3769,26 +3475,11 @@ "objectsFolderStructure": { "folderName": "__ROOT", "children": [ - { - "objectName": "ScoreLabel" - }, - { - "objectName": "PlayerNameInput" - }, - { - "objectName": "SubmitButton" - }, - { - "objectName": "RestartButton" - }, - { - "objectName": "Panel" - }, { "objectName": "LeaderboardDialog" }, { - "objectName": "Star" + "objectName": "Coin" } ] }, @@ -3926,7 +3617,7 @@ }, "parameters": [ "", - "Star", + "Coin", "RandomInRange(CameraBorderLeft(), CameraBorderRight())", "RandomInRange(-500 + CameraBorderTop(), CameraBorderBottom() + 500)", "\"3D\"" @@ -3937,7 +3628,7 @@ "value": "SetNumberObjectVariable" }, "parameters": [ - "Star", + "Coin", "RotationX", "=", "RandomFloatInRange(20, 45)" @@ -3948,7 +3639,7 @@ "value": "SetNumberObjectVariable" }, "parameters": [ - "Star", + "Coin", "RotationY", "=", "RandomFloatInRange(20, 45)" @@ -3959,7 +3650,7 @@ "value": "SetNumberObjectVariable" }, "parameters": [ - "Star", + "Coin", "RotationZ", "=", "RandomFloatInRange(20, 45)" @@ -3970,7 +3661,7 @@ "value": "AddForceXY" }, "parameters": [ - "Star", + "Coin", "0", "200", "1" @@ -3981,7 +3672,7 @@ "value": "Scene3D::Base3DBehavior::SetZ" }, "parameters": [ - "Star", + "Coin", "Object3D", "=", "RandomFloatInRange(-1000, -32)" @@ -3992,7 +3683,7 @@ "value": "Scene3D::Base3DBehavior::SetRotationX" }, "parameters": [ - "Star", + "Coin", "Object3D", "=", "RandomFloat(360)" @@ -4003,7 +3694,7 @@ "value": "Scene3D::Base3DBehavior::SetRotationY" }, "parameters": [ - "Star", + "Coin", "Object3D", "=", "RandomFloat(360)" @@ -4022,10 +3713,10 @@ "value": "Scene3D::Base3DBehavior::SetRotationX" }, "parameters": [ - "Star", + "Coin", "Object3D", "+", - "Star.RotationX * TimeDelta()" + "Coin.RotationX * TimeDelta()" ] }, { @@ -4033,10 +3724,10 @@ "value": "Scene3D::Base3DBehavior::SetRotationY" }, "parameters": [ - "Star", + "Coin", "Object3D", "+", - "Star.RotationY * TimeDelta()" + "Coin.RotationY * TimeDelta()" ] }, { @@ -4044,9 +3735,9 @@ "value": "SetAngle" }, "parameters": [ - "Star", + "Coin", "+", - "Star.RotationZ * TimeDelta()" + "Coin.RotationZ * TimeDelta()" ] } ] @@ -19659,6 +19350,7 @@ "text": "Text", "font": "", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 20, "color": "0;0;0" } @@ -24153,6 +23845,7 @@ "text": "Score", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "", + "verticalTextAlignment": "top", "characterSize": 60, "color": "72;72;79" } @@ -24165,13 +23858,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 } ], @@ -24199,13 +23892,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 0, "leftEdgeAnchor": 0, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -24269,6 +23962,7 @@ "text": "Send", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "139;87;42" } @@ -24293,13 +23987,13 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 2, "leftEdgeAnchor": 4, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 4, "topEdgeAnchor": 0, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ], @@ -24363,6 +24057,7 @@ "text": "Restart", "font": "3bd40ac788d44626fd640ec67ef04ab0364816b5e8c831f2077bff8805cfe689_Roboto-Bold.ttf", "textAlignment": "center", + "verticalTextAlignment": "top", "characterSize": 60, "color": "139;87;42" } @@ -24395,69 +24090,16 @@ "effects": [], "behaviors": [ { + "name": "Anchor", + "type": "AnchorBehavior::AnchorBehavior", "bottomEdgeAnchor": 2, "leftEdgeAnchor": 1, - "name": "Anchor", "relativeToOriginalWindowSize": true, "rightEdgeAnchor": 2, "topEdgeAnchor": 1, - "type": "AnchorBehavior::AnchorBehavior", "useLegacyBottomAndRightAnchors": false } ] - }, - { - "assetStoreId": "e1d597218297d0cacb1061c48d8b3d12fd0b00af028ffa593aac3141bd005345", - "name": "Star", - "type": "Scene3D::Model3DObject", - "variables": [ - { - "folded": true, - "name": "RotationX", - "type": "number", - "value": 0 - }, - { - "folded": true, - "name": "RotationY", - "type": "number", - "value": 0 - }, - { - "folded": true, - "name": "RotationZ", - "type": "number", - "value": 0 - } - ], - "effects": [], - "behaviors": [ - { - "name": "ScreenWrap", - "type": "ScreenWrap::ScreenWrap", - "HorizontalWrapping": false, - "VerticalWrapping": true, - "BorderTop": 0, - "BorderLeft": 0, - "BorderRight": 0, - "BorderBottom": 0, - "TriggerOffset": 500 - } - ], - "content": { - "centerLocation": "ModelOrigin", - "depth": 64, - "height": 64, - "keepAspectRatio": true, - "materialType": "StandardWithoutMetalness", - "modelResourceName": "Star.glb", - "originLocation": "ModelOrigin", - "rotationX": 0, - "rotationY": 0, - "rotationZ": 0, - "width": 64, - "animations": [] - } } ], "objectsFolderStructure": { @@ -24477,9 +24119,6 @@ }, { "objectName": "Panel" - }, - { - "objectName": "Star" } ] }, diff --git a/examples/3d-lane-runner/assets/Star.glb b/examples/3d-lane-runner/assets/Star.glb deleted file mode 100644 index b76f48e450ce93ae96a1724b18dc1aad7f235ccd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5460 zcmbtWZE#f88Ge-1kA8@#Af=RUFJhazth;;eex=F1CaJN3khMvQAAF>nLOraycunmGx>JR@QP-dE3#- zwAGs&J8S2B9dyK3m9esImgB3vJL&5dfk;3EHNVzvIk~i*C2}|r)cX8du9XsKWx*oK zX=UqrwQQ=B_O!;r@BCWUZnNYsf*blaT=}V2>$Gy43P%+`pK>%w=}hG}^!m))r@tl}}|d>DC6jt7B8v%F)?gttFMSs_l&J z)TCMqJ+2D|q9PuS#={~k^hhKg@&^ODo)F=1Jd}t96R}t*}jFArD;VU{3sjr}Is+E3~vz;m7TDscXEoW`o z+E&QYYIkn6vsO0W)U%bw6A6W*ey!E+%90U6QEH_#wOvjrpob&zU_uXxP(qJJq9P_W z5;2l2stXZ~#G|wkipEL6P+Te$jKvdiDNmZ5v2LZx5D{TLC=z-k;io-H5DP{qX)Kxu z#e+ibT`ftzP@T5+-fBSxqZzU;LbBlh)5ZTfPn!Mrc`>a573kNB=Nqdl>na-xcDzyn z*R`N&OHbaav$7p|GIA&prsHxa+1_4wUNT$C>5wl?=!t0fN;@Cp@Km~wdp@Gix?9BM z4nHoWE2nxX_Q8tRMO=Ew=Uch}sH&~UO%J{su3Wv(J*J;KI~V+qo}EV7%9Ce@D9>E* z-$s`kAEZ*oUdl5UJUP1DeV6hKP@cJ9>cw3}eeIv>>r>-b=3R1Mz3{t=H#d%rc;U|R zx82Kcl^U-T#|xvP30U5kn1h2vF! z5EmPVB0q2OyPp)73R_guTiB(atC$Ox{;wj>?4dk!!5`9F_%nI<2<4dz{wKYKcPP(s z$}<-%-$DcRb!e)uPmQJjPm`|#&12@XQK*^6*~y7K~4d zrEd+I_56#whdG`gPrgT9YWlY(IF{b1C;qO>17VK;Mc(^U;XC}A;MjL&rKqB}Hu>9^ zhB;QcwIy#o&9TyI-`Yi|IaV|MyFDp5R^P^nU)-p3th6e>ZsRb=O6SSH4i0my{4l<( z=M=}%1HU0Zy!NAo!yGHGE?)4y;8^Ez~7`qRDtmVtX*`|+Lb z`UB4BuS(0@*phyCB%hPmP?$J|;?P+`o%Q0>92qqJ^2RSKWS%8s$Bmyp@MeX~KXlME zum5$aycZw6^{9E9d9FfY`q$r`JYh(_#1}?>Y)JkMC)XSAebi%0f>+MLQ|ry!&s-xp z{e(x07<8|z?xnM?s)usADyKYiwR@?yQB@n&JX)-|-z%q=hO2sWqh{oUA@A|Z!#O-Z zuaoyBb18i!rvHWBz4p02Tu(k1s=-us@_jxp&f$KzdB-C2hf9)$x$&9K^4PS0IG^yS zI?FZW9^UNUYw1$$B?=on9Pvm&vp>nYR5*H<~9< zthwO(;;cX+=HzeTs`oPey*xZ4C!6C84Vlm3@fJ+Z;WhI*d0$d1 zrH{nyEnIb<>%;Zrb74N0-w^ffnlUfV;eO!W<};n;G4&Qq&iC;443F_yc=7psxre1X z%2(X0+)K=p{QKO`wc;A`diYHFjQH%h4*czK9hh$5e9n=*s9E!R_`Q;#IJ{1-8^^pJ z-Y=gu)2E;B6Q2Ig^M2X>4A0+ydoUj*xE?`@LFo7bZpR9WEATbkiY4$-^g+W?T!R?J z7`}-caWn3sco$aUAij<}Dc*_0cn)QVQjB5{KfqV9jN&q!z?V^hYcUTduEUpb8_KZ= zpNE0vcmYpQd)z+ zVG!FWZbL8Wa01N~o6&-esK%rC7VaZktVbWdiwE!+)}Re*Nr^UEFQ5}!Nr_Hc$Karw zlyGQ0jT-cj5;e5;VKW*?iOsYQ!NzJ*!lv~+>X0KP>Szrhk4jP^PwN>p!XhOaX+4RD c@jX)FVOo2z0}qiBJ7^t25?e@#B(0tJ58$YH{Qv*}