From 63fae0aa8daf837a55aff2253e380779783bafac Mon Sep 17 00:00:00 2001 From: playmaker1210 Date: Wed, 8 Mar 2023 18:57:02 +0100 Subject: [PATCH] ugynok csapat oszlop fix --- Assets/Scenes/Jatek.unity | 1 + Assets/Scripts/Ugynok.cs | 21 ++++- UserSettings/Layouts/default-2021.dwlt | 124 ++++++++++++------------- 3 files changed, 79 insertions(+), 67 deletions(-) diff --git a/Assets/Scenes/Jatek.unity b/Assets/Scenes/Jatek.unity index 91f357f..6ddada5 100644 --- a/Assets/Scenes/Jatek.unity +++ b/Assets/Scenes/Jatek.unity @@ -4637,6 +4637,7 @@ MonoBehaviour: jatekosvesztett: 0 vanertelme: 1 State: 0 + helyszinaktivalasBtn: {fileID: 824033280} --- !u!1 &229807670 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Ugynok.cs b/Assets/Scripts/Ugynok.cs index f4629be..0ff5ac3 100644 --- a/Assets/Scripts/Ugynok.cs +++ b/Assets/Scripts/Ugynok.cs @@ -105,8 +105,7 @@ public class Ugynok : MonoBehaviour } - public void UgynokSorsolas(int x, int y) - { + public void UgynokSorsolas(int x, int y){ if (x == 1 && y == 1) { if (oneone[0].text.Equals("")) @@ -292,10 +291,22 @@ public class Ugynok : MonoBehaviour public void ugynokOles(TMP_Text ugynokText){ //string tmp = ugynokText.gameObject.name; - int x = (int)Char.GetNumericValue(ugynokText.gameObject.name[7]); - int y = (int)Char.GetNumericValue(ugynokText.gameObject.name[8]); + string s = ugynokText.gameObject.name; + //Debug.Log("gomb name: " + s); + string sx = Char.ToString(s[7]); + string sy = Char.ToString(s[8]); + //char cx = sx[7]; + //char cy = sx[8]; + int x = int.Parse(sx); + int y = int.Parse(sy); Debug.Log("ugynok x: " + x + " y: "+y); Debug.Log("movement x: " + movement.jelenlegi_x + " y: " + movement.jelenlegi_y); + + if(x != movement.jelenlegi_x || y != movement.jelenlegi_y){ + Debug.Log("nem egyenlo a ketto"); + }else{ + Debug.Log("egyenlo"); + } if(ugynokText.text.Equals("")){ //ha nincs ott ugynok csapat ne csinaljon semmit Debug.Log("itt nincs ugynok csapat!!"); @@ -304,7 +315,7 @@ public class Ugynok : MonoBehaviour if(!droidagyuAktivalva){ //toltenyek levonasa //nincs aktivalva a targy csak azon a helyen olhet ahol van (x, y) - if(x != movement.jelenlegi_x && y != movement.jelenlegi_y){ + if(x != movement.jelenlegi_x || y != movement.jelenlegi_y){ Debug.Log("nem vagy azon a helyen es nincs aktivalva a targy!"); return; } diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index dcbe4db..d731d78 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -19,7 +19,7 @@ MonoBehaviour: width: 1366 height: 673 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Project m_RootView: {fileID: 2} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -119,7 +119,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 79 + controlID: 86 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -139,12 +139,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1001 + width: 1015 height: 623 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 80 + controlID: 87 --- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 @@ -164,12 +164,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1001 - height: 393 + width: 1015 + height: 422 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 81 + controlID: 22 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -187,8 +187,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 191 - height: 393 + width: 153 + height: 422 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} @@ -211,10 +211,10 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 191 + x: 153 y: 0 - width: 810 - height: 393 + width: 862 + height: 422 m_MinSize: {x: 202, y: 221} m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 14} @@ -239,9 +239,9 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 393 - width: 1001 - height: 230 + y: 422 + width: 1015 + height: 201 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} m_ActualView: {fileID: 15} @@ -259,23 +259,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 1 m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: InspectorWindow + m_Name: ConsoleWindow m_EditorClassIdentifier: m_Children: [] m_Position: serializedVersion: 2 - x: 1001 + x: 1015 y: 0 - width: 365 + width: 351 height: 623 - m_MinSize: {x: 276, y: 71} + m_MinSize: {x: 101, y: 121} m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 17} + m_ActualView: {fileID: 16} m_Panes: - {fileID: 17} - {fileID: 16} - m_Selected: 0 - m_LastSelected: 1 + m_Selected: 1 + m_LastSelected: 0 --- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 @@ -296,10 +296,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 191 + x: 154 y: 86 - width: 808 - height: 372 + width: 859 + height: 401 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -310,7 +310,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 624, y: 351} + m_TargetSize: {x: 676, y: 380} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -325,10 +325,10 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -312 - m_HBaseRangeMax: 312 - m_VBaseRangeMin: -175.5 - m_VBaseRangeMax: 175.5 + m_HBaseRangeMin: -338 + m_HBaseRangeMax: 338 + m_VBaseRangeMin: -190 + m_VBaseRangeMax: 190 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -337,7 +337,7 @@ MonoBehaviour: m_HSlider: 0 m_VSlider: 0 m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 1 + m_EnableMouseInput: 0 m_EnableSliderZoomHorizontal: 0 m_EnableSliderZoomVertical: 0 m_UniformScale: 1 @@ -346,23 +346,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 808 - height: 351 + width: 859 + height: 380 m_Scale: {x: 1, y: 1} - m_Translation: {x: 404, y: 175.5} + m_Translation: {x: 429.5, y: 190} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -404 - y: -175.5 - width: 808 - height: 351 + x: -429.5 + y: -190 + width: 859 + height: 380 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 808, y: 372} + m_LastWindowPixelSize: {x: 859, y: 401} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -390,8 +390,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 86 - width: 190 - height: 372 + width: 152 + height: 401 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -399,9 +399,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: + m_SelectedIDs: cc240000 m_LastClickedID: 0 - m_ExpandedIDs: 5a98ffff0099ffffde9affffea9affffb69cffffd69cffffd2a2ffff50a3ffff5ea3ffff66a3ffff2ea5ffff38a5ffffccaaffff6eabffff48adffff50adffff18afffff34afffff28fbffff78700000 + m_ExpandedIDs: 28fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -445,10 +445,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 191 + x: 153 y: 86 - width: 808 - height: 372 + width: 860 + height: 401 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -705,9 +705,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -0.39001906, y: 0.54019904, z: -2.1025283} + m_Target: {x: -2.1241224, y: -0.120902985, z: -2.0966113} speed: 2 - m_Value: {x: -0.39001906, y: 0.54019904, z: -2.1025283} + m_Value: {x: -2.1241224, y: -0.120902985, z: -2.0966113} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -758,9 +758,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 12.160805 + m_Target: 11.152161 speed: 2 - m_Value: 12.160805 + m_Value: 11.152161 m_Ortho: m_Target: 1 speed: 2 @@ -806,9 +806,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 479 - width: 1000 - height: 209 + y: 508 + width: 1014 + height: 180 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -838,9 +838,9 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: 027a0000 - m_LastClickedID: 31234 + scrollPos: {x: 0, y: 1} + m_SelectedIDs: 0a7a0000 + m_LastClickedID: 31242 m_ExpandedIDs: 00000000ea79000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 @@ -921,7 +921,7 @@ MonoBehaviour: m_Icon: {fileID: 0} m_ResourceFile: m_NewAssetIndexInList: -1 - m_ScrollPosition: {x: 0, y: 84} + m_ScrollPosition: {x: 0, y: 78} m_GridSize: 66 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 193 @@ -945,9 +945,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 928 + x: 1015 y: 86 - width: 437 + width: 350 height: 602 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -973,9 +973,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1001 + x: 1015 y: 86 - width: 364 + width: 350 height: 602 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -987,7 +987,7 @@ MonoBehaviour: m_CachedPref: -160 m_ControlHash: -371814159 m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: -1 + m_LastInspectedObjectInstanceID: 27702 m_LastVerticalScrollValue: 0 m_GlobalObjectId: m_InspectorMode: 0