From 3d735011b8b912f31dae0ed50a3ca74409315044 Mon Sep 17 00:00:00 2001 From: melvinkj <melvinkentj@gmail.com> Date: Fri, 10 May 2024 20:51:15 +0700 Subject: [PATCH] chore: delete unnecessary debug code --- .../Scripts/Editor/CrossPlatformInputInitialize.cs | 1 - Assets/Scripts/Enemy/EnemyHealth.cs | 4 ---- Assets/Scripts/LoadSlotButton.cs | 2 -- Assets/Scripts/Managers/CheatManager.cs | 1 - Assets/Scripts/Managers/LevelManager.cs | 4 ---- Assets/Scripts/Managers/QuestManager.cs | 1 - Assets/Scripts/Pets/AllyPetHealth.cs | 1 - Assets/Scripts/Pets/AttackingPetAction.cs | 2 -- Assets/Scripts/Pets/EnemyPetAction.cs | 3 --- Assets/Scripts/Pets/EnemyPetHealth.cs | 1 - Assets/Scripts/Pets/EnemyPetMovement.cs | 2 -- Assets/Scripts/Pets/HealingPetAction.cs | 1 - Assets/Scripts/Player/PlayerCurrency.cs | 1 - Assets/Scripts/Weapons/Sword.cs | 1 - Assets/Shop.cs | 2 -- Assets/TriggerTest.cs | 12 ------------ 16 files changed, 39 deletions(-) diff --git a/Assets/MobileInput/Scripts/Editor/CrossPlatformInputInitialize.cs b/Assets/MobileInput/Scripts/Editor/CrossPlatformInputInitialize.cs index 175464f..cb35eeb 100644 --- a/Assets/MobileInput/Scripts/Editor/CrossPlatformInputInitialize.cs +++ b/Assets/MobileInput/Scripts/Editor/CrossPlatformInputInitialize.cs @@ -98,7 +98,6 @@ namespace UnitySampleAssets.CrossPlatformInput.Inspector private static void SetEnabled(string defineName, bool enable, bool mobile) { - //Debug.Log("setting "+defineName+" to "+enable); foreach (var group in mobile ? mobileBuildTargetGroups : buildTargetGroups) { var defines = GetDefinesList(group); diff --git a/Assets/Scripts/Enemy/EnemyHealth.cs b/Assets/Scripts/Enemy/EnemyHealth.cs index ab809be..6fcd3b8 100644 --- a/Assets/Scripts/Enemy/EnemyHealth.cs +++ b/Assets/Scripts/Enemy/EnemyHealth.cs @@ -126,10 +126,6 @@ namespace Nightmare { GameObject orbInstance = Instantiate(orbPrefab, this.transform.position, Quaternion.identity); } - else - { - Debug.Log("Orb prefab is null"); - } } diff --git a/Assets/Scripts/LoadSlotButton.cs b/Assets/Scripts/LoadSlotButton.cs index 4190b4c..542c688 100644 --- a/Assets/Scripts/LoadSlotButton.cs +++ b/Assets/Scripts/LoadSlotButton.cs @@ -56,8 +56,6 @@ public class LoadSlotButton : MonoBehaviour public void LoadGame() { DataPersistanceManager.loadedFileName = fileName; - Debug.Log(DataPersistanceManager.loadedFileName); - GameManager.startGame(); } } diff --git a/Assets/Scripts/Managers/CheatManager.cs b/Assets/Scripts/Managers/CheatManager.cs index d45815a..1b8130e 100644 --- a/Assets/Scripts/Managers/CheatManager.cs +++ b/Assets/Scripts/Managers/CheatManager.cs @@ -184,7 +184,6 @@ public class CheatManager : MonoBehaviour private void ActivateKillPet() { GameObject[] enemyPets = GameObject.FindGameObjectsWithTag("EnemyPet"); - Debug.Log(enemyPets.Length); foreach (GameObject enemyPet in enemyPets) { EnemyPetHealth enemyPetHealth = enemyPet.GetComponent<EnemyPetHealth>(); diff --git a/Assets/Scripts/Managers/LevelManager.cs b/Assets/Scripts/Managers/LevelManager.cs index 20d54bb..41d350c 100644 --- a/Assets/Scripts/Managers/LevelManager.cs +++ b/Assets/Scripts/Managers/LevelManager.cs @@ -60,16 +60,12 @@ namespace Nightmare if (scene.name == "Shop") { TimerTextComp.gameObject.SetActive(false); - Debug.Log("Setting " + TimerTextComp.gameObject.name + " to inactive."); QuestTextComp.gameObject.SetActive(false); - Debug.Log("Setting " + QuestTextComp.gameObject.name + " to inactive."); } else { TimerTextComp.gameObject.SetActive(true); - Debug.Log("Setting " + TimerTextComp.gameObject.name + " to active."); QuestTextComp.gameObject.SetActive(true); - Debug.Log("Setting " + QuestTextComp.gameObject.name + " to active."); } playerMove.transform.position = playerRespawn; diff --git a/Assets/Scripts/Managers/QuestManager.cs b/Assets/Scripts/Managers/QuestManager.cs index bf492c5..35ee980 100644 --- a/Assets/Scripts/Managers/QuestManager.cs +++ b/Assets/Scripts/Managers/QuestManager.cs @@ -128,7 +128,6 @@ public class QuestManager : MonoBehaviour void rewardPlayer() { - Debug.Log("Player rewarded"); int reward = 200 * (lm.GetCurrLevel() + 1); playerCurr.add(reward); } diff --git a/Assets/Scripts/Pets/AllyPetHealth.cs b/Assets/Scripts/Pets/AllyPetHealth.cs index eeb2703..690ad1e 100644 --- a/Assets/Scripts/Pets/AllyPetHealth.cs +++ b/Assets/Scripts/Pets/AllyPetHealth.cs @@ -66,7 +66,6 @@ namespace Nightmare if (isCheatFullHPPet) return; - Debug.Log("AllyPetHealth: " + currentHealth); currentHealth -= amount; } } diff --git a/Assets/Scripts/Pets/AttackingPetAction.cs b/Assets/Scripts/Pets/AttackingPetAction.cs index 29995a1..e885fe8 100644 --- a/Assets/Scripts/Pets/AttackingPetAction.cs +++ b/Assets/Scripts/Pets/AttackingPetAction.cs @@ -33,7 +33,6 @@ namespace Nightmare { nearbyEnemies.Add(other.gameObject); } - Debug.Log("SKEEBS"); } void OnTriggerExit (Collider other) @@ -76,7 +75,6 @@ namespace Nightmare { timer = 0f; targetedEnemy.GetComponent<EnemyHealth>().TakeDamage(attackDamage, new Vector3()); - Debug.Log("Attacked"); } } } \ No newline at end of file diff --git a/Assets/Scripts/Pets/EnemyPetAction.cs b/Assets/Scripts/Pets/EnemyPetAction.cs index d3c259f..93eee30 100644 --- a/Assets/Scripts/Pets/EnemyPetAction.cs +++ b/Assets/Scripts/Pets/EnemyPetAction.cs @@ -14,14 +14,11 @@ namespace Nightmare { attack = GetComponentInParent<EnemyAttack>(); attack.Buff(); - Debug.Log("Buffed!"); } void OnDestroy() { attack.Debuff(); - Debug.Log("Debuffed!"); - } } } \ No newline at end of file diff --git a/Assets/Scripts/Pets/EnemyPetHealth.cs b/Assets/Scripts/Pets/EnemyPetHealth.cs index 9bc1559..a8ae6f7 100644 --- a/Assets/Scripts/Pets/EnemyPetHealth.cs +++ b/Assets/Scripts/Pets/EnemyPetHealth.cs @@ -56,7 +56,6 @@ namespace Nightmare public void TakeDamage (int amount, Vector3 hitPoint) { - Debug.Log("Enemy Pet: " + currentHealth); if (!IsDead()) { // enemyAudio.Play(); diff --git a/Assets/Scripts/Pets/EnemyPetMovement.cs b/Assets/Scripts/Pets/EnemyPetMovement.cs index 4c51b6b..1f0d2dd 100644 --- a/Assets/Scripts/Pets/EnemyPetMovement.cs +++ b/Assets/Scripts/Pets/EnemyPetMovement.cs @@ -41,7 +41,6 @@ namespace Nightmare void OnTriggerEnter (Collider other) { - Debug.Log("OnTriggerEnter" + isPlayerInRange); if(other.CompareTag("Player")) { isPlayerInRange = true; @@ -81,7 +80,6 @@ namespace Nightmare void AvoidPlayer() { - Debug.Log("Avoiding Player"); GoToPosition(new Vector3(-player.position.x, -player.position.y, -player.position.z)); } diff --git a/Assets/Scripts/Pets/HealingPetAction.cs b/Assets/Scripts/Pets/HealingPetAction.cs index 3cbc83c..1cc0418 100644 --- a/Assets/Scripts/Pets/HealingPetAction.cs +++ b/Assets/Scripts/Pets/HealingPetAction.cs @@ -70,7 +70,6 @@ namespace Nightmare timer = 0f; healHitPoint = Mathf.Min(healHitPoint, playerHealth.startingHealth - playerHealth.currentHealth); playerHealth.TakeDamage(-healHitPoint); - Debug.Log("Healed"); } } } \ No newline at end of file diff --git a/Assets/Scripts/Player/PlayerCurrency.cs b/Assets/Scripts/Player/PlayerCurrency.cs index 101037d..032596e 100644 --- a/Assets/Scripts/Player/PlayerCurrency.cs +++ b/Assets/Scripts/Player/PlayerCurrency.cs @@ -22,7 +22,6 @@ public class PlayerCurrency : MonoBehaviour, IDataPersistance } balance -= nominal; - Debug.Log("Balance: " + balance); } public int Balance() diff --git a/Assets/Scripts/Weapons/Sword.cs b/Assets/Scripts/Weapons/Sword.cs index 4a3c4b2..d46ee44 100644 --- a/Assets/Scripts/Weapons/Sword.cs +++ b/Assets/Scripts/Weapons/Sword.cs @@ -61,7 +61,6 @@ public class Sword : Weapons if (enemyPetHealth != null) { // ... the enemy pet should take damage. - Debug.Log("SWORDD"); enemyPetHealth.TakeDamage(damagePerShot, shootHit.point); } } diff --git a/Assets/Shop.cs b/Assets/Shop.cs index 9ab0f45..c4849eb 100644 --- a/Assets/Shop.cs +++ b/Assets/Shop.cs @@ -23,7 +23,6 @@ public class Shop : MonoBehaviour if (other.gameObject.CompareTag("Player")) { shopManager.setAccessible(true); - Debug.Log("Player is nearby"); } } @@ -32,7 +31,6 @@ public class Shop : MonoBehaviour if (other.gameObject.CompareTag("Player")) { shopManager.setAccessible(false); - Debug.Log("Player is not nearby"); } } } diff --git a/Assets/TriggerTest.cs b/Assets/TriggerTest.cs index d758da8..59b05ea 100644 --- a/Assets/TriggerTest.cs +++ b/Assets/TriggerTest.cs @@ -6,18 +6,6 @@ public class TriggerTest : MonoBehaviour { private void OnCollisionEnter(Collision other) { - Debug.Log("Collision happened with " + other.gameObject.name); - - Debug.Log("Tag: " + other.gameObject.tag); - Debug.Log("RigidBody: " + other.rigidbody.ToString()); - Debug.Log("Is Trigger: " + other.collider.isTrigger.ToString()); - - Debug.Log("Velocity: " + other.relativeVelocity.ToString()); - ContactPoint[] cp = other.contacts; - foreach (ContactPoint point in cp) - { - Debug.Log(point.point.ToString()); - } } } -- GitLab