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); }