From 5c7e66e26153bd3fa1ca0f084a53a38d016e687d Mon Sep 17 00:00:00 2001 From: Agilham <13521118@std.stei.itb.ac.id> Date: Sat, 11 May 2024 14:46:08 +0700 Subject: [PATCH] feat: remove and comment debug log --- Assets/Scripts/GameOver.cs | 4 ---- Assets/Scripts/Managers/CutsceneManager.cs | 4 ---- Assets/Scripts/Managers/SaveManager.cs | 2 -- Assets/Scripts/Managers/StatisticsManager.cs | 4 ---- Assets/Scripts/Pet/AttackPetAttack.cs | 2 +- Assets/Scripts/Pet/PetDamageMovement.cs | 2 +- Assets/Scripts/Player/OnAttack.cs | 2 -- Assets/Scripts/Player/PlayerMovement.cs | 4 ++-- Assets/Scripts/Shop/Shopkeeper.cs | 2 +- 9 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Assets/Scripts/GameOver.cs b/Assets/Scripts/GameOver.cs index bf12516..3b01820 100644 --- a/Assets/Scripts/GameOver.cs +++ b/Assets/Scripts/GameOver.cs @@ -29,10 +29,6 @@ public class GameOver : MonoBehaviour if (instance == null) { instance = FindObjectOfType<GameOver>(); - if (instance == null) - { - Debug.LogError("GameOver instance not found in the scene."); - } } return instance; } diff --git a/Assets/Scripts/Managers/CutsceneManager.cs b/Assets/Scripts/Managers/CutsceneManager.cs index 6820ac0..4cfa40d 100644 --- a/Assets/Scripts/Managers/CutsceneManager.cs +++ b/Assets/Scripts/Managers/CutsceneManager.cs @@ -19,10 +19,6 @@ public class CutsceneManager : MonoBehaviour if (instance == null) { instance = FindObjectOfType<CutsceneManager>(); - if (instance == null) - { - Debug.LogError("CutsceneManager instance not found in the scene."); - } } return instance; } diff --git a/Assets/Scripts/Managers/SaveManager.cs b/Assets/Scripts/Managers/SaveManager.cs index 9f69ecd..f7b9817 100644 --- a/Assets/Scripts/Managers/SaveManager.cs +++ b/Assets/Scripts/Managers/SaveManager.cs @@ -67,13 +67,11 @@ public class SaveManager : MonoBehaviour // Path to the save.json string filePath = $"{folderPath}/{data.saveDataName}.{fileFormat}"; - Debug.Log("Path: " + filePath); // Write JSON to file File.WriteAllText(filePath, json); Debug.Log("Game saved to: " + filePath); - Debug.Log("Gold: " + PlayerGold.GetGoldAmount() + ", Quest ke " + (QuestManager.GetQuestIndex() + 1)); StatisticsManager.Instance.SaveCount(); } diff --git a/Assets/Scripts/Managers/StatisticsManager.cs b/Assets/Scripts/Managers/StatisticsManager.cs index c88d13f..d494f90 100644 --- a/Assets/Scripts/Managers/StatisticsManager.cs +++ b/Assets/Scripts/Managers/StatisticsManager.cs @@ -23,10 +23,6 @@ public class StatisticsManager : MonoBehaviour if (instance == null) { instance = FindObjectOfType<StatisticsManager>(); - if (instance == null) - { - Debug.LogError("StatisticsManager instance not found in the scene."); - } } return instance; } diff --git a/Assets/Scripts/Pet/AttackPetAttack.cs b/Assets/Scripts/Pet/AttackPetAttack.cs index 34066ef..bcec459 100644 --- a/Assets/Scripts/Pet/AttackPetAttack.cs +++ b/Assets/Scripts/Pet/AttackPetAttack.cs @@ -87,7 +87,7 @@ public class AttackPetAttack : MonoBehaviour if (other.gameObject.tag == targetTag && CheckTargetInList(other.gameObject)) { enemies.Remove(other.gameObject); - Debug.Log("Enemy removed"); + // Debug.Log("Enemy removed"); if (enemies.Count == 0) { isAttacking = false; diff --git a/Assets/Scripts/Pet/PetDamageMovement.cs b/Assets/Scripts/Pet/PetDamageMovement.cs index 9d1d5f8..71612c4 100644 --- a/Assets/Scripts/Pet/PetDamageMovement.cs +++ b/Assets/Scripts/Pet/PetDamageMovement.cs @@ -49,7 +49,7 @@ public class PetDamageMovement : MonoBehaviour if(owner.tag != "Player") { float distanceToPlayer = Vector3.Distance(transform.position, player.transform.position); if(distanceToPlayer <= runRadius) { - Debug.Log("Pet Damage Running"); + // Debug.Log("Pet Damage Running"); Vector3 directionRun = (transform.position - player.transform.position).normalized; destinationVar = transform.position + directionRun * 10; } diff --git a/Assets/Scripts/Player/OnAttack.cs b/Assets/Scripts/Player/OnAttack.cs index 51f70d9..83233c7 100644 --- a/Assets/Scripts/Player/OnAttack.cs +++ b/Assets/Scripts/Player/OnAttack.cs @@ -19,12 +19,10 @@ public class OnAttack : MonoBehaviour } void AttackBegin() { - Debug.Log("Attack Begin"); attacking = true; } void AttackEnd() { - Debug.Log("Attack End"); attacking = false; } } diff --git a/Assets/Scripts/Player/PlayerMovement.cs b/Assets/Scripts/Player/PlayerMovement.cs index 4203c97..57eb2ab 100644 --- a/Assets/Scripts/Player/PlayerMovement.cs +++ b/Assets/Scripts/Player/PlayerMovement.cs @@ -89,7 +89,7 @@ public class PlayerMovement : MonoBehaviour float vertical = Input.GetAxis("Vertical"); float moveSpeed = speed; - //Debug.Log("horizontal: " + horizontal + " vertical: " + vertical); + // Debug.Log("horizontal: " + horizontal + " vertical: " + vertical); // set the direction direction = transform.right * horizontal + transform.forward * vertical; @@ -173,7 +173,7 @@ public class PlayerMovement : MonoBehaviour if (Input.GetKey(KeyCode.Space) && jumpAllowed) { // add force to the player - Debug.Log("Jump"); + // Debug.Log("Jump"); playerAnimator.SetTrigger("JumpUp"); rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse); } diff --git a/Assets/Scripts/Shop/Shopkeeper.cs b/Assets/Scripts/Shop/Shopkeeper.cs index 3123be5..e329e1f 100644 --- a/Assets/Scripts/Shop/Shopkeeper.cs +++ b/Assets/Scripts/Shop/Shopkeeper.cs @@ -107,7 +107,7 @@ public class Shopkeeper : MonoBehaviour { timerAlert.text = time.ToString(); isShopOpen = true; - Debug.Log("opening shop"); + Debug.Log("Opening Shop"); while(time > 0) { yield return new WaitForSeconds(1f); -- GitLab