示例#1
0
    public bool TakeDamage(float damage, Vector3 force)
    {
        bool iskilled = false;

        data.health = Mathf.Max(0, data.health - damage);
        Debug.Log(data.health);
        if (data.health <= 0)
        {
            iskilled = true;
            rs.ActivateRagdoll(force);
            data.health += 20;
        }
        return(iskilled);
    }
示例#2
0
 public override void CollisionEffect(RagdollScript rs)
 {
     rs.ActivateRagdoll();
 }
示例#3
0
 public override void CollisionEffect(/*Collider c, */ RagdollScript rs)
 {
     //Vector3 collisionForce = GetComponent<Rigidbody>().velocity;
     //rs.ActivateRagdoll(collisionForce * mass, c.GetComponent<Limb>());
     rs.ActivateRagdoll();
 }