private Substance UseSubstance(PlayerSubstanceManager playerSubstanceManager, Substance substance) { // if the sword is infused and the player has enough substance left of the required type, the attack will use the substance if (isInfused && playerSubstanceManager.TryUsingSubstance(substance, substanceConsumtionAmount)) { return(substance); } else { return(Substance.none_physical); } }
public bool Attack(PlayerSubstanceManager playerSubstanceManager, Substance substance, int[] enemyTypes) { return(CombatManager.ColliderAttackBox(influenceCollider, damagePerHit, UseSubstance(playerSubstanceManager, substance), enemyTypes)); }