コード例 #1
0
        private void AccessoriesApi_AccessoriesCopied(object sender, AccessoryCopyEventArgs e)
        {
            var controller = GetMakerCharaController();

            if (controller != null)
            {
                controller.AccessoriesCopiedEvent(sender, e);
            }
            UI.ToggleButtonVisibility();
        }
コード例 #2
0
        private static void AccessoriesApi_AccessoryKindChanged(object sender, AccessorySlotEventArgs e)
        {
            var controller = GetMakerCharaController();

            if (controller != null)
            {
                controller.AccessoryKindChangeEvent(sender, e);
            }
            UI.ToggleButtonVisibility();
        }
コード例 #3
0
 private void AccessoriesApi_SelectedMakerAccSlotChanged(object sender, AccessorySlotEventArgs e)
 {
     if (MakerAPI.InsideAndLoaded)
     {
         if (UI.Visible)
         {
             UI.ShowUI(0);
         }
         UI.ToggleButtonVisibility();
     }
 }
コード例 #4
0
        private IEnumerator ApplyData()
        {
            yield return(null);

#if !EC
            if (KKAPI.Studio.StudioAPI.InsideStudio)
            {
                yield return(null);

                yield return(null);
            }
#endif
            while (ChaControl == null || ChaControl.GetHead() == null)
            {
                yield return(null);
            }

            UI.ToggleButtonVisibility();

            foreach (var dbData in AccessoryDynamicBoneData)
            {
                if (dbData.CoordinateIndex == CurrentCoordinateIndex)
                {
                    var accessory = ChaControl.GetAccessoryObject(dbData.Slot);
                    if (accessory != null)
                    {
                        var dynamicBones = accessory.GetComponentsInChildren <DynamicBone>();
                        foreach (var dynamicBone in dynamicBones)
                        {
                            if (dynamicBone.m_Root != null && dynamicBone.m_Root.name == dbData.BoneName)
                            {
                                if (dbData.FreezeAxis != null)
                                {
                                    dynamicBone.m_FreezeAxis = (DynamicBone.FreezeAxis)dbData.FreezeAxis;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Weight != null)
                                {
                                    dynamicBone.SetWeight((float)dbData.Weight);
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Damping != null)
                                {
                                    dynamicBone.m_Damping = (float)dbData.Damping;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Elasticity != null)
                                {
                                    dynamicBone.m_Elasticity = (float)dbData.Elasticity;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Stiffness != null)
                                {
                                    dynamicBone.m_Stiffness = (float)dbData.Stiffness;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Inertia != null)
                                {
                                    dynamicBone.m_Inert = (float)dbData.Inertia;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                                if (dbData.Radius != null)
                                {
                                    dynamicBone.m_Radius = (float)dbData.Radius;
                                    DBsToUpdate.Add(dynamicBone);
                                }
                            }
                        }
                    }
                }
            }
        }
コード例 #5
0
 private void MakerAPI_MakerFinishedLoading(object sender, System.EventArgs e)
 {
     UI.ToggleButtonVisibility();
 }
コード例 #6
0
 private static void ChangeAccessory()
 {
     UI.ToggleButtonVisibility();
 }