Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }