Пример #1
0
 internal override void OnCreate()
 {
     m_SkeletonController                = new SkeletonController();
     m_SkeletonController.view           = new SkeletonView(new GUIWrapper());
     m_SkeletonController.view.InvalidID = 0;
     m_SkeletonController.selection      = skinningCache.skeletonSelection;
     m_SkeletonToolView = new SkeletonToolView();
     m_SkeletonToolView.onBoneNameChanged     += BoneNameChanged;
     m_SkeletonToolView.onBoneDepthChanged    += BoneDepthChanged;
     m_SkeletonToolView.onBonePositionChanged += BonePositionChanged;
     m_SkeletonToolView.onBoneRotationChanged += BoneRotationChanged;
     m_SkeletonToolView.onBoneColorChanged    += BoneColorChanged;
     m_RectBoneSelector.selection              = skinningCache.skeletonSelection;
     m_RectSelectionTool.rectSelector          = m_RectBoneSelector;
     m_RectSelectionTool.cacheUndo             = skinningCache;
     m_RectSelectionTool.onSelectionUpdate    += () =>
     {
         skinningCache.events.boneSelectionChanged.Invoke();
     };
     m_UnselectTool.cacheUndo   = skinningCache;
     m_UnselectTool.selection   = skinningCache.skeletonSelection;
     m_UnselectTool.onUnselect += () =>
     {
         skinningCache.events.boneSelectionChanged.Invoke();
     };
 }