update
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8de1c3d971ab3e84780f2c43947a29ec
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public enum Colors {
|
||||
public enum Colors { //maybe change this to a class to add abilites
|
||||
None = -1,
|
||||
Grey,
|
||||
Red,
|
||||
@@ -29,7 +29,6 @@ public class ColorManager : MonoBehaviour
|
||||
} else {
|
||||
toPaint.GetComponent<Renderer>().material.color = colorMaterials[(int)color].color;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void CheckGroundColor(GameObject collided) {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09fd9c3cadd74f54c89d66ed044bff89
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,53 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
public class DatabaseData : MonoBehaviour
|
||||
{
|
||||
public TMP_InputField input;
|
||||
|
||||
|
||||
public void GetData() => StartCoroutine(GetData_Coroutine());
|
||||
public void PostData() => StartCoroutine(PostData_Coroutine());
|
||||
|
||||
IEnumerator GetData_Coroutine() {
|
||||
input.text = "Loading...";
|
||||
|
||||
string uri = "http://localhost:3000/player";
|
||||
|
||||
using (UnityWebRequest request = UnityWebRequest.Get(uri)) {
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
if(request.isNetworkError || request.isHttpError) { //lecserelni majd
|
||||
input.text = request.error;
|
||||
} else {
|
||||
input.text = request.downloadHandler.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator PostData_Coroutine() {
|
||||
input.text = "loading...";
|
||||
|
||||
string uri = "http://localhost:3000/newplayer";
|
||||
|
||||
/*List<IMultipartFormSection> formData = new List<IMultipartFormSection>();
|
||||
formData.Add(new MultipartFormDataSection("field1=player_name"));
|
||||
formData.Add(new MultipartFormFileSection("bevitel1", "thewarrior1210"));*/
|
||||
|
||||
WWWForm form = new WWWForm();
|
||||
form.AddField("bevitel1","thewarrior1210");
|
||||
|
||||
using(UnityWebRequest request = UnityWebRequest.Post(uri, form)) {
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
if (request.isNetworkError || request.isHttpError) { //lecserelni majd
|
||||
input.text = request.error;
|
||||
} else {
|
||||
input.text = request.downloadHandler.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e64f87fb66ea20a468ef1bdc205e7484
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,17 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
|
||||
public class WriteFile : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
public void writeUserName(string username) {
|
||||
StreamWriter writer = new StreamWriter(@"adat.txt", false);
|
||||
writer.Write(username);
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4102586368925fe449e8d028a1fee6c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user