From abc3dee946f0d962e34c60da5601fcfbdee74b28 Mon Sep 17 00:00:00 2001 From: playmaker1210 Date: Fri, 24 Mar 2023 10:03:41 +0100 Subject: [PATCH] ujradobas mukodik --- Assets/Scripts/Dice.cs | 7 +- Assets/Scripts/TurnManager.cs | 5 + Assets/Scripts/Upgrade.cs | 18 +-- Assets/Scripts/jatekmanager.cs | 4 +- ProjectSettings/ProjectSettings.asset | 10 +- UserSettings/Layouts/default-2021.dwlt | 170 ++++++++++++------------- 6 files changed, 112 insertions(+), 102 deletions(-) diff --git a/Assets/Scripts/Dice.cs b/Assets/Scripts/Dice.cs index e79d7d4..9abaf99 100644 --- a/Assets/Scripts/Dice.cs +++ b/Assets/Scripts/Dice.cs @@ -32,6 +32,7 @@ public class Dice : MonoBehaviour { public void setLocked(bool locked) { this.locked = locked; } public int dobott = 0; public bool dobottEgyszer = false; //tudjon ujra dobni vagy nem + public int ujradobasszamlalo; private void Awake() { upgrade = FindObjectOfType(); @@ -104,7 +105,11 @@ public class Dice : MonoBehaviour { hely2.sprite = diceSides[diceResult[1]-1]; hely2.size = new Vector2(38, 38); - dobottEgyszer = true; + ujradobasszamlalo--; + Debug.Log("ujradobasszamlalo: " + ujradobasszamlalo); + if(ujradobasszamlalo == 0){ + dobottEgyszer = true; + } //ha megvan a targy if(targyak.adrenalinloket > 0) { diff --git a/Assets/Scripts/TurnManager.cs b/Assets/Scripts/TurnManager.cs index 6797099..72a1cea 100644 --- a/Assets/Scripts/TurnManager.cs +++ b/Assets/Scripts/TurnManager.cs @@ -19,6 +19,9 @@ public class TurnManager : MonoBehaviour energia = FindObjectOfType(); upgrade = FindObjectOfType(); jatekmanager = FindObjectOfType(); + + dice.ujradobasszamlalo = upgrade.ujradobas[upgrade.getUjradobasIndex()] + 1; + Debug.Log("ujradobasszamlalo: " + dice.ujradobasszamlalo); } public void nextTurn() { @@ -30,6 +33,8 @@ public class TurnManager : MonoBehaviour turnCounter++; dice.hely1.sprite = null; dice.hely2.sprite = null; + dice.ujradobasszamlalo = upgrade.ujradobas[upgrade.getUjradobasIndex()] + 1; + Debug.Log("ujradobasszamlalo: " + dice.ujradobasszamlalo); jatekmanager.vanertelme = true; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.KorKezdet); //a jatekmanager atvalt a korkezdet eventre diff --git a/Assets/Scripts/Upgrade.cs b/Assets/Scripts/Upgrade.cs index cc57721..4c3426b 100644 --- a/Assets/Scripts/Upgrade.cs +++ b/Assets/Scripts/Upgrade.cs @@ -31,10 +31,10 @@ public class Upgrade : MonoBehaviour if (energia_index < 4) { energiatext[energia_index].text = "X"; energia_index++; + canUpgrade = false; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio); //a jatekmanager atvalt a korkezdet eventre } Debug.Log("energia_i: " + energia_index); - canUpgrade = false; fejlesztes_szamlalo++; } } @@ -44,10 +44,10 @@ public class Upgrade : MonoBehaviour if (akcio_index < 4) { akciotext[akcio_index].text = "X"; akcio_index++; + canUpgrade = false; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio); //a jatekmanager atvalt a korkezdet eventre } - Debug.Log("akcio_i: " + akcio_index); - canUpgrade = false; + Debug.Log("akcio_i: " + akcio_index); fejlesztes_szamlalo++; } } @@ -57,10 +57,10 @@ public class Upgrade : MonoBehaviour if (harc_index < 4) { harctext[harc_index].text = "X"; harc_index++; + canUpgrade = false; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio); //a jatekmanager atvalt a korkezdet eventre } - Debug.Log("harc_i: " + harc_index); - canUpgrade = false; + Debug.Log("harc_i: " + harc_index); fejlesztes_szamlalo++; } } @@ -70,10 +70,10 @@ public class Upgrade : MonoBehaviour if (ujradobas_index < 4) { ujradobastext[ujradobas_index].text = "X"; ujradobas_index++; + canUpgrade = false; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio); //a jatekmanager atvalt a korkezdet eventre } - Debug.Log("ujradobas_i: " + ujradobas_index); - canUpgrade = false; + Debug.Log("ujradobas_i: " + ujradobas_index); fejlesztes_szamlalo++; } } @@ -83,10 +83,10 @@ public class Upgrade : MonoBehaviour if (hack_index < 3) { hacktext[hack_index].text = "X"; hack_index++; + canUpgrade = false; jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio); //a jatekmanager atvalt a korkezdet eventre } - Debug.Log("hack_i: " + hack_index); - canUpgrade = false; + Debug.Log("hack_i: " + hack_index); fejlesztes_szamlalo++; } } diff --git a/Assets/Scripts/jatekmanager.cs b/Assets/Scripts/jatekmanager.cs index 30d469e..5f674e7 100644 --- a/Assets/Scripts/jatekmanager.cs +++ b/Assets/Scripts/jatekmanager.cs @@ -166,7 +166,7 @@ public class jatekmanager : MonoBehaviour ujradobasfejlesztés.SetActive(true); hackfejlesztés.SetActive(true); kovetkezokor.SetActive(false); - rolldice.SetActive(false); + //rolldice.SetActive(false); helyszinaktivalasBtn.gameObject.SetActive(false); betarazas.SetActive(false); @@ -190,7 +190,7 @@ public class jatekmanager : MonoBehaviour kovetkezokor.SetActive(true); - rolldice.SetActive(false); + //rolldice.SetActive(false); } private async void ugynokDeaktivalas(bool bekapcsolas) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c92ef5e..8e8cdf6 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -21,7 +21,7 @@ PlayerSettings: m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 - m_SplashScreenLogoStyle: 1 + m_SplashScreenLogoStyle: 0 m_SplashScreenDrawMode: 0 m_SplashScreenBackgroundAnimationZoom: 1 m_SplashScreenLogoAnimationZoom: 1 @@ -129,12 +129,12 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 + 4:3: 0 + 5:4: 0 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.6 + bundleVersion: 0.8 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -774,7 +774,7 @@ PlayerSettings: allowUnsafeCode: 0 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 2 + selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 1 diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index da4bf35..25fa3af 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -15,11 +15,11 @@ MonoBehaviour: m_PixelRect: serializedVersion: 2 x: 0 - y: 43 - width: 1920 - height: 997 + y: 28 + width: 1366 + height: 673 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Game m_RootView: {fileID: 2} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -44,8 +44,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1920 - height: 997 + width: 1366 + height: 673 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 @@ -69,7 +69,7 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1920 + width: 1366 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -90,8 +90,8 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 977 - width: 1920 + y: 653 + width: 1366 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} @@ -114,12 +114,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 30 - width: 1920 - height: 947 + width: 1366 + height: 623 m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 86 + controlID: 20 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -139,12 +139,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1427 - height: 947 + width: 1018 + height: 623 m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 87 + controlID: 21 --- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 @@ -164,12 +164,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1427 - height: 641 + width: 1018 + height: 474 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 88 + controlID: 22 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -187,8 +187,8 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 206 - height: 641 + width: 201 + height: 474 m_MinSize: {x: 201, y: 221} m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 13} @@ -211,12 +211,12 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 206 + x: 201 y: 0 - width: 1221 - height: 641 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} + width: 817 + height: 474 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} m_ActualView: {fileID: 14} m_Panes: - {fileID: 14} @@ -239,9 +239,9 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 641 - width: 1427 - height: 306 + y: 474 + width: 1018 + height: 149 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: 1427 + x: 1018 y: 0 - width: 493 - height: 947 - m_MinSize: {x: 276, y: 71} + width: 348 + height: 623 + 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: 153 + x: 201 y: 86 - width: 860 - height: 401 + width: 815 + height: 453 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: 676, y: 380} + m_TargetSize: {x: 768, y: 432} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -325,10 +325,10 @@ MonoBehaviour: m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -338 - m_HBaseRangeMax: 338 - m_VBaseRangeMin: -190 - m_VBaseRangeMax: 190 + m_HBaseRangeMin: -384 + m_HBaseRangeMax: 384 + m_VBaseRangeMin: -216 + m_VBaseRangeMax: 216 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -346,23 +346,23 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 860 - height: 380 + width: 815 + height: 432 m_Scale: {x: 1, y: 1} - m_Translation: {x: 430, y: 190} + m_Translation: {x: 407.5, y: 216} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -430 - y: -190 - width: 860 - height: 380 + x: -407.5 + y: -216 + width: 815 + height: 432 m_MinimalGUI: 1 m_defaultScale: 1 - m_LastWindowPixelSize: {x: 860, y: 401} + m_LastWindowPixelSize: {x: 815, y: 453} m_ClearInEditMode: 1 m_NoCameraWarning: 1 m_LowResolutionForAspectRatios: 01000000000000000000 @@ -389,9 +389,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 73 - width: 205 - height: 620 + y: 86 + width: 200 + height: 453 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_LastClickedID: 0 - m_ExpandedIDs: 8cdeffff2edfffff3cdfffff44dfffff0ce1ffff16e1ffffa2e2ffff44e3ffff52e3ffff5ae3ffff22e5ffff2ce5ffff68e7ffff0ae8ffffe8e9fffff4e9ffffe8ebfffff6ebffff4af1ffffecf1ffffc4f3ffffccf3ffffbcf5ffffc6f5ffff28fbffff + m_SelectedIDs: a6730000 + m_LastClickedID: 29606 + m_ExpandedIDs: 28fbffff7e7000000a740000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -445,10 +445,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 206 - y: 73 - width: 1219 - height: 620 + x: 201 + y: 86 + width: 815 + height: 453 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -698,16 +698,16 @@ MonoBehaviour: m_WindowGUID: cc27987af1a868c49b0894db9c0f5429 m_Gizmos: 1 m_OverrideSceneCullingMask: 6917529027641081856 - m_SceneIsLit: 1 + m_SceneIsLit: 0 m_SceneLighting: 1 m_2DMode: 1 m_isRotationLocked: 0 m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 343.27173, y: 345.1628, z: 1.9150982} + m_Target: {x: -3.55626, y: 0.6707144, z: -0.018837877} speed: 2 - m_Value: {x: 343.27173, y: 345.1628, z: 1.9150982} + m_Value: {x: -3.55626, y: 0.6707144, z: -0.018837877} 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: 344.6367 + m_Target: 12.090613 speed: 2 - m_Value: 344.6367 + m_Value: 12.090613 m_Ortho: m_Target: 1 speed: 2 @@ -806,9 +806,9 @@ MonoBehaviour: m_Pos: serializedVersion: 2 x: 0 - y: 714 - width: 1426 - height: 285 + y: 560 + width: 1017 + height: 128 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -826,22 +826,22 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Scripts/menu + - Assets/Scripts m_Globs: [] m_OriginalText: m_ViewMode: 1 m_StartGridSize: 66 m_LastFolders: - - Assets/Scripts/menu + - Assets/Scripts m_LastFoldersGridSize: 66 - m_LastProjectPath: E:\dev\find the source\projekt\FindTheSource + m_LastProjectPath: /home/tom/Documents/dev/find the source m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: 306f0000 - m_LastClickedID: 28464 - m_ExpandedIDs: 00000000206f00002a6f0000 + scrollPos: {x: 0, y: 36} + m_SelectedIDs: 107a0000 + m_LastClickedID: 31248 + m_ExpandedIDs: 00000000f079000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -869,7 +869,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000206f0000 + m_ExpandedIDs: 00000000f0790000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -945,9 +945,9 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1015 + x: 1018 y: 86 - width: 350 + width: 347 height: 602 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: @@ -973,10 +973,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 1427 - y: 73 - width: 492 - height: 926 + x: 1018 + y: 86 + width: 347 + height: 602 m_ViewDataDictionary: {fileID: 0} m_OverlayCanvas: m_LastAppliedPresetName: Default @@ -987,7 +987,7 @@ MonoBehaviour: m_CachedPref: -160 m_ControlHash: -371814159 m_PrefName: Preview_InspectorPreview - m_LastInspectedObjectInstanceID: -1 + m_LastInspectedObjectInstanceID: 29606 m_LastVerticalScrollValue: 0 m_GlobalObjectId: m_InspectorMode: 0 -- 2.49.1