public void PerformAttack(HealthComponent target) { target.MakeDamage(Damage); lastAttackTime = Time.time; if (animation != null) { animation.AnimateAttack((Vector2)target.Owner.GameObject.transform.position); } if (animation.Owner as PlayerTroop != null) { if (doubleDamage) { SoundManager.Instance.SoldierHeavyShoot(); } else { SoundManager.Instance.SoldierShoot(); } } else { SoundManager.Instance.ZombieBite(); } }