//Virtual method for Melee Attack, reconfigured in child classes public virtual void MeleeAttack(GameObject target) { PlayerStats playerStats = PlayerStats.Instance; playerStats.TakingDamage(); }
//Damage method void Damage(PlayerStats player) { player.TakingDamage(); //Player hp - 1 Destroying(); //Destroyng gameobject }