From 5c0c6b4a77e95b9939c911e0dfc4dc39c624d6b3 Mon Sep 17 00:00:00 2001 From: Saibotk Date: Tue, 24 Apr 2018 02:43:14 +0200 Subject: [PATCH 1/2] Small change to State change --- Assets/Scripts/GameController.cs | 6 +++--- Assets/Scripts/Generation/DungeonGenerator.cs | 2 +- Assets/Scripts/NotificationManager.cs | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/GameController.cs b/Assets/Scripts/GameController.cs index 41f56c7..753b3fa 100644 --- a/Assets/Scripts/GameController.cs +++ b/Assets/Scripts/GameController.cs @@ -144,7 +144,7 @@ public class GameController : MonoBehaviour { { Entity.Entities.BUG, bug }, { Entity.Entities.COIN, coin } }; - + ChangeState(GameState.INIT); } // Update is called once per frame @@ -152,7 +152,7 @@ public class GameController : MonoBehaviour { if ( !engineInitDone ) { engineInitDone = true; Debug.Log("First Frame"); - ChangeState(GameState.INIT); + ChangeState(GameState.STARTING); } if (Input.GetAxis("Pause") > 0) { if (state == GameState.RUNNING && !pausedPressed) { @@ -177,7 +177,7 @@ public class GameController : MonoBehaviour { switch ( nstate ) { case GameState.INIT: Init(); - ChangeState(GameState.STARTING); + //ChangeState(GameState.STARTING); break; case GameState.STARTING: Starting(); diff --git a/Assets/Scripts/Generation/DungeonGenerator.cs b/Assets/Scripts/Generation/DungeonGenerator.cs index 80dc53e..c5fe8ce 100644 --- a/Assets/Scripts/Generation/DungeonGenerator.cs +++ b/Assets/Scripts/Generation/DungeonGenerator.cs @@ -444,7 +444,7 @@ public class DungeonGenerator { } } } - Debug.Log(r.GetCenter() + " " + r.spawnpoints.Count + " spawn points."); + //Debug.Log(r.GetCenter() + " " + r.spawnpoints.Count + " spawn points."); } public static void GenerateObjective(Room r) { diff --git a/Assets/Scripts/NotificationManager.cs b/Assets/Scripts/NotificationManager.cs index 75ca3bf..151ccae 100644 --- a/Assets/Scripts/NotificationManager.cs +++ b/Assets/Scripts/NotificationManager.cs @@ -29,10 +29,13 @@ public class NotificationManager : MonoBehaviour { } } + public NotificationManager() { + messages = new List(); + delay = 0; + } + // Use this for initialization void Start() { - delay = 0; - messages = new List(); text = GetComponent(); Hide(); } From 65b0d1fab4a00085c69533b42c3c9fc41f00f95d Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 24 Apr 2018 02:46:49 +0200 Subject: [PATCH 2/2] made slider fancier --- Assets/Prefabs/UI.prefab | 20 +++++----- Assets/Scenes/CodeDEV.unity | 75 +++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 10 deletions(-) diff --git a/Assets/Prefabs/UI.prefab b/Assets/Prefabs/UI.prefab index fc670a4..68a5000 100644 --- a/Assets/Prefabs/UI.prefab +++ b/Assets/Prefabs/UI.prefab @@ -62,7 +62,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!1 &1160732466323946 GameObject: m_ObjectHideFlags: 1 @@ -265,7 +265,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!1 &1752959503665396 GameObject: m_ObjectHideFlags: 0 @@ -680,7 +680,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Sprite: {fileID: 21300000, guid: 271a63eb548b41e489d3338148bb0cb5, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1200,7 +1200,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 0.8301887, g: 0.8301887, b: 0.8301887, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1210,7 +1210,7 @@ MonoBehaviour: m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 - m_FontStyle: 0 + m_FontStyle: 1 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 @@ -1233,7 +1233,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.16037738, g: 0.16037738, b: 0.16037738, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1381,7 +1381,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.3207547, g: 0.3207547, b: 0.3207547, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1690,7 +1690,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0.7, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 10, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -2122,8 +2122,8 @@ RectTransform: m_Father: {fileID: 224927698272889066} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.7, y: 0} - m_AnchorMax: {x: 0.7, y: 1} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Scenes/CodeDEV.unity b/Assets/Scenes/CodeDEV.unity index 6d5b76f..c9edd5c 100644 --- a/Assets/Scenes/CodeDEV.unity +++ b/Assets/Scenes/CodeDEV.unity @@ -1427,6 +1427,81 @@ Prefab: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target value: objectReference: {fileID: 2063368133} + - target: {fileID: 224030602021903918, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224030602021903918, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224899125652206328, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224899125652206328, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 224899125652206328, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1139220909146914, guid: 460d856ea4eb14cedb5fecde1fe6d743, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224899125652206328, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 224899125652206328, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114077156432934238, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 271a63eb548b41e489d3338148bb0cb5, + type: 3} + - target: {fileID: 114829834214915798, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.r + value: 0.32156864 + objectReference: {fileID: 0} + - target: {fileID: 114829834214915798, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.g + value: 0.2901961 + objectReference: {fileID: 0} + - target: {fileID: 114829834214915798, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.b + value: 0.2901961 + objectReference: {fileID: 0} + - target: {fileID: 114660984839350690, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.r + value: 0.24528301 + objectReference: {fileID: 0} + - target: {fileID: 114660984839350690, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.g + value: 0.2233001 + objectReference: {fileID: 0} + - target: {fileID: 114660984839350690, guid: 460d856ea4eb14cedb5fecde1fe6d743, + type: 2} + propertyPath: m_Color.b + value: 0.2233001 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 460d856ea4eb14cedb5fecde1fe6d743, type: 2} m_IsPrefabParent: 0