public override bool SufferHPDamage(int damagePower, GameObject damageSourceObject, BaseAgent damageSourceAgent, bool displayDamage = true) { if (base.SufferHPDamage(damagePower, damageSourceObject, damageSourceAgent, displayDamage)) { if (damageSourceObject != null) { if (enemyAnim != null) { if (!dead) { enemyAnim.StartWave(waveColor, damageSourceObject.transform.localPosition, waveLengths, waveAlphas, waveFrontLimit, waveSpeed, 0f, 0f, 0f, null, 0f, 0f); } else { enemyAnim.StartWave(waveColor, damageSourceObject.transform.localPosition, waveLengthsLast, waveAlphasLast, waveFrontLimit, waveSpeedLast, 0f, 0f, 1f, null, 0f, 0f); } } } if ((damageSourceAgent != null) && dead) { damageSourceAgent.ReceiveExperience(rewardXP, true); } return(true); } return(false); }