public void TakeDamage(ProjectileConfig projectileConfig, Vector2 pushBack) { health -= projectileConfig.Damage; followPlayer.GetPushed(); followPlayer.GetHit(); rb.AddForce(pushBack * 10f, ForceMode.Impulse); if (health <= 0) { if (!dead) { dead = true; GameManager.main.KillEnemy(projectileConfig); Destroy(gameObject); } } SoundManager.main.PlaySound(SoundType.EnemyHit); }