Skip to content
Snippets Groups Projects
Commit f62f655a authored by Mohamad Hilmi Rinaldi's avatar Mohamad Hilmi Rinaldi
Browse files

fix: dragon death

parent 01f36763
Branches
Tags
No related merge requests found
......@@ -16,7 +16,6 @@ public class EnemyHealth : MonoBehaviour
CapsuleCollider capsuleCollider;
bool isDead;
bool isSinking;
bool isGettingHit = false;
void Awake ()
......@@ -48,18 +47,7 @@ public class EnemyHealth : MonoBehaviour
if (isDead)
return;
if (gameObject.name == "Dragon(Clone)")
{
if (!isGettingHit)
{
StartCoroutine(TriggerGetHit());
enemyAudio.Play();
}
}
else
{
enemyAudio.Play();
}
enemyAudio.Play();
currentHealth -= amount;
......@@ -123,12 +111,4 @@ public class EnemyHealth : MonoBehaviour
}
Destroy (gameObject, 2f);
}
private IEnumerator TriggerGetHit()
{
isGettingHit = true;
anim.SetTrigger("GetHit");
yield return new WaitForSeconds(1.2f);
isGettingHit = false;
}
}
......@@ -98,7 +98,7 @@ public class Bow : MonoBehaviour
{
if (hitKillCheat && countHitKill == 0){
countHitKill++;
damagePerShot = 1000;
damagePerShot = 2000;
} else if (hitKillCheat && countHitKill > 0){
countHitKill = 0;
damagePerShot = 80;
......
......@@ -67,7 +67,7 @@ public class PlayerShooting : MonoBehaviour
if (!GameManager.isPause) {
if (hitKillCheat && countHitKill == 0){
countHitKill++;
damagePerShot = 1000;
damagePerShot = 2000;
} else if (hitKillCheat && countHitKill > 0){
countHitKill = 0;
damagePerShot = 20;
......
......@@ -70,7 +70,7 @@ public class PlayerShotgun : MonoBehaviour
if (!GameManager.isPause) {
if (hitKillCheat && countHitKill == 0){
countHitKill++;
damagePerShot = 1000;
damagePerShot = 2000;
} else if (hitKillCheat && countHitKill > 0){
countHitKill = 0;
damagePerShot = 20;
......
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