From 6171f3e1f4c5a5c5053f7898d0e959676bf4a1d5 Mon Sep 17 00:00:00 2001 From: Minz Date: Sun, 18 Aug 2024 22:36:00 +0200 Subject: [PATCH] Minor UI polish --- Assets/Materials/ArrowQuad.mat | 13 +++- Assets/Prefabs/Facility.prefab | 6 +- Assets/Prefabs/Mine.prefab | 5 +- Assets/Scenes/Main.unity | 83 ++++++++++++----------- Assets/Scripts/Facility.cs | 3 +- Assets/Scripts/GameManager.cs | 4 +- Assets/Scripts/MonumentManager.cs | 2 +- ProjectSettings/EditorBuildSettings.asset | 3 - 8 files changed, 65 insertions(+), 54 deletions(-) diff --git a/Assets/Materials/ArrowQuad.mat b/Assets/Materials/ArrowQuad.mat index ec29e19..ddb3c16 100644 --- a/Assets/Materials/ArrowQuad.mat +++ b/Assets/Materials/ArrowQuad.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: ArrowQuad - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 10760, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] @@ -44,7 +44,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 0} + m_Texture: {fileID: 10914, guid: 0000000000000000f000000000000000, type: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -62,6 +62,7 @@ Material: m_Ints: [] m_Floats: - _BumpScale: 1 + - _ColorMask: 15 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 @@ -75,10 +76,16 @@ Material: - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 + - _Stencil: 0 + - _StencilComp: 8 + - _StencilOp: 0 + - _StencilReadMask: 255 + - _StencilWriteMask: 255 - _UVSec: 0 + - _UseUIAlphaClip: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 0.6957838, g: 0.9811321, b: 0.27305093, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/Prefabs/Facility.prefab b/Assets/Prefabs/Facility.prefab index 61e47f5..42c7064 100644 --- a/Assets/Prefabs/Facility.prefab +++ b/Assets/Prefabs/Facility.prefab @@ -588,7 +588,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 15% + m_text: Idle m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -690,13 +690,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8500338096386339248} serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.38268343, z: -0, w: 0.92387956} + m_LocalRotation: {x: 0.38268343, y: 0, z: 0.92387956, w: 0} m_LocalPosition: {x: 0.8510001, y: 1.1950002, z: -0.888} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 9042605437287805907} - m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 45, z: 180} --- !u!33 &542520272956642401 MeshFilter: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Mine.prefab b/Assets/Prefabs/Mine.prefab index ebef617..5719de2 100644 --- a/Assets/Prefabs/Mine.prefab +++ b/Assets/Prefabs/Mine.prefab @@ -299,6 +299,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: resource: 0 + storedLabel: {fileID: 0} --- !u!114 &6794374040926676938 MonoBehaviour: m_ObjectHideFlags: 0 @@ -636,13 +637,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5336556481064734049} serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.38268343, z: -0, w: 0.92387956} + m_LocalRotation: {x: 0.38268343, y: 0, z: 0.92387956, w: 0} m_LocalPosition: {x: 0.8510001, y: 1.1950002, z: -0.888} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 264988062392608053} - m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 45, z: 180} --- !u!33 &8905765132275121957 MeshFilter: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index b0e28e6..6061f53 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -588,15 +588,15 @@ RectTransform: m_GameObject: {fileID: 406856355} 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_LocalScale: {x: 1.3889, y: 1.3889, z: 1.3889} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1808788429} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 0, y: 9} - m_SizeDelta: {x: 758.6501, y: 56} + m_AnchoredPosition: {x: 0, y: -24.249023} + m_SizeDelta: {x: 1320, y: 88.195} m_Pivot: {x: 0.5, y: 0} --- !u!114 &406856357 MonoBehaviour: @@ -645,8 +645,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 18 - m_fontSizeBase: 18 + m_fontSize: 35 + m_fontSizeBase: 35 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -683,7 +683,7 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} + m_margin: {x: 0, y: 0, z: 0, w: 26.85049} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 @@ -1295,6 +1295,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 983927249} - {fileID: 1590768017} - {fileID: 720594413} - {fileID: 1222907689} @@ -1302,6 +1303,11 @@ Transform: - {fileID: 73524595} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &983927249 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} + m_PrefabInstance: {fileID: 2957543503499815533} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1010175415 PrefabInstance: m_ObjectHideFlags: 0 @@ -1398,7 +1404,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1035496433 RectTransform: m_ObjectHideFlags: 0 @@ -1628,11 +1634,11 @@ RectTransform: m_Children: [] m_Father: {fileID: 1808788429} 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: -159, y: 234} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 46.07666, y: -37.462555} + m_SizeDelta: {x: 741.8467, y: 269.0749} + m_Pivot: {x: 0, y: 1} --- !u!114 &1175890341 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1685,8 +1691,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 20 - m_fontSizeBase: 20 + m_fontSize: 35 + m_fontSizeBase: 35 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -1723,7 +1729,7 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: -220.7077, y: 0, z: -82.5791, w: -44.520477} + m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 @@ -2601,8 +2607,8 @@ Camera: m_GameObject: {fileID: 1842039541} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.172549, g: 0.5019608, b: 0.4990893, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -2627,7 +2633,7 @@ Camera: far clip plane: 1000 field of view: 48.6 orthographic: 1 - orthographic size: 5 + orthographic size: 5.74 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -2652,11 +2658,11 @@ Transform: m_GameObject: {fileID: 1842039541} serializedVersion: 2 m_LocalRotation: {x: 0.23911765, y: 0.3696438, z: -0.09904577, w: 0.89239913} - m_LocalPosition: {x: 0, y: 1.14, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 1938902097} m_LocalEulerAnglesHint: {x: 30, y: 45, z: 0} --- !u!1 &1851113608 GameObject: @@ -2929,7 +2935,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 1842039544} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1972862055 @@ -2968,7 +2975,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 13.477997, y: 10.902252} + m_AnchoredPosition: {x: 13.478027, y: 10.902222} m_SizeDelta: {x: 169.044, y: 70.195496} m_Pivot: {x: 0, y: 0} --- !u!114 &1972862057 @@ -3097,11 +3104,11 @@ RectTransform: m_Children: [] m_Father: {fileID: 1808788429} 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: 295, y: 236} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -36.0708, y: -25.592651} + m_SizeDelta: {x: 485.8584, y: 154.8147} + m_Pivot: {x: 1, y: 1} --- !u!114 &2091956031 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3151,8 +3158,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 20 - m_fontSizeBase: 20 + m_fontSize: 35 + m_fontSizeBase: 35 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -3189,7 +3196,7 @@ MonoBehaviour: m_VertexBufferAutoSizeReduction: 0 m_useMaxVisibleDescender: 1 m_pageToDisplay: 1 - m_margin: {x: -220.7077, y: 0, z: -82.5791, w: -44.520477} + m_margin: {x: 0, y: 0, z: 0, w: 0} m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_hasFontAssetChanged: 0 @@ -3209,19 +3216,19 @@ PrefabInstance: serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 0} + m_TransformParent: {fileID: 943997386} m_Modifications: - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalPosition.x - value: 7.82 + value: -0.44000006 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalPosition.y - value: -7.28 + value: 0.49999952 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalPosition.z - value: 5.71 + value: -3.4399996 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalRotation.w @@ -3229,15 +3236,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -3271,13 +3278,11 @@ SceneRoots: m_ObjectHideFlags: 0 m_Roots: - {fileID: 330132519} - - {fileID: 1842039544} - {fileID: 1938902097} - {fileID: 1375325165} - {fileID: 1470614616} - {fileID: 388824814} - {fileID: 360352143} - - {fileID: 2957543503499815533} - {fileID: 943997386} - {fileID: 1629534301} - {fileID: 1808788429} diff --git a/Assets/Scripts/Facility.cs b/Assets/Scripts/Facility.cs index a9c32e7..845f0d5 100644 --- a/Assets/Scripts/Facility.cs +++ b/Assets/Scripts/Facility.cs @@ -53,13 +53,14 @@ public class Facility : MonoBehaviour if(currentProcess > 0) { currentProcess -= Time.deltaTime; - currentProgressLabel.text = currentProcess.ToString(); + currentProgressLabel.text = currentProcess.ToString("N1"); } if (currentProcess <= 0){ currentProcess = processingTime; processing = false; gameManager.AddResource(outputResource, currentProductionBatch * baseOutput); + currentProgressLabel.text = "Idle"; } } diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index f2255e4..d2779c2 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -34,7 +34,7 @@ public class GameManager : MonoBehaviour { Resource.BRICK, 0 }, { Resource.TILE, 0 }, { Resource.GLASS, 0 }, - { Resource.HOUSE, 1 }, + { Resource.HOUSE, 0 }, { Resource.WORKER, 0 }, { Resource.TOTAL_WORKER, 0 } }; @@ -76,7 +76,7 @@ public class GameManager : MonoBehaviour } housingLabel.text = $"{resources[Resource.HOUSE]} Houses\n" + - $"{resources[Resource.WORKER]} Workers"; + $"{resources[Resource.WORKER]}/{resources[Resource.TOTAL_WORKER]} Workers"; resourceLabel.text = $"Resources:\n" + $"Storage: Bricks {resources[Resource.BRICK]} | Tiles {resources[Resource.TILE]} | Glass {resources[Resource.GLASS]}\n" + $"Comitted: Bricks {committedResources[Resource.BRICK]} | Tiles {committedResources[Resource.TILE]} | Glass {committedResources[Resource.GLASS]}"; diff --git a/Assets/Scripts/MonumentManager.cs b/Assets/Scripts/MonumentManager.cs index abaec2a..f7559a1 100644 --- a/Assets/Scripts/MonumentManager.cs +++ b/Assets/Scripts/MonumentManager.cs @@ -61,7 +61,7 @@ public class MonumentManager : MonoBehaviour if (lastMonumentIndex == monuments.Count-1) { - Debug.Log("All unlocked"); + nextUnlockLabel.text = "Everything has been unlocked!"; return; } diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 004846c..8d932a0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,8 +8,5 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/Main.unity guid: 08f986a56e32d3a42bfba00595e560dd - - enabled: 1 - path: Assets/Scenes/WorldMap.unity - guid: 4eebe4d020578664287352b495c15e8c m_configObjects: {} m_UseUCBPForAssetBundles: 0