You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
594 B
C#
24 lines
594 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace RootMotion.Dynamics {
|
|
|
|
public class JointBreakBroadcaster : MonoBehaviour {
|
|
|
|
/// <summary>
|
|
/// The PuppetMaster that this muscle belongs to.
|
|
/// </summary>
|
|
[HideInInspector] public PuppetMaster puppetMaster;
|
|
/// <summary>
|
|
/// The index of this muscle in the PuppetMaster.muscles array.
|
|
/// </summary>
|
|
[HideInInspector] public int muscleIndex;
|
|
|
|
void OnJointBreak() {
|
|
if (!enabled) return;
|
|
|
|
puppetMaster.RemoveMuscleRecursive(puppetMaster.muscles[muscleIndex].joint, true, true, MuscleRemoveMode.Numb);
|
|
}
|
|
}
|
|
}
|