From 7e61ebc17ca1ef6df09d0846cd2aaa202b719311 Mon Sep 17 00:00:00 2001 From: Nedzad Alibegovic Date: Thu, 21 May 2020 23:12:32 +0200 Subject: [PATCH 1/8] Fix cursor warning message --- Assets/UI/Icons/Cursor.png.meta | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/UI/Icons/Cursor.png.meta b/Assets/UI/Icons/Cursor.png.meta index d619ea1..c5b2b07 100644 --- a/Assets/UI/Icons/Cursor.png.meta +++ b/Assets/UI/Icons/Cursor.png.meta @@ -6,7 +6,7 @@ TextureImporter: serializedVersion: 11 mipmaps: mipMapMode: 0 - enableMipMap: 1 + enableMipMap: 0 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -34,8 +34,8 @@ TextureImporter: filterMode: -1 aniso: 1 mipBias: -100 - wrapU: -1 - wrapV: -1 + wrapU: 1 + wrapV: 1 wrapW: -1 nPOTScale: 0 lightmap: 0 @@ -49,9 +49,9 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 0 + alphaIsTransparency: 1 spriteTessellationDetail: -1 - textureType: 0 + textureType: 7 textureShape: 1 singleChannelComponent: 0 maxTextureSizeSet: 0 From 6f02f7b4888ba9b280cd19cee8678348410985da Mon Sep 17 00:00:00 2001 From: Harun Sabljakovic Date: Thu, 21 May 2020 23:24:42 +0200 Subject: [PATCH 2/8] Disable TurnMessageUI on game finished --- Assets/Scripts/Logic/WinConditions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/Logic/WinConditions.cs b/Assets/Scripts/Logic/WinConditions.cs index db21aa2..5a8c0af 100644 --- a/Assets/Scripts/Logic/WinConditions.cs +++ b/Assets/Scripts/Logic/WinConditions.cs @@ -28,6 +28,7 @@ private void toggleInputScript(bool val) { } public void DefendersWinMessage() { + GameObject.Find("TurnMessagesUI").SetActive(false); gameFinishedUI.transform.GetChild(0).gameObject.SetActive(true); //display defenders win text gameFinishedUI.SetActive(true); Time.timeScale = 0f; @@ -35,6 +36,7 @@ public void DefendersWinMessage() { } public void AttackersWinMessage() { + GameObject.Find("TurnMessagesUI").SetActive(false); gameFinishedUI.transform.GetChild(1).gameObject.SetActive(true); //display attackers win text gameFinishedUI.SetActive(true); Time.timeScale = 0f; From c3df6788a7d808a257c2c89c1ff859af902e8059 Mon Sep 17 00:00:00 2001 From: Harun Sabljakovic Date: Thu, 21 May 2020 23:28:38 +0200 Subject: [PATCH 3/8] Make button not interactable --- Assets/Scenes/SampleScene.unity | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index e4dd623..1d7f572 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -5612,6 +5612,11 @@ PrefabInstance: propertyPath: m_PreserveAspect value: 0 objectReference: {fileID: 0} + - target: {fileID: 8330926714641492191, guid: b71f02ac1f2e1924684da79211b8e23a, + type: 3} + propertyPath: m_Interactable + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8330926715585229136, guid: b71f02ac1f2e1924684da79211b8e23a, type: 3} propertyPath: m_StaticEditorFlags From 97b0d937c96e596b432740b0b4ce5ec223ccce09 Mon Sep 17 00:00:00 2001 From: Harun Sabljakovic Date: Thu, 21 May 2020 23:32:25 +0200 Subject: [PATCH 4/8] Enable main camera on host and join game --- Assets/Scripts/UI/Menus.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/UI/Menus.cs b/Assets/Scripts/UI/Menus.cs index cd802e3..3121005 100644 --- a/Assets/Scripts/UI/Menus.cs +++ b/Assets/Scripts/UI/Menus.cs @@ -110,6 +110,7 @@ private void startHosting() { UICamera.SetActive(false); RenderSettings.fog = false; turnMessagesUI.SetActive(true); + mainCamera.SetActive(true); } public void hostAsAttacker() { @@ -141,6 +142,7 @@ public void joinGame() { networkManager.StartClient(); UICamera.SetActive(false); turnMessagesUI.SetActive(true); + mainCamera.SetActive(true); } } From 3d4c64251b5d2561c0e8e082c2c810769c991956 Mon Sep 17 00:00:00 2001 From: Nedzad Alibegovic Date: Thu, 21 May 2020 23:39:52 +0200 Subject: [PATCH 5/8] Multiplayer: Allow defender to move king --- Assets/Scripts/Logic/InputManagement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Logic/InputManagement.cs b/Assets/Scripts/Logic/InputManagement.cs index 89deac6..a169f84 100644 --- a/Assets/Scripts/Logic/InputManagement.cs +++ b/Assets/Scripts/Logic/InputManagement.cs @@ -34,7 +34,7 @@ void Update() { if (GameMemory.Multiplayer) { if (GameMemory.teamTag == TeamTag.Attackers && !selection.CompareTag(FigureTags.TeamA)) return; - if (GameMemory.teamTag == TeamTag.Defenders && !selection.CompareTag(FigureTags.TeamB)) return; + if (GameMemory.teamTag == TeamTag.Defenders && selection.CompareTag(FigureTags.TeamA)) return; } selectedPiece = selection; From 80d80f515ab00554019740bd3658cf2b7ec5ba56 Mon Sep 17 00:00:00 2001 From: Harun Sabljakovic Date: Thu, 21 May 2020 23:53:13 +0200 Subject: [PATCH 6/8] Restrict pause on menus --- Assets/Scripts/UI/Menus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/UI/Menus.cs b/Assets/Scripts/UI/Menus.cs index 3121005..9809b1b 100644 --- a/Assets/Scripts/UI/Menus.cs +++ b/Assets/Scripts/UI/Menus.cs @@ -39,7 +39,7 @@ void Update() { if (isGamePaused) { Resume(); } else { - if (!gameFinishedUI.activeSelf) { + if (!gameFinishedUI.activeSelf && !mainMenuUI.activeSelf && !onlineMenuUI.activeSelf && !teamPickUI.activeSelf) { Pause(); } } From d927ce5583c19946be3cbebd866b6e6d86f4c322 Mon Sep 17 00:00:00 2001 From: Harun Sabljakovic Date: Thu, 21 May 2020 23:55:59 +0200 Subject: [PATCH 7/8] Remove unnecessary object --- Assets/Scenes/SampleScene.unity | 289 -------------------------------- 1 file changed, 289 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 1d7f572..6b0c4af 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -1115,164 +1115,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 630597722} m_PrefabAsset: {fileID: 0} ---- !u!1 &122143758 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 122143759} - - component: {fileID: 122143761} - - component: {fileID: 122143760} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!224 &122143759 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122143758} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1529952096} - m_RootOrder: 0 - 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: 0, y: 0} - m_SizeDelta: {x: 303.3, y: 35.1} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &122143760 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122143758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Exit to Menu - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 64b98622a58418244a35ecb8d5c1dbd2, type: 2} - m_sharedMaterial: {fileID: -6914558711328026478, guid: 64b98622a58418244a35ecb8d5c1dbd2, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 1 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 11400000, guid: 09bde04d298670d4989c36015b0f7adb, - type: 2} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 36 - m_fontSizeBase: 36 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 258 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: 0 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 122143760} - characterCount: 0 - spriteCount: 0 - spaceCount: 0 - wordCount: 0 - linkCount: 0 - lineCount: 0 - pageCount: 0 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &122143761 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122143758} - m_CullTransparentMesh: 0 --- !u!1001 &129527037 PrefabInstance: m_ObjectHideFlags: 0 @@ -3577,7 +3419,6 @@ Transform: - {fileID: 1849020369} - {fileID: 238721037} - {fileID: 1796213} - - {fileID: 1529952096} m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -14961,136 +14802,6 @@ Light: m_UseBoundingSphereOverride: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 ---- !u!1 &1529952095 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1529952096} - - component: {fileID: 1529952099} - - component: {fileID: 1529952098} - - component: {fileID: 1529952097} - m_Layer: 5 - m_Name: ExitToMenu - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!224 &1529952096 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1529952095} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 122143759} - m_Father: {fileID: 343756262} - m_RootOrder: 8 - 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: -543.3742, y: -367.61948} - m_SizeDelta: {x: 301.7, y: 46} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1529952097 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1529952095} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1529952098} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 0} - m_MethodName: Exit - 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 &1529952098 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1529952095} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1529952099 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1529952095} - m_CullTransparentMesh: 0 --- !u!1001 &1531502028 PrefabInstance: m_ObjectHideFlags: 0 From 5edb84c1fc5f733058e93e6b3c09e31a09d46467 Mon Sep 17 00:00:00 2001 From: Nedzad Alibegovic Date: Fri, 22 May 2020 00:05:36 +0200 Subject: [PATCH 8/8] Bump to version 0.9.6 --- Packages/manifest.json | 2 +- ProjectSettings/GraphicsSettings.asset | 1 - ProjectSettings/ProjectSettings.asset | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index 9e7c23a..68e5f57 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,7 +2,7 @@ "dependencies": { "com.unity.collab-proxy": "1.2.16", "com.unity.ide.rider": "1.1.4", - "com.unity.ide.vscode": "1.2.0", + "com.unity.ide.vscode": "1.2.1", "com.unity.test-framework": "1.1.14", "com.unity.textmeshpro": "2.0.1", "com.unity.timeline": "1.2.14", diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 9b996cb..4706883 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -38,7 +38,6 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} - - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 2d9378e..95657cb 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -119,7 +119,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.9.5 + bundleVersion: 0.9.6 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0