This commit is contained in:
hans 2021-01-31 01:35:41 +00:00
commit bc26de77b0
22 changed files with 1742 additions and 4166 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 58fc0ebddc4ce9f4e834f91dddb1132b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scenes/Menu.meta Normal file
View 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

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8650591ee4e3c1b41b0eb5a15430ded2
guid: e728960f94bcba84089c530dec85aa8d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c5831bf2a62222643a5755cbc5d8bacd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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);
}
}
}

View File

@ -6,18 +6,21 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/MainMenu.unity
path: Assets/Scenes/Menu/MainMenu.unity
guid: 33d54f39f74b30b4dbb8d638a1d5c9b4
- enabled: 1
path: Assets/Scenes/Vasek.unity
path: Assets/Scenes/Testing/Filip.unity
guid: 326dea585e0ea574389529eaae8a0ab4
- enabled: 1
path: Assets/Scenes/Testing/Vasek.unity
guid: 127deaeaf7712824f83ee4cba639e023
- enabled: 1
path: Assets/Scenes/Level 2.unity
path: Assets/Scenes/Levels/Level 2.unity
guid: 3ff2402a6d1a5b1459781b37d0f8e1c7
- enabled: 1
path: Assets/Scenes/Level 3.unity
path: Assets/Scenes/Levels/Level 3.unity
guid: 7d7146aedfcd48445bb0d44a485249b2
- enabled: 1
path: Assets/Scenes/Filip.unity
guid: 326dea585e0ea574389529eaae8a0ab4
path: Assets/Scenes/Menu/FinalMenu.unity
guid: e728960f94bcba84089c530dec85aa8d
m_configObjects: {}