From ec3ca2dd9dcdb502b8720f3ad1399506dca15825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Wed, 12 Jun 2019 23:27:19 +0300 Subject: [PATCH 1/3] Change player colider size --- Assets/Scenes/SampleScene.unity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 3f7bebc..738ec27 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -8519,7 +8519,7 @@ PrefabInstance: - target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} propertyPath: m_Size.x - value: 1 + value: 0.8 objectReference: {fileID: 0} - target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} @@ -8529,7 +8529,7 @@ PrefabInstance: - target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} propertyPath: m_Size.y - value: 1 + value: 0.8 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3} From 0da71552798abb37d2a17a43b434aeb543786777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Wed, 12 Jun 2019 23:27:32 +0300 Subject: [PATCH 2/3] Move all calls from Debug to DebugHelper --- Assets/Scripts/src/Base/PlayerBase.cs | 3 ++- Assets/Scripts/src/Managers/LevelManager.cs | 13 ++++++------- Assets/Scripts/src/Wall/DestructibleWall.cs | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/src/Base/PlayerBase.cs b/Assets/Scripts/src/Base/PlayerBase.cs index fb97ef8..ca4007c 100644 --- a/Assets/Scripts/src/Base/PlayerBase.cs +++ b/Assets/Scripts/src/Base/PlayerBase.cs @@ -1,4 +1,5 @@ using System; +using src.Helpers; using UnityEngine; namespace src.Base @@ -25,7 +26,7 @@ namespace src.Base public void onExplosion() { - Debug.Log("Player hit by explosion"); + DebugHelper.LogInfo("Player hit by explosion"); } } } \ No newline at end of file diff --git a/Assets/Scripts/src/Managers/LevelManager.cs b/Assets/Scripts/src/Managers/LevelManager.cs index 4889f54..fefab6d 100644 --- a/Assets/Scripts/src/Managers/LevelManager.cs +++ b/Assets/Scripts/src/Managers/LevelManager.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using src.Base; using src.Helpers; using src.Wall; @@ -73,13 +72,13 @@ namespace src.Managers { if (_destructibleWalls.Count == 0) { - Debug.LogWarning("No destructible walls left, cannot spawn upgrade."); + DebugHelper.LogWarning("No destructible walls left, cannot spawn upgrade."); continue; } /* Get the destructible wall script and make it to spawn the upgrade */ var wall = _destructibleWalls.PopRandom().GetComponent(); - Debug.Log($"Spawned upgrade at: x:{wall.XCoordinate} y:{wall.YCoordinate}"); + DebugHelper.LogInfo($"Spawned upgrade at: x:{wall.XCoordinate} y:{wall.YCoordinate}"); wall.SpawnsUpgrade(); } } @@ -94,7 +93,7 @@ namespace src.Managers /* Get the destructible wall script and make it to spawn the exit */ var wall = _destructibleWalls.PopRandom().GetComponent(); - Debug.Log($"Spawned exit at: x:{wall.XCoordinate} y:{wall.YCoordinate}"); + DebugHelper.LogInfo($"Spawned exit at: x:{wall.XCoordinate} y:{wall.YCoordinate}"); wall.SpawnsExit(); } @@ -159,7 +158,7 @@ namespace src.Managers private void PlaceDestructibleTile(Vector3 position) { - Debug.Log($"PlaceDestructibleTile: x:{position.x} y:{position.y}"); + DebugHelper.LogInfo($"PlaceDestructibleTile: x:{position.x} y:{position.y}"); var randomWall = destructibleWallPrefabs.ChoseRandom(); var instance = Instantiate(randomWall, position, Quaternion.identity); _destructibleWalls.Add(instance); @@ -168,7 +167,7 @@ namespace src.Managers private bool PlaceIndestructibleTile(float x, float y) { - Debug.Log($"PlaceIndestructibleTile: x:{x} y:{y}"); + DebugHelper.LogInfo($"PlaceIndestructibleTile: x:{x} y:{y}"); var absX = Mathf.RoundToInt(x); var absY = Mathf.RoundToInt(y); diff --git a/Assets/Scripts/src/Wall/DestructibleWall.cs b/Assets/Scripts/src/Wall/DestructibleWall.cs index fc3dfe0..cbfd909 100644 --- a/Assets/Scripts/src/Wall/DestructibleWall.cs +++ b/Assets/Scripts/src/Wall/DestructibleWall.cs @@ -1,6 +1,7 @@ using UnityEngine; using src.Base; +using src.Helpers; namespace src.Wall { @@ -31,19 +32,19 @@ namespace src.Wall Instantiate(explosionPrefab, currentPosition, Quaternion.identity); if (_spawnExit) { - Debug.Log($"Destructible spawned exit {transform.position}"); + DebugHelper.LogInfo($"Destructible spawned exit {transform.position}"); Instantiate(exitDoorPrefab, currentPosition, Quaternion.identity); } else if (_spawnUpgrade) { - Debug.Log($"Destructible spawned upgrade {transform.position}"); + DebugHelper.LogInfo($"Destructible spawned upgrade {transform.position}"); // TODO: Get and instantiate upgrade from manager } } public void onExplosion() { - Debug.Log($"Destructible wall hit by explosion {transform.position}"); + DebugHelper.LogInfo($"Destructible wall hit by explosion {transform.position}"); BeforeDestroy(); Destroy(gameObject); } From cc4d38dd359c94a4d0ecd751ba7b813150ab76b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Wed, 12 Jun 2019 23:30:21 +0300 Subject: [PATCH 3/3] Fix bomb scale --- Assets/Prefabs/Ammo/Bomb.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Prefabs/Ammo/Bomb.prefab b/Assets/Prefabs/Ammo/Bomb.prefab index 816c6e7..ca849ce 100644 --- a/Assets/Prefabs/Ammo/Bomb.prefab +++ b/Assets/Prefabs/Ammo/Bomb.prefab @@ -29,7 +29,7 @@ Transform: m_GameObject: {fileID: 5909392949477884267} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.0552, y: 0.0418, z: 0} - m_LocalScale: {x: 1.0162, y: 0.7533, z: 0} + m_LocalScale: {x: 1, y: 1, z: 0} m_Children: - {fileID: 6508079771898401246} m_Father: {fileID: 0}