diff --git a/Assets/Prefabs/PetSparrow.prefab b/Assets/Prefabs/PetSparrow.prefab index e4d4fb040309d4d1c092de63731240d5fe3877bd..50c49a354639d23bf323c9a831ca7087240f6bc7 100644 --- a/Assets/Prefabs/PetSparrow.prefab +++ b/Assets/Prefabs/PetSparrow.prefab @@ -5323,6 +5323,8 @@ MonoBehaviour: sinkSpeed: 2.5 spawnClip: {fileID: 8300000, guid: 0ee44057b9ac14b43a7213edf26545f2, type: 3} deathClip: {fileID: 8300000, guid: 8a8f0e3944844434ea6407b1f43ba0b8, type: 3} + pawImage: {fileID: 0} + petHealthSliderObj: {fileID: 0} --- !u!114 &8956976848956587111 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5352,7 +5354,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3f27b0d45dec6d344ab7952e20f0f222, type: 3} m_Name: m_EditorClassIdentifier: - damage: 10 + damage: 20 timeBetweenAttack: 10 range: 2 detectRadius: 2 diff --git a/Assets/Scripts/Pet/PetAttack.cs b/Assets/Scripts/Pet/PetAttack.cs index f463c70d3d295512a9eaa3525b148dea9ca2a666..694b0cd11651f0c40bc9ecdf9f9348bcfcf7a6cb 100644 --- a/Assets/Scripts/Pet/PetAttack.cs +++ b/Assets/Scripts/Pet/PetAttack.cs @@ -5,10 +5,10 @@ using UnityEngine.AI; public class PetAttack : MonoBehaviour { - public int damage = 10; - public int timeBetweenAttack = 10; - public float range = 2f; - public float detectRadius = 2f; + public int damage = 20; + public int timeBetweenAttack = 1; + public float range = 3f; + public float detectRadius = 3f; float timer; PetHealth petHealth; @@ -59,9 +59,12 @@ public class PetAttack : MonoBehaviour timer = 0f; anim.SetTrigger("Attack"); + // anim.SetBool("IsAttacking", true); //Lakukan Take Damage enemyHealth.TakeDamage(damage, new Vector3(0, 0, 0)); + + // anim.SetBool("IsAttacking", false); } } }