This commit is contained in:
2023-05-04 12:56:56 +02:00
parent b94c80b293
commit 2f0ae77e35
5 changed files with 113 additions and 87 deletions

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3b4dc5f685f8edc4bbba6fb0c8ea39ba
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8851c5995be5f704babebf752d60b4e2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 88c6da05db186cb44a4453fd624b31b2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -21,10 +21,16 @@ public class DatabaseData : MonoBehaviour
public ulong coins = 0; public ulong coins = 0;
private string url;
private bool forceLocalUrl = true; private bool forceLocalUrl = true;
private const int PORT = 24002; private const int PORT = 24002;
#if UNITY_EDITOR || UNITY_EDITOR_64
private string url = "http://localhost:" + PORT.ToString();
#else
private string url = "http://nodejs.dszcbaross.edu.hu:" + PORT.ToString();
#endif
private void Awake() { private void Awake() {
hst = FindObjectOfType<HighScoreTable>(); //High Score Table referencia hst = FindObjectOfType<HighScoreTable>(); //High Score Table referencia
htdc = new HighScoreTableDataContainer(); //High Score Table Container objektum htdc = new HighScoreTableDataContainer(); //High Score Table Container objektum
@@ -32,21 +38,20 @@ public class DatabaseData : MonoBehaviour
coinc = FindObjectOfType<CoinCounter>(); coinc = FindObjectOfType<CoinCounter>();
//writer = new StreamWriter(Application.persistentDataPath + "/coins.txt", false, Encoding.Default); //writer = new StreamWriter(Application.persistentDataPath + "/coins.txt", false, Encoding.Default);
if((Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.LinuxEditor || Application.platform == RuntimePlatform.OSXEditor) && forceLocalUrl){ /*if((Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.LinuxEditor || Application.platform == RuntimePlatform.OSXEditor) && forceLocalUrl){
//ha az editorba van //ha az editorba van
url = "http://localhost:" + PORT.ToString(); url = "http://localhost:" + PORT.ToString();
}else if(!forceLocalUrl){ }else if(!forceLocalUrl){
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString(); url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
}else{ }else{
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString(); url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
} }*/
//url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString(); url = "http://nodejs.dszcbaross.edu.hu:" + PORT.ToString();
} }
private void Start() { private void Start() {
GetHighScoreData(); GetHighScoreData(); //highscore scenehez
//StartCoroutine(GetCoinData(1));
} }
public void jsonParser(string jsondata) { //beerkezo json adat eltarolasa public void jsonParser(string jsondata) { //beerkezo json adat eltarolasa

View File

@@ -15,9 +15,9 @@ MonoBehaviour:
m_PixelRect: m_PixelRect:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 43 y: 28
width: 1920 width: 1366
height: 997 height: 680
m_ShowMode: 4 m_ShowMode: 4
m_Title: Console m_Title: Console
m_RootView: {fileID: 9} m_RootView: {fileID: 9}
@@ -39,12 +39,12 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 775 x: 551
y: 0 y: 0
width: 662 width: 471
height: 290 height: 192
m_MinSize: {x: 200, y: 200} m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 18} m_ActualView: {fileID: 18}
m_Panes: m_Panes:
- {fileID: 18} - {fileID: 18}
@@ -68,13 +68,13 @@ MonoBehaviour:
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 657 y: 438
width: 1437 width: 1022
height: 290 height: 192
m_MinSize: {x: 200, y: 100} m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096} m_MaxSize: {x: 16192, y: 8096}
vertical: 0 vertical: 0
controlID: 63 controlID: 76
--- !u!114 &4 --- !u!114 &4
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@@ -92,8 +92,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 470 width: 339
height: 657 height: 438
m_MinSize: {x: 101, y: 121} m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 20} m_ActualView: {fileID: 20}
@@ -116,10 +116,10 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 884 x: 628
y: 0 y: 0
width: 553 width: 394
height: 657 height: 438
m_MinSize: {x: 202, y: 221} m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021} m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 15} m_ActualView: {fileID: 15}
@@ -146,12 +146,12 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 30 y: 30
width: 1920 width: 1366
height: 947 height: 630
m_MinSize: {x: 400, y: 200} m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192} m_MaxSize: {x: 32384, y: 16192}
vertical: 0 vertical: 0
controlID: 151 controlID: 108
--- !u!114 &7 --- !u!114 &7
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@@ -167,10 +167,10 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 1437 x: 1022
y: 0 y: 0
width: 483 width: 344
height: 947 height: 630
m_MinSize: {x: 276, y: 71} m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 17} m_ActualView: {fileID: 17}
@@ -195,8 +195,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 775 width: 551
height: 290 height: 192
m_MinSize: {x: 231, y: 271} m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021} m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 16} m_ActualView: {fileID: 16}
@@ -224,8 +224,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1920 width: 1366
height: 997 height: 680
m_MinSize: {x: 875, y: 300} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
m_UseTopView: 1 m_UseTopView: 1
@@ -249,7 +249,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1920 width: 1366
height: 30 height: 30
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
@@ -270,8 +270,8 @@ MonoBehaviour:
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 977 y: 660
width: 1920 width: 1366
height: 20 height: 20
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
@@ -294,12 +294,12 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1437 width: 1022
height: 947 height: 630
m_MinSize: {x: 300, y: 200} m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 1 vertical: 1
controlID: 55 controlID: 109
--- !u!114 &13 --- !u!114 &13
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@@ -320,12 +320,12 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1437 width: 1022
height: 657 height: 438
m_MinSize: {x: 300, y: 100} m_MinSize: {x: 300, y: 100}
m_MaxSize: {x: 24288, y: 8096} m_MaxSize: {x: 24288, y: 8096}
vertical: 0 vertical: 0
controlID: 56 controlID: 110
--- !u!114 &14 --- !u!114 &14
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@@ -341,10 +341,10 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 470 x: 339
y: 0 y: 0
width: 414 width: 289
height: 657 height: 438
m_MinSize: {x: 202, y: 221} m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021} m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 19} m_ActualView: {fileID: 19}
@@ -372,10 +372,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 884 x: 628
y: 73 y: 86
width: 551 width: 392
height: 636 height: 417
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@@ -404,7 +404,7 @@ MonoBehaviour:
- UnityEditor.DeviceSimulation.ApplicationSettingsPlugin - UnityEditor.DeviceSimulation.ApplicationSettingsPlugin
pluginStates: pluginStates:
- '{}' - '{}'
scale: 23 scale: 14
fitToScreenEnabled: 1 fitToScreenEnabled: 1
rotationDegree: 0 rotationDegree: 0
highlightSafeAreaEnabled: 0 highlightSafeAreaEnabled: 0
@@ -432,9 +432,9 @@ MonoBehaviour:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 730 y: 524
width: 774 width: 550
height: 269 height: 171
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@@ -452,22 +452,22 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Scenes - Assets/Scripts/Network
m_Globs: [] m_Globs: []
m_OriginalText: m_OriginalText:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 74 m_StartGridSize: 74
m_LastFolders: m_LastFolders:
- Assets/Scenes - Assets/Scripts/Network
m_LastFoldersGridSize: 74 m_LastFoldersGridSize: 74
m_LastProjectPath: E:\dev\zarodolgozat\ColorBall m_LastProjectPath: /home/tom/Documents/dev/zarodolgozat/ColorRunner
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 153}
m_SelectedIDs: a65f0000 m_SelectedIDs: a6600000
m_LastClickedID: 24486 m_LastClickedID: 24742
m_ExpandedIDs: 00000000965f0000a45f0000ae5f0000b05f0000 m_ExpandedIDs: 000000007e6000008060000082600000846000009860000000ca9a3b
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@@ -495,7 +495,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 00000000965f0000 m_ExpandedIDs: 000000007e600000806000008260000084600000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@@ -571,10 +571,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 1437 x: 1022
y: 73 y: 86
width: 482 width: 343
height: 926 height: 609
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@@ -586,7 +586,7 @@ MonoBehaviour:
m_ControlHash: -371814159 m_ControlHash: -371814159
m_PrefName: Preview_InspectorPreview m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1 m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 0 m_LastVerticalScrollValue: 212
m_GlobalObjectId: m_GlobalObjectId:
m_InspectorMode: 0 m_InspectorMode: 0
m_LockTracker: m_LockTracker:
@@ -612,10 +612,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 775 x: 551
y: 730 y: 524
width: 660 width: 469
height: 269 height: 171
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@@ -623,9 +623,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 82490100 m_SelectedIDs: a6510000
m_LastClickedID: 84354 m_LastClickedID: 20902
m_ExpandedIDs: 8eccffff18fbffff m_ExpandedIDs: f4faffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@@ -669,10 +669,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 470 x: 339
y: 73 y: 86
width: 412 width: 287
height: 636 height: 417
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@@ -769,7 +769,7 @@ MonoBehaviour:
containerId: overlay-container--right containerId: overlay-container--right
floating: 0 floating: 0
collapsed: 0 collapsed: 0
displayed: 1 displayed: 0
snapOffset: {x: 0, y: 0} snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0} snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0 snapCorner: 0
@@ -907,9 +907,9 @@ MonoBehaviour:
m_PlayAudio: 0 m_PlayAudio: 0
m_AudioPlay: 0 m_AudioPlay: 0
m_Position: m_Position:
m_Target: {x: -42.686497, y: 5.8833237, z: 31.033562} m_Target: {x: -3.0000005, y: 0, z: 37.199997}
speed: 2 speed: 2
m_Value: {x: -42.686497, y: 5.8833237, z: 31.033562} m_Value: {x: -3.0000005, y: 0, z: 37.199997}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
@@ -956,13 +956,13 @@ MonoBehaviour:
m_GridAxis: 1 m_GridAxis: 1
m_gridOpacity: 0.5 m_gridOpacity: 0.5
m_Rotation: m_Rotation:
m_Target: {x: 0.03978299, y: -0.8525561, z: 0.06561682, w: 0.51698434} m_Target: {x: 0.058660932, y: 0.9411822, z: -0.22614713, w: 0.2441374}
speed: 2 speed: 2
m_Value: {x: 0.039782733, y: -0.8525506, z: 0.06561639, w: 0.516981} m_Value: {x: 0.058660623, y: 0.94117725, z: -0.22614594, w: 0.24413612}
m_Size: m_Size:
m_Target: 35.189785 m_Target: 20.056421
speed: 2 speed: 2
m_Value: 35.189785 m_Value: 20.056421
m_Ortho: m_Ortho:
m_Target: 0 m_Target: 0
speed: 2 speed: 2
@@ -1008,9 +1008,9 @@ MonoBehaviour:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 73 y: 86
width: 469 width: 338
height: 636 height: 417
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default