public override void ApplyDamage(Core.Health Target) { Target.Damage((int)activeDamage); if (Target.GetComponent <Rigidbody2D>()) { Target.GetComponent <Rigidbody2D>().AddForceAtPosition((Target.transform.position - transform.position) * (exsplosiveForce * forceMult), transform.position, ForceMode2D.Impulse); } }
public override void ApplyDamage(Core.Health Target) { Target.Damage((int)activeDamage); if (Target.GetComponent <Rigidbody2D>()) { //Get veleoctiy and use that to apply force direction if (chargeUpOne != 0) { Target.GetComponent <Rigidbody2D>().AddForceAtPosition(stabKnockBack * chargeUpOne * transform.up, transform.position, ForceMode2D.Impulse); } else { Target.GetComponent <Rigidbody2D>().AddForceAtPosition(swingKnockBack * chargeUpTwo * -transform.right, transform.position, ForceMode2D.Impulse); } } }