Ejemplo n.º 1
0
 private void MakerAPI_MakerFinishedLoading(object sender, System.EventArgs e)
 {
     UI.ToggleButtonVisibility();
 }
Ejemplo n.º 2
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);
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
 private void MakerAPI_MakerBaseLoaded(object s, RegisterCustomControlsEvent e)
 {
     UI.InitUI();
 }