high score table working after lose
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b4dc5f685f8edc4bbba6fb0c8ea39ba
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8851c5995be5f704babebf752d60b4e2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88c6da05db186cb44a4453fd624b31b2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.4440218, g: 0.49316478, b: 0.5722311, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.44402242, g: 0.49316543, b: 0.5722324, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -550,7 +550,7 @@ Canvas:
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_SortingOrder: 2
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &263548834
|
||||
RectTransform:
|
||||
@@ -2113,6 +2113,7 @@ GameObject:
|
||||
- component: {fileID: 763363913}
|
||||
- component: {fileID: 763363915}
|
||||
- component: {fileID: 763363916}
|
||||
- component: {fileID: 763363917}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@@ -2209,6 +2210,18 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4102586368925fe449e8d028a1fee6c2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &763363917
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 763363911}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e14c8833040013f4f9c1d59cd1d9dd8e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1082942970
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2287,7 +2300,7 @@ Canvas:
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_SortingOrder: 1
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1082942974
|
||||
RectTransform:
|
||||
@@ -3236,7 +3249,19 @@ MonoBehaviour:
|
||||
m_TargetGraphic: {fileID: 1525414363}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 763363917}
|
||||
m_TargetAssemblyTypeName: SceneUIManager, Assembly-CSharp
|
||||
m_MethodName: LoadMenuScene
|
||||
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
|
||||
--- !u!114 &1525414363
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.56158954, g: 0.7218083, b: 0.8178571, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.5615895, g: 0.72180885, b: 0.81785697, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -1001,7 +1001,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 601898925}
|
||||
m_LocalRotation: {x: 0.045581307, y: -0.70516795, z: 0.045520626, w: 0.7061079}
|
||||
m_LocalRotation: {x: 0.045581315, y: -0.70516795, z: 0.04552063, w: 0.7061079}
|
||||
m_LocalPosition: {x: 2.27, y: 4.16525, z: 3.82}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -2052,9 +2052,9 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ScaleFactor: 1.5
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_ScreenMatchMode: 1
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
@@ -3310,7 +3310,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1513686735}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496388, z: -0.00070720055, w: 0.9741453}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496013, z: -0.0007071918, w: 0.9741453}
|
||||
m_LocalPosition: {x: -0.28647116, y: 6.2664723, z: 2.6748314}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -3521,7 +3521,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1572233530
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3539,7 +3539,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 190, y: -693}
|
||||
m_AnchoredPosition: {x: 190, y: 517}
|
||||
m_SizeDelta: {x: 400, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1572233531
|
||||
|
||||
@@ -12,7 +12,7 @@ public class HighScoreTable : MonoBehaviour
|
||||
private HighScoreTableDataContainer htdc; //A tombot tarolo osztalyhoz referencia
|
||||
|
||||
private void Start() {
|
||||
dbData.GetHighScoreData();
|
||||
//dbData.GetHighScoreData();
|
||||
}
|
||||
|
||||
public void CreateTable(HighScoreTableData[] htd){
|
||||
|
||||
@@ -5,6 +5,7 @@ using TMPro;
|
||||
using UnityEngine.Networking;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class DatabaseData : MonoBehaviour
|
||||
{
|
||||
@@ -29,12 +30,12 @@ public class DatabaseData : MonoBehaviour
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
//GetHighScoreData();
|
||||
GetHighScoreData();
|
||||
//StartCoroutine(GetCoinData(1));
|
||||
}
|
||||
|
||||
public void jsonParser(string jsondata) { //beerkezo json adat eltarolasa
|
||||
players = new PlayerList(); //jatekos lista osztaly
|
||||
players = new PlayerList(); //jatekos lista osztaly || lehet okozza a hibat!!
|
||||
players = JsonUtility.FromJson<PlayerList>("{\"player\":" + jsondata + "}");
|
||||
}
|
||||
|
||||
@@ -117,6 +118,7 @@ public class DatabaseData : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
|
||||
private IEnumerator IGetCurretPlayer(int userid){
|
||||
string uri = "http://localhost:3000/currentplayer";
|
||||
|
||||
@@ -158,7 +160,8 @@ public class DatabaseData : MonoBehaviour
|
||||
//input.text = uwr.downloadHandler.text;
|
||||
Debug.Log(uwr.downloadHandler.text);
|
||||
jsonParserHighScore(uwr.downloadHandler.text);
|
||||
hst.CreateTable(htdc.htd); //high score tabla letrehozasa
|
||||
if(SceneManager.GetActiveScene().name.Equals("HighScore"))
|
||||
hst.CreateTable(htdc.htd); //high score tabla letrehozasa
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,20 +5,14 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneUIManager : MonoBehaviour
|
||||
{
|
||||
private int menuSceneIndex = 0, currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
|
||||
|
||||
public void LoadMenuScene() {
|
||||
SceneManager.LoadScene(menuSceneIndex);
|
||||
SceneManager.LoadScene(0);
|
||||
}
|
||||
|
||||
public void LoadPauseMenu() {
|
||||
//to be implemented when the ui is done
|
||||
}
|
||||
|
||||
public void LoadOptionsMenu() {
|
||||
//to be implemented when the ui is done
|
||||
}
|
||||
|
||||
public void LoadNextScene() {
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
|
||||
}
|
||||
@@ -26,4 +20,5 @@ public class SceneUIManager : MonoBehaviour
|
||||
public static void LoadScene(int sceneIndex) {
|
||||
SceneManager.LoadScene(sceneIndex);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ public class UsernameHandler : MonoBehaviour
|
||||
private void Start() {
|
||||
usernameCheck();
|
||||
}
|
||||
|
||||
|
||||
public void ReadUsername(string username){ //kiirja az inputbol kapott usernevet fajlba
|
||||
this.username = username;
|
||||
|
||||
@@ -13,12 +13,10 @@ public class fps : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (Time.unscaledTime > _timer) {
|
||||
int fps = (int)(1f / Time.unscaledDeltaTime);
|
||||
fpsText.text = "FPS: " + fps;
|
||||
_timer = Time.unscaledTime + _hudRefreshRate;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user