Merge branch 'master' of https://git.steelants.cz/GJP/GlobalGameJam-2021
This commit is contained in:
		
							
								
								
									
										8
									
								
								Assets/Scenes/Levels.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Assets/Scenes/Levels.meta
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
fileFormatVersion: 2
 | 
			
		||||
guid: 58fc0ebddc4ce9f4e834f91dddb1132b
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
							
								
								
									
										8
									
								
								Assets/Scenes/Menu.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Assets/Scenes/Menu.meta
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
fileFormatVersion: 2
 | 
			
		||||
guid: 493879cb3996a3544afb0caa076a9532
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1684
									
								
								Assets/Scenes/Menu/FinalMenu.unity
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1684
									
								
								Assets/Scenes/Menu/FinalMenu.unity
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
fileFormatVersion: 2
 | 
			
		||||
guid: 8650591ee4e3c1b41b0eb5a15430ded2
 | 
			
		||||
guid: e728960f94bcba84089c530dec85aa8d
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
@@ -1224,7 +1224,7 @@ RectTransform:
 | 
			
		||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
			
		||||
  m_AnchorMin: {x: 0.5, y: 0}
 | 
			
		||||
  m_AnchorMax: {x: 0.5, y: 1}
 | 
			
		||||
  m_AnchoredPosition: {x: -63.5, y: 33.1}
 | 
			
		||||
  m_AnchoredPosition: {x: -63.5, y: -123}
 | 
			
		||||
  m_SizeDelta: {x: 0, y: 0}
 | 
			
		||||
  m_Pivot: {x: 0.5, y: 1}
 | 
			
		||||
--- !u!114 &748254063
 | 
			
		||||
@@ -1837,7 +1837,7 @@ MonoBehaviour:
 | 
			
		||||
  m_OnCullStateChanged:
 | 
			
		||||
    m_PersistentCalls:
 | 
			
		||||
      m_Calls: []
 | 
			
		||||
  m_text: Quit
 | 
			
		||||
  m_text: Back
 | 
			
		||||
  m_isRightToLeft: 0
 | 
			
		||||
  m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
 | 
			
		||||
  m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
 | 
			
		||||
@@ -2062,6 +2062,7 @@ MonoBehaviour:
 | 
			
		||||
  m_Name: 
 | 
			
		||||
  m_EditorClassIdentifier: 
 | 
			
		||||
  ScoreText: {fileID: 748254063}
 | 
			
		||||
  name: {fileID: 0}
 | 
			
		||||
--- !u!114 &989324638
 | 
			
		||||
MonoBehaviour:
 | 
			
		||||
  m_ObjectHideFlags: 0
 | 
			
		||||
							
								
								
									
										8
									
								
								Assets/Scenes/Testing.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Assets/Scenes/Testing.meta
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
fileFormatVersion: 2
 | 
			
		||||
guid: c5831bf2a62222643a5755cbc5d8bacd
 | 
			
		||||
folderAsset: yes
 | 
			
		||||
DefaultImporter:
 | 
			
		||||
  externalObjects: {}
 | 
			
		||||
  userData: 
 | 
			
		||||
  assetBundleName: 
 | 
			
		||||
  assetBundleVariant: 
 | 
			
		||||
@@ -3,12 +3,14 @@ using System.Collections.Generic;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using UnityEngine.SceneManagement;
 | 
			
		||||
using UnityEngine.Networking;
 | 
			
		||||
using UnityEngine.UI ;
 | 
			
		||||
using System.Collections;
 | 
			
		||||
using TMPro;
 | 
			
		||||
 | 
			
		||||
public class MainMenu : MonoBehaviour
 | 
			
		||||
{
 | 
			
		||||
    public TMPro.TextMeshProUGUI ScoreText;
 | 
			
		||||
    public InputField name;
 | 
			
		||||
    // Start is called before the first frame update
 | 
			
		||||
    void Start()
 | 
			
		||||
    {
 | 
			
		||||
@@ -37,6 +39,16 @@ public class MainMenu : MonoBehaviour
 | 
			
		||||
        Application.Quit();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void ScoreSubmit()
 | 
			
		||||
    {
 | 
			
		||||
        WWWForm form = new WWWForm();
 | 
			
		||||
        form.AddField("name", name.text);
 | 
			
		||||
        form.AddField("score", 20);
 | 
			
		||||
 | 
			
		||||
        StartCoroutine(PostText("dev.steelants.cz/vasek/GGJ2021/GeorgeJones/Server/api.php", form));
 | 
			
		||||
        SceneManager.LoadScene(0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    IEnumerator GetText(string uri) {
 | 
			
		||||
        UnityWebRequest www = UnityWebRequest.Get(uri);
 | 
			
		||||
        yield return www.SendWebRequest();
 | 
			
		||||
@@ -50,4 +62,13 @@ public class MainMenu : MonoBehaviour
 | 
			
		||||
            ScoreText.text = www.downloadHandler.text;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    IEnumerator PostText(string uri, WWWForm data) {
 | 
			
		||||
        UnityWebRequest www = UnityWebRequest.Post(uri, data);
 | 
			
		||||
        yield return www.SendWebRequest();
 | 
			
		||||
 
 | 
			
		||||
        if(www.isNetworkError || www.isHttpError) {
 | 
			
		||||
            Debug.Log(www.error);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user