diff --git a/Assets/Scripts/Enemy/EnemyHealth.cs b/Assets/Scripts/Enemy/EnemyHealth.cs index a410c2a269c4a2548f4d3087b395c25bd6bc6926..baefc563e47b3512cf857437109584fa0e6fea84 100644 --- a/Assets/Scripts/Enemy/EnemyHealth.cs +++ b/Assets/Scripts/Enemy/EnemyHealth.cs @@ -25,7 +25,7 @@ namespace Nightmare enemyAudio = GetComponent <AudioSource> (); hitParticles = GetComponentInChildren <ParticleSystem> (); capsuleCollider = GetComponent <CapsuleCollider> (); - enemyMovement = this.GetComponent<EnemyMovement>(); + enemyMovement = GetComponent<EnemyMovement>(); healthSlider = GetComponentInChildren <Slider> (); } @@ -103,6 +103,24 @@ namespace Nightmare } if (eliminate) ignoreScore = true; + + // Turn off kepala keroco ability + if (TryGetComponent<KepalaKerocoAbility>(out var kepalaKerocoAbility)) + { + kepalaKerocoAbility.enabled = false; + } + + // Turn off jenderal ability + if (TryGetComponent<JenderalAbility>(out var jenderalAbility)) + { + jenderalAbility.enabled = false; + } + + // Turn off raja ability + if (TryGetComponent<RajaAbility>(out var rajaAbility)) + { + rajaAbility.enabled = false; + } } public void StartSinking ()