diff --git a/Assets/Animation/GameOverClip.anim b/Assets/Animation/GameOverClip.anim index 226ac3a0451999e1a4c7e31b86c52600e36b1b73..24325a9752b024c28c279df6bb1562397ccde536 100644 --- a/Assets/Animation/GameOverClip.anim +++ b/Assets/Animation/GameOverClip.anim @@ -450,7 +450,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -480,7 +480,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -510,7 +510,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -540,7 +540,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -1953,7 +1953,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -1983,7 +1983,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -2013,7 +2013,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 @@ -2043,7 +2043,7 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.50016665 + time: 0.5 value: 1 inSlope: 0 outSlope: 0 diff --git a/Assets/Prefabs/Pet/Buff.prefab b/Assets/Prefabs/Pet/Buff.prefab index 240497bcf0c5ff4155675031149cc442d11947d0..14094c1f4093eea4fca2add94e2b57bac36321e6 100644 --- a/Assets/Prefabs/Pet/Buff.prefab +++ b/Assets/Prefabs/Pet/Buff.prefab @@ -544,9 +544,6 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 61658b50bcfbe8640ac586f05f6340c4, type: 3} insertIndex: -1 addedObject: {fileID: 7663078657916812462} - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 61658b50bcfbe8640ac586f05f6340c4, type: 3} - insertIndex: -1 - addedObject: {fileID: -1357968397051319622} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 61658b50bcfbe8640ac586f05f6340c4, type: 3} insertIndex: -1 addedObject: {fileID: 8547245238292844958} @@ -651,20 +648,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: increaseRate: 0.2 ---- !u!114 &-1357968397051319622 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6708288964639503651} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0e48b3f76a0d9be4f96e3346abc74bf8, type: 3} - m_Name: - m_EditorClassIdentifier: - moveSpeed: 4 - safeDistance: 5 --- !u!195 &8547245238292844958 NavMeshAgent: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Managers/EnemyManager.cs b/Assets/Scripts/Managers/EnemyManager.cs index 8404fb1d5ad2b7f2ae699c96f20593b5acca6a9b..2102e0be836826380a0f03b00324ea04727508be 100644 --- a/Assets/Scripts/Managers/EnemyManager.cs +++ b/Assets/Scripts/Managers/EnemyManager.cs @@ -98,7 +98,8 @@ namespace Nightmare { for (int i = 0; i < petCount; i++) { - Instantiate(pet, enemyInstance.transform); + GameObject instantiatedItem = Instantiate(pet, enemyInstance.transform.position, Quaternion.identity); + instantiatedItem.transform.SetParent(enemyInstance.transform); } } } diff --git a/Assets/Scripts/Pet/BuffBehavior.cs b/Assets/Scripts/Pet/BuffBehavior.cs index 2c2142fe23e80748657f8ee756f0653d5a62b59a..b75783373c798c7e98824243928277aa40749cb4 100644 --- a/Assets/Scripts/Pet/BuffBehavior.cs +++ b/Assets/Scripts/Pet/BuffBehavior.cs @@ -9,7 +9,6 @@ public class BuffBehavior : PausibleObject public double increaseRate = 0.2; void Awake() { - enemyAttack = GetComponentInParent<EnemyAttack>(includeInactive: true); StartPausible(); } @@ -21,6 +20,7 @@ public class BuffBehavior : PausibleObject void Start() { + enemyAttack = GetComponentInParent<EnemyAttack>(includeInactive: true); enemyAttack.attackDamage += (increaseRate * enemyAttack.initialDamage); } diff --git a/Assets/Scripts/Pet/BuffMovement.cs b/Assets/Scripts/Pet/BuffMovement.cs index 30e15c3a74a09d753b5ddd630c0cd5a4cc9285ae..c1352935816e7597f3e78c2310dc31a6bcf29ea6 100644 --- a/Assets/Scripts/Pet/BuffMovement.cs +++ b/Assets/Scripts/Pet/BuffMovement.cs @@ -36,8 +36,6 @@ public class BuffMovement : MonoBehaviour Debug.Log("not safe"); Vector3 newPosition = transform.position + direction.normalized * safeDistance; Move(newPosition); - } - } }