From 36573e23520ac524894dece1ac29849fbe471406 Mon Sep 17 00:00:00 2001 From: AnimaRain Date: Thu, 19 Nov 2020 01:08:10 +0200 Subject: [PATCH 1/3] Bump up Unity version Signed-off-by: AnimaRain --- ProjectSettings/ProjectVersion.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index fe698d0..a12731e 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.2.14f1 -m_EditorVersionWithRevision: 2019.2.14f1 (49dd4e9fa428) +m_EditorVersion: 2019.4.10f1 +m_EditorVersionWithRevision: 2019.4.10f1 (5311b3af6f69) From 88e6eac23a491433b3d76ce1793e59290bc22619 Mon Sep 17 00:00:00 2001 From: AnimaRain Date: Thu, 19 Nov 2020 03:05:08 +0200 Subject: [PATCH 2/3] Remove pausing Signed-off-by: AnimaRain --- Assets/Scripts/Game/GameState.cs | 13 ------------- Assets/Scripts/Game/UIManager.cs | 8 ++------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Assets/Scripts/Game/GameState.cs b/Assets/Scripts/Game/GameState.cs index d6f8a34..415eb52 100644 --- a/Assets/Scripts/Game/GameState.cs +++ b/Assets/Scripts/Game/GameState.cs @@ -14,8 +14,6 @@ public class GameState : MonoBehaviour public event GameOverHandler OnGameOver; public delegate void RoundWonHandler(); public event RoundWonHandler OnRoundWon; - public delegate void PauseHandler(); - public event PauseHandler OnPause; public delegate void RoundStartHandler(); public event RoundStartHandler OnRoundStart; @@ -60,17 +58,6 @@ public bool RoundWon { } } - private bool paused; - public bool Paused { - get { return paused; } - set { - paused = value; - Time.timeScale = value ? 0f : 1f; - Time.fixedDeltaTime = value ? 0f : 0.02f; //0.02 is Unity's default - if (value && OnPause != null) OnPause(); - } - } - private bool roundStarted; /// /// True when the game is in "playable" state after everything diff --git a/Assets/Scripts/Game/UIManager.cs b/Assets/Scripts/Game/UIManager.cs index 9ae9469..35d0020 100644 --- a/Assets/Scripts/Game/UIManager.cs +++ b/Assets/Scripts/Game/UIManager.cs @@ -78,10 +78,11 @@ public void Start() { sfx.clip = pauseSfx; sfx.volume = 1f; } +#if DEBUG else Debug.LogWarning("Pause audio-clip has not been assigned."); +#endif pauseToMenuButton?.onClick.AddListener(() => { - gameState.Paused = false; UnityEngine.SceneManagement.SceneManager .LoadScene(0); }); @@ -94,16 +95,11 @@ public void TogglePauseMenu() { RoundIndex.text = "Round: " + gameState.Level; uiCanvas.SetActive(false); pauseCanvas.SetActive(true); - gameState.Paused = true; } else { uiCanvas.SetActive(true); pauseCanvas.SetActive(false); - gameState.Paused = false; } -#if DEBUG - Debug.Log("UIMANAGER:: TimeScale: " + Time.timeScale); -#endif } /// From eaaa86f57600c856f77252380f63ac2becc6e65b Mon Sep 17 00:00:00 2001 From: AnimaRain Date: Thu, 19 Nov 2020 03:11:39 +0200 Subject: [PATCH 3/3] Fix background in pause menu not stretching all the way to the edge Signed-off-by: AnimaRain --- Assets/Scenes/Game.unity | 49 +++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index 44f5da1..3a920b8 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -96,6 +96,7 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaAO: 1 m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -202,6 +203,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -271,6 +273,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -348,6 +351,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.20131718, g: 0.41924864, b: 0.735849, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -385,7 +389,6 @@ GameObject: - component: {fileID: 183891070} - component: {fileID: 183891069} - component: {fileID: 183891068} - - component: {fileID: 183891071} m_Layer: 5 m_Name: Background m_TagString: Untagged @@ -441,6 +444,7 @@ MonoBehaviour: 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: [] @@ -459,20 +463,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 183891066} m_CullTransparentMesh: 0 ---- !u!114 &183891071 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 183891066} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f63c74d23a090e342ba6ca02ff703af1, type: 3} - m_Name: - m_EditorClassIdentifier: - cam: {fileID: 563382494} - planeObject: {fileID: 183891067} --- !u!1 &203830544 GameObject: m_ObjectHideFlags: 0 @@ -525,6 +515,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -752,6 +743,7 @@ MonoBehaviour: 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: [] @@ -925,6 +917,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -1081,6 +1074,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -1214,6 +1208,7 @@ MonoBehaviour: 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: [] @@ -1515,6 +1510,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.3191527, g: 0.3539574, b: 0.41509432, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -1652,6 +1648,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -1747,6 +1744,7 @@ MonoBehaviour: 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: [] @@ -1901,6 +1899,7 @@ MonoBehaviour: m_Material: {fileID: 2100000, guid: 28e994b1d19a6c140a6cdb4d8471cf48, type: 2} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2019,6 +2018,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 0} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2236,6 +2236,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2314,6 +2315,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2387,6 +2389,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19625865, g: 0.6202379, b: 0.8088235, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2523,6 +2526,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2739,6 +2743,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2817,6 +2822,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -2863,8 +2869,9 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1464097466} m_Enabled: 1 - serializedVersion: 9 + serializedVersion: 10 m_Type: 1 + m_Shape: 0 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 2 m_Range: 10 @@ -3091,6 +3098,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3311,6 +3319,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.9245283, g: 0.9245283, b: 0.9245283, a: 0.26666668} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3396,6 +3405,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 0, b: 0, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3473,6 +3483,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 0, b: 0, a: 1} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3539,7 +3550,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_SizeDelta: {x: 10, y: 10} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2079953647 MonoBehaviour: @@ -3555,8 +3566,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.15862082, g: 0, b: 1, a: 0.392} + m_Color: {r: 0.15686275, g: 0, b: 1, a: 0.392} m_RaycastTarget: 1 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -3631,6 +3643,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 0 + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: []