Added Final Score Label

This commit is contained in:
Philip W 2021-11-06 06:56:22 +00:00
parent f5f3953f9e
commit d558011c7b
2 changed files with 111 additions and 10 deletions

View File

@ -853,11 +853,11 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 873720541}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -166.07999}
m_AnchoredPosition: {x: 500, y: -215}
m_SizeDelta: {x: 1000, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &328545999
@ -1620,6 +1620,105 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &720830516
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 720830517}
- component: {fileID: 720830520}
- component: {fileID: 720830519}
- component: {fileID: 720830518}
m_Layer: 5
m_Name: FinalScoreLabel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &720830517
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 720830516}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 873720541}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -145}
m_SizeDelta: {x: 1000, y: 90}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &720830518
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 720830516}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 9815d2f4bad1198418ace54819d33599, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &720830519
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 720830516}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 2fb810d2f9fc27b4eb7693fd3f9f158c, type: 3}
m_FontSize: 100
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 0
m_MaxSize: 249
m_Alignment: 4
m_AlignByGeometry: 1
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Final Score: 000'
--- !u!222 &720830520
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 720830516}
m_CullTransparentMesh: 1
--- !u!1 &839555743
GameObject:
m_ObjectHideFlags: 0
@ -1656,7 +1755,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -291.08}
m_AnchoredPosition: {x: 500, y: -290}
m_SizeDelta: {x: 1000, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &839555745
@ -1762,9 +1861,10 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1083330062}
- {fileID: 720830517}
- {fileID: 328545998}
- {fileID: 1714273384}
- {fileID: 839555744}
- {fileID: 1714273384}
- {fileID: 2086538273}
m_Father: {fileID: 1911360419}
m_RootOrder: 0
@ -2507,7 +2607,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -91.07999}
m_AnchoredPosition: {x: 500, y: -50}
m_SizeDelta: {x: 1000, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &1083330063
@ -2910,11 +3010,11 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 873720541}
m_RootOrder: 2
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -216.07999}
m_AnchoredPosition: {x: 500, y: -365}
m_SizeDelta: {x: 1000, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1714273385
@ -4391,11 +4491,11 @@ RectTransform:
m_Children:
- {fileID: 611707900}
m_Father: {fileID: 873720541}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 500, y: -384.49}
m_AnchoredPosition: {x: 500, y: -433.41}
m_SizeDelta: {x: 300, y: 86.82}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &2086538274

View File

@ -13,7 +13,6 @@ public class LeaderboardHandle : MonoBehaviour
private MySqlConnectionStringBuilder mySQLConectionBuilder = new MySqlConnectionStringBuilder();
// Start is called before the first frame update
void Start()
{
@ -22,6 +21,8 @@ public class LeaderboardHandle : MonoBehaviour
mySQLConectionBuilder.UserID = "sql4449219";
mySQLConectionBuilder.Password = "hsFqWLxIIF";
mySQLConectionBuilder.Database = "sql4449219";
GameObject.Find("FinalScoreLabel").GetComponent<Text>().text = GameObject.Find("FinalScoreLabel").GetComponent<Text>().text.Replace("000", finalScore.ToString());
}
public void SubmitScores()