Beispiel #1
0
 public void SetName(BoneCache bone, string name)
 {
     var characterBone = bone.ToCharacterIfNeeded();
     characterBone.name = name;
     if (characterBone != bone || skinningCache.mode == SkinningMode.Character)
     {
         skinningCache.SyncSpriteSheetSkeletons();
     }
 }
        private void DrawBone(BoneCache bone, Color color)
        {
            var isSelected           = selection.Contains(bone.ToCharacterIfNeeded());
            var isNotOnVisualElement = !skinningCache.IsOnVisualElement();
            var isJointHovered       = view.IsActionHot(SkeletonAction.None) && hoveredJoint == bone && isNotOnVisualElement;
            var isTailHovered        = view.IsActionHot(SkeletonAction.None) && hoveredTail == bone && isNotOnVisualElement;

            view.DrawBone(bone.position, bone.right, Vector3.forward, bone.length, color, bone.chainedChild != null, isSelected, isJointHovered, isTailHovered, bone == hotBone);
        }
Beispiel #3
0
        public void SetDepth(BoneCache bone, int depth)
        {
            var characterBone = bone.ToCharacterIfNeeded();
            characterBone.depth = depth;
            
            if (characterBone != bone || skinningCache.mode == SkinningMode.Character)
                skinningCache.SyncSpriteSheetSkeletons();

            skinningCache.events.boneDepthChanged.Invoke(bone);
        }