void InitializeDictionary()
        {
            RagdollDefinitionBindings bindings = GetComponent <RagdollDefinitionBindings>();

            bones = new Dictionary <Rigidbody, RagdollBone>();

            foreach (RagdollBone bone in bindings.Bones)
            {
                bones.Add(bone.Rigidbody, bone);
            }
        }
Esempio n. 2
0
        void SetUpCollisionEventDispatchers()
        {
            RagdollDefinitionBindings bindings = GetComponent <RagdollDefinitionBindings>();

            bones = new Dictionary <CollisionEventDispatcher, RagdollBone>();

            foreach (RagdollBone bone in bindings.Bones)
            {
                bones.Add(SetUpCollisionEventDispatcher(bone), bone);
            }
        }
        void Start()
        {
            RagdollDefinitionBindings bindings = GetComponent <RagdollDefinitionBindings>();

            bindings.SubscribeToOnBonesCreated(Initialize);
        }