Skip to content
Snippets Groups Projects
Commit 3b6e8f45 authored by maikeljh's avatar maikeljh
Browse files

[Fix] Turn off ability enemy

parent 30ef3b91
No related merge requests found
...@@ -25,7 +25,7 @@ namespace Nightmare ...@@ -25,7 +25,7 @@ namespace Nightmare
enemyAudio = GetComponent <AudioSource> (); enemyAudio = GetComponent <AudioSource> ();
hitParticles = GetComponentInChildren <ParticleSystem> (); hitParticles = GetComponentInChildren <ParticleSystem> ();
capsuleCollider = GetComponent <CapsuleCollider> (); capsuleCollider = GetComponent <CapsuleCollider> ();
enemyMovement = this.GetComponent<EnemyMovement>(); enemyMovement = GetComponent<EnemyMovement>();
healthSlider = GetComponentInChildren <Slider> (); healthSlider = GetComponentInChildren <Slider> ();
} }
...@@ -103,6 +103,24 @@ namespace Nightmare ...@@ -103,6 +103,24 @@ namespace Nightmare
} }
if (eliminate) ignoreScore = true; 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 () public void StartSinking ()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment