private void OnDamageTaken(IDamagable source, DamageArgs args) { HitboxID hitboxId = ((HitReceiver)source).HitboxID; float totalDamage = args.Damage * hitboxMapper[hitboxId].DamageMultiplier; Health.TakeDamage(new DamageArgs(args.Origin, args.Dealer, totalDamage)); }
private void OnForceApplied(IForceable source, ForceArgs args) { HitReceiver receiver = (HitReceiver)source; HitboxID hitboxId = receiver.HitboxID; Vector3 totalForce = args.Force * hitboxMapper[hitboxId].ForceMultiplier; var bone = receiver.GetComponent <RagdollBone>(); bone.ApplyForce(new ForceArgs(args.Origin, args.Dealer, totalForce)); }