From 39d64d7d6b5f261f7cd319675002c16096162f83 Mon Sep 17 00:00:00 2001 From: Shavira Date: Sat, 24 May 2025 10:31:10 +0700 Subject: [PATCH] update tag enemy detection --- .../.idea/inspectionProfiles/Project_Default.xml | 6 ++++++ Assets/ToothyV/Scenes/Hard/Lv1HardA.unity | 2 +- Assets/ToothyV/Scripts/Enemy.cs | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .idea/.idea.ToothyV/.idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/.idea.ToothyV/.idea/inspectionProfiles/Project_Default.xml b/.idea/.idea.ToothyV/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..5d1517e --- /dev/null +++ b/.idea/.idea.ToothyV/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/Assets/ToothyV/Scenes/Hard/Lv1HardA.unity b/Assets/ToothyV/Scenes/Hard/Lv1HardA.unity index cb82f3b..afc1a0a 100644 --- a/Assets/ToothyV/Scenes/Hard/Lv1HardA.unity +++ b/Assets/ToothyV/Scenes/Hard/Lv1HardA.unity @@ -1914,7 +1914,7 @@ GameObject: - component: {fileID: 1879414516} m_Layer: 0 m_Name: Enemy - m_TagString: Untagged + m_TagString: Enemy m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/ToothyV/Scripts/Enemy.cs b/Assets/ToothyV/Scripts/Enemy.cs index c183219..34c4d71 100644 --- a/Assets/ToothyV/Scripts/Enemy.cs +++ b/Assets/ToothyV/Scripts/Enemy.cs @@ -25,6 +25,9 @@ public class Enemy : MonoBehaviour gameManager = FindObjectOfType(); health = maxHealth; + + gameObject.tag = "Enemy"; + } void Update()