From d6d27bcd4714c5c339a3959b6df4a57209f63e77 Mon Sep 17 00:00:00 2001 From: pklaschka Date: Mon, 29 May 2017 19:44:35 +0200 Subject: [PATCH 1/6] Merge branch 'master' into Bestenliste --- .../Level/Test Monster Einfu\314\210gen.png" | Bin 0 -> 109 bytes .../Test Monster Einfu\314\210gen.png.meta" | 76 ++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 "Platformer_001/Assets/Level/Test Monster Einfu\314\210gen.png" create mode 100644 "Platformer_001/Assets/Level/Test Monster Einfu\314\210gen.png.meta" diff --git "a/Platformer_001/Assets/Level/Test Monster Einfu\314\210gen.png" "b/Platformer_001/Assets/Level/Test Monster Einfu\314\210gen.png" new file mode 100644 index 0000000000000000000000000000000000000000..d14475a7627f061d23e80798531c67a7e909cb22 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz6Hgb%kcif|XEyROC<-t;PIplE zZ=X^(zqxNhhFj5=Nx}>aX4)&)U40S#eD|NZX|G-~D4gV<(XV=6ZsYk6K>ZA!u6{1- HoD!M Date: Mon, 29 May 2017 19:44:42 +0200 Subject: [PATCH 2/6] a --- .../Level/Test Monster Einf\303\274gen.png" | Bin 109 -> 0 bytes .../Test Monster Einf\303\274gen.png.meta" | 76 ------------------ 2 files changed, 76 deletions(-) delete mode 100644 "Platformer_001/Assets/Level/Test Monster Einf\303\274gen.png" delete mode 100644 "Platformer_001/Assets/Level/Test Monster Einf\303\274gen.png.meta" diff --git "a/Platformer_001/Assets/Level/Test Monster Einf\303\274gen.png" "b/Platformer_001/Assets/Level/Test Monster Einf\303\274gen.png" deleted file mode 100644 index d14475a7627f061d23e80798531c67a7e909cb22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz6Hgb%kcif|XEyROC<-t;PIplE zZ=X^(zqxNhhFj5=Nx}>aX4)&)U40S#eD|NZX|G-~D4gV<(XV=6ZsYk6K>ZA!u6{1- HoD!M Date: Mon, 29 May 2017 21:45:34 +0200 Subject: [PATCH 3/6] Submitting now enabled. --- .../Assets/Scripts/Bestenliste/Bestenliste.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs index 42c5110..fdf7a9a 100644 --- a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs +++ b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs @@ -33,10 +33,27 @@ private void Start() StartCoroutine(GetRank()); } - public void Submit() + public IEnumerator Submit() { // TODO: Implement submitting score print("Submitting score: " + score + " (" + nameInput.text + ")"); + WWWForm form = new WWWForm(); + form.AddField("name", nameInput.text); + form.AddField("score", score); + form.AddField("scoreConfirmationString", scoreConfirmation); + var myWr = UnityWebRequest.Post(serverAdress + "/" + submitAdress, form); + + yield return myWr.Send(); + + if (myWr.isError) + { + Debug.LogError("Submit has failed."); + } + else + { + PlayerPrefs.SetInt("maxSubmitedEndlosweite", score); + CheckSubmitable(); + } } private IEnumerator GetRank() From 070c4e28c395642ba3d222144490aadf0e2b5eb2 Mon Sep 17 00:00:00 2001 From: pklaschka Date: Mon, 29 May 2017 22:08:41 +0200 Subject: [PATCH 4/6] Funktionierendes "Score-Submiting" --- .../MenuSystem/Bestenliste.unity | 8 +++---- .../Assets/Scripts/Bestenliste/Bestenliste.cs | 22 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity index 8cfa064..4b148c8 100644 --- a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity +++ b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity @@ -1155,12 +1155,12 @@ Prefab: - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.x - value: 158.38164 + value: 159.62134 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.y - value: 0 + value: -216.5 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} @@ -1882,12 +1882,12 @@ Prefab: - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.x - value: 158.38164 + value: 159.62134 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.y - value: 0 + value: -141.5 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} diff --git a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs index fdf7a9a..b734e75 100644 --- a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs +++ b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs @@ -1,6 +1,4 @@ -using System; using System.Collections; -using System.Runtime.InteropServices.ComTypes; using UnityEngine; using UnityEngine.Networking; using UnityEngine.UI; @@ -33,17 +31,28 @@ private void Start() StartCoroutine(GetRank()); } - public IEnumerator Submit() + public void Submit() { - // TODO: Implement submitting score + btnSubmit.interactable = false; + btnSubmit.GetComponentInChildren().text = "..."; + StartCoroutine(SubmitNow()); + } + + public IEnumerator SubmitNow() + { + btnSubmit.interactable = false; + btnSubmit.GetComponentInChildren().text = "..."; + print("Submitting score: " + score + " (" + nameInput.text + ")"); - WWWForm form = new WWWForm(); + var form = new WWWForm(); form.AddField("name", nameInput.text); form.AddField("score", score); form.AddField("scoreConfirmationString", scoreConfirmation); var myWr = UnityWebRequest.Post(serverAdress + "/" + submitAdress, form); yield return myWr.Send(); + + Debug.Log("Submiting."); if (myWr.isError) { @@ -51,8 +60,11 @@ public IEnumerator Submit() } else { + print(myWr.responseCode); + print(myWr.downloadHandler.text); PlayerPrefs.SetInt("maxSubmitedEndlosweite", score); CheckSubmitable(); + StartCoroutine(SetupBestenliste()); } } From c3b7032309c8c0d502f00c15fb73adbe25158ce0 Mon Sep 17 00:00:00 2001 From: pklaschka Date: Mon, 29 May 2017 22:12:12 +0200 Subject: [PATCH 5/6] Bestenlisten-Button in Hauptmenue --- .../MenuSystem/Bestenliste.unity | 4 +- .../MenuSystem/Hauptmenue.unity | 222 ++++++++++++++++++ .../ProjectSettings/EditorBuildSettings.asset | 2 + 3 files changed, 226 insertions(+), 2 deletions(-) diff --git a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity index 4b148c8..f00fe2e 100644 --- a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity +++ b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity @@ -1160,7 +1160,7 @@ Prefab: - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.y - value: -216.5 + value: 0 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} @@ -1887,7 +1887,7 @@ Prefab: - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} propertyPath: m_AnchoredPosition.y - value: -141.5 + value: 0 objectReference: {fileID: 0} - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} diff --git a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity index e25e88f..b50caf1 100644 --- a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity +++ b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity @@ -91,6 +91,84 @@ NavMeshSettings: cellSize: 0.16666667 accuratePlacement: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &14407148 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1941232782347588, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 14407149} + - component: {fileID: 14407151} + - component: {fileID: 14407150} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &14407149 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224892731018406752, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14407148} + 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: 1541251497} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &14407150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114447268820350038, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14407148} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 10 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Bestenliste +--- !u!222 &14407151 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222634344987931754, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 14407148} --- !u!1 &23342933 GameObject: m_ObjectHideFlags: 0 @@ -1243,6 +1321,7 @@ RectTransform: m_Children: - {fileID: 2002959835} - {fileID: 1040255711} + - {fileID: 1541251497} m_Father: {fileID: 1890847562} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1811,6 +1890,149 @@ Transform: m_PrefabParentObject: {fileID: 4099865118784658, guid: 6e9a9ca797e19409ab4a57e3e2514158, type: 2} m_PrefabInternal: {fileID: 1382728161} +--- !u!1 &1541251496 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1395037609657554, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1541251497} + - component: {fileID: 1541251501} + - component: {fileID: 1541251500} + - component: {fileID: 1541251499} + - component: {fileID: 1541251498} + m_Layer: 5 + m_Name: btnBestenliste + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1541251497 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224394758047748418, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541251496} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.0000603, y: 1.0000603, z: 1.0000603} + m_Children: + - {fileID: 14407149} + m_Father: {fileID: 789453630} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 105, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1541251498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114994239107799454, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541251496} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f69fb25dbf029542b0e2c55abd312cb, type: 3} + m_Name: + m_EditorClassIdentifier: + NameSceneToLoad: Bestenliste + BackgroundImage: {fileID: 2056605746} + ProgressBar: {fileID: 323856350} +--- !u!114 &1541251499 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114709332942617730, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541251496} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.47843137, g: 0.47843137, b: 0.47843137, a: 1} + m_PressedColor: {r: 0.5882353, g: 0, b: 0, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1541251500} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1541251498} + m_MethodName: LoadScene + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1541251500 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114688315258566334, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541251496} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 9012cf27380dac94da15b50118e7db93, type: 3} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1541251501 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222077949913665932, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541251496} --- !u!1001 &1542975856 Prefab: m_ObjectHideFlags: 0 diff --git a/Platformer_001/ProjectSettings/EditorBuildSettings.asset b/Platformer_001/ProjectSettings/EditorBuildSettings.asset index 35b70ab..611e3f5 100644 --- a/Platformer_001/ProjectSettings/EditorBuildSettings.asset +++ b/Platformer_001/ProjectSettings/EditorBuildSettings.asset @@ -21,3 +21,5 @@ EditorBuildSettings: path: Assets/Scenes (Level)/Kampagne.unity - enabled: 1 path: Assets/Scenes (Level)/MenuSystem/Game_Over_Screen_Kampagne.unity + - enabled: 1 + path: Assets/Scenes (Level)/MenuSystem/Bestenliste.unity From 094205ef3f65769a260809c1dbb34adb1dba1682 Mon Sep 17 00:00:00 2001 From: pklaschka Date: Mon, 29 May 2017 22:21:57 +0200 Subject: [PATCH 6/6] Einige Optimierungen und einen "Beenden-Button" --- .../MenuSystem/Bestenliste.unity | 2 +- .../MenuSystem/Hauptmenue.unity | 343 ++++++++++++++++++ .../Assets/Scripts/Bestenliste/Bestenliste.cs | 4 +- .../Assets/Scripts/MenuSystem/SceneLoader.cs | 19 +- .../ProjectSettings/ProjectSettings.asset | 10 +- 5 files changed, 363 insertions(+), 15 deletions(-) diff --git a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity index f00fe2e..25ed7a1 100644 --- a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity +++ b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Bestenliste.unity @@ -333,7 +333,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "Ihr Ergebnis: \n122354 (#3367)" + m_Text: "Ihr Ergebnis: \n... (#...)" --- !u!222 &104631840 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity index b50caf1..cebb5d4 100644 --- a/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity +++ b/Platformer_001/Assets/Scenes (Level)/MenuSystem/Hauptmenue.unity @@ -237,6 +237,149 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 23342933} +--- !u!1 &35509339 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1395037609657554, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 35509340} + - component: {fileID: 35509344} + - component: {fileID: 35509343} + - component: {fileID: 35509342} + - component: {fileID: 35509341} + m_Layer: 5 + m_Name: btnBeenden + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &35509340 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224394758047748418, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 35509339} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.0000603, y: 1.0000603, z: 1.0000603} + m_Children: + - {fileID: 954924933} + m_Father: {fileID: 789453630} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 105, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &35509341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114994239107799454, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 35509339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f69fb25dbf029542b0e2c55abd312cb, type: 3} + m_Name: + m_EditorClassIdentifier: + NameSceneToLoad: Bestenliste + BackgroundImage: {fileID: 2056605746} + ProgressBar: {fileID: 323856350} +--- !u!114 &35509342 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114709332942617730, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 35509339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.47843137, g: 0.47843137, b: 0.47843137, a: 1} + m_PressedColor: {r: 0.5882353, g: 0, b: 0, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 35509343} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 35509341} + m_MethodName: CloseGame + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &35509343 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114688315258566334, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 35509339} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 9012cf27380dac94da15b50118e7db93, type: 3} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &35509344 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222077949913665932, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 35509339} --- !u!1001 &184535170 Prefab: m_ObjectHideFlags: 0 @@ -1322,6 +1465,8 @@ RectTransform: - {fileID: 2002959835} - {fileID: 1040255711} - {fileID: 1541251497} + - {fileID: 1287285305} + - {fileID: 35509340} m_Father: {fileID: 1890847562} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1528,6 +1673,84 @@ Transform: m_PrefabParentObject: {fileID: 4099865118784658, guid: 6e9a9ca797e19409ab4a57e3e2514158, type: 2} m_PrefabInternal: {fileID: 877992406} +--- !u!1 &954924932 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1941232782347588, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 954924933} + - component: {fileID: 954924935} + - component: {fileID: 954924934} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &954924933 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224892731018406752, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 954924932} + 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: 35509340} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &954924934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114447268820350038, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 954924932} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 10 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Beenden +--- !u!222 &954924935 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222634344987931754, guid: 0ae1ace1c4c0e4e7bb640d920ddb1920, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 954924932} --- !u!1 &980042916 GameObject: m_ObjectHideFlags: 0 @@ -1774,6 +1997,126 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 6e9a9ca797e19409ab4a57e3e2514158, type: 2} m_IsPrefabParent: 0 +--- !u!1001 &1287285304 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 789453630} + m_Modifications: + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchoredPosition.x + value: 159.62134 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchoredPosition.y + value: -212.94481 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_SizeDelta.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_SizeDelta.y + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: f6748a010e46d4334a2b9717aa34b24d, type: 2} + m_IsPrefabParent: 0 +--- !u!224 &1287285305 stripped +RectTransform: + m_PrefabParentObject: {fileID: 224902029835350780, guid: f6748a010e46d4334a2b9717aa34b24d, + type: 2} + m_PrefabInternal: {fileID: 1287285304} --- !u!1001 &1295702321 Prefab: m_ObjectHideFlags: 0 diff --git a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs index b734e75..9bf507f 100644 --- a/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs +++ b/Platformer_001/Assets/Scripts/Bestenliste/Bestenliste.cs @@ -85,7 +85,7 @@ private IEnumerator GetRank() private IEnumerator SetupBestenliste() { - bestenliste.text = "Die Besten:\n"; + bestenliste.text = "Die Besten:\nWird geladen."; var myWr = UnityWebRequest.Get(serverAdress + "/" + best5Adress); yield return myWr.Send(); @@ -93,7 +93,7 @@ private IEnumerator SetupBestenliste() Debug.LogError(myWr.error); } else { - bestenliste.text = "Die Besten:\n" + myWr.downloadHandler.text; + bestenliste.text = "Die Besten:" + myWr.downloadHandler.text; } } diff --git a/Platformer_001/Assets/Scripts/MenuSystem/SceneLoader.cs b/Platformer_001/Assets/Scripts/MenuSystem/SceneLoader.cs index 42b705b..901109c 100644 --- a/Platformer_001/Assets/Scripts/MenuSystem/SceneLoader.cs +++ b/Platformer_001/Assets/Scripts/MenuSystem/SceneLoader.cs @@ -13,7 +13,7 @@ public class SceneLoader : MonoBehaviour { private bool sceneLoading; AsyncOperation async; - void Start() { + public void Start() { sceneLoading = false; } @@ -33,19 +33,22 @@ public void LoadLastLevel() { SceneManager.LoadScene("Kampagne"); } - IEnumerator StartSceneLoad() { + private IEnumerator StartSceneLoad() { async = SceneManager.LoadSceneAsync(NameSceneToLoad); if( null != async ) async.allowSceneActivation = false; yield return async; } - void Update() { - if (sceneLoading) { - ProgressBar.value = async.progress/0.9f; - if (async.progress >= 0.9f) - async.allowSceneActivation = true; - } + public void Update() { + if (!sceneLoading) return; + ProgressBar.value = async.progress/0.9f; + if (async.progress >= 0.9f) + async.allowSceneActivation = true; + } + public void CloseGame() + { + Application.Quit(); } } diff --git a/Platformer_001/ProjectSettings/ProjectSettings.asset b/Platformer_001/ProjectSettings/ProjectSettings.asset index 674e4e4..0d02991 100644 --- a/Platformer_001/ProjectSettings/ProjectSettings.asset +++ b/Platformer_001/ProjectSettings/ProjectSettings.asset @@ -23,8 +23,8 @@ PlayerSettings: m_SplashScreenDrawMode: 1 m_SplashScreenBackgroundAnimationZoom: 1 m_SplashScreenLogoAnimationZoom: 1 - m_SplashScreenBackgroundLandscapeAspect: 1 - m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeAspect: 1.7777778 + m_SplashScreenBackgroundPortraitAspect: 1.7777778 m_SplashScreenBackgroundLandscapeUvs: serializedVersion: 2 x: 0 @@ -42,8 +42,10 @@ PlayerSettings: duration: 2 - logo: {fileID: 21300000, guid: f4c480332ecbd44e08b37502a4397333, type: 3} duration: 2 - m_SplashScreenBackgroundLandscape: {fileID: 0} - m_SplashScreenBackgroundPortrait: {fileID: 0} + m_SplashScreenBackgroundLandscape: {fileID: 1, guid: 00000000000000000000000000000000, + type: 0} + m_SplashScreenBackgroundPortrait: {fileID: 1, guid: 00000000000000000000000000000000, + type: 0} m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1024