/** * Detects collision with the enemy and plays the attack animation * appropiately. * * @param collision The collision we are detecting. */ private void OnCollisionEnter(Collision collision) { if (!dm.isDead() && collision.gameObject.transform.CompareTag("Enemy")) { this.Attack(); elimSinceHeal++; if (ColorDataBase.ScreenShake()) { _cs.AttackShake(); } sCounter.AddAttackScore(streakMultiplier); StartCoroutine(slashSpawner.Slash(this.GetSlashDelay(slashID))); } }