示例#1
0
 public static void SetSpringSettings(SpringJoint spring, SpringSettings settings)
 {
     spring.spring    = settings.power;
     spring.damper    = settings.damper;
     spring.tolerance = settings.tolerance;
     spring.anchor    = settings.anchor;
     spring.autoConfigureConnectedAnchor = settings.autoAnchor;
     spring.connectedAnchor = settings.connectedAnchor;
 }
示例#2
0
        public static SpringSettings GetSpringSettings(SpringJoint spring)
        {
            SpringSettings settings = new SpringSettings();

            settings.power           = spring.spring;
            settings.damper          = spring.damper;
            settings.tolerance       = spring.tolerance;
            settings.anchor          = spring.anchor;
            settings.connectedAnchor = spring.connectedAnchor;
            settings.autoAnchor      = spring.autoConfigureConnectedAnchor;
            return(settings);
        }