Inheritance: SSTUConstraint
Exemple #1
0
        private void loadLockedConstraint(ConfigNode node)
        {
            String transformName = node.GetStringValue("transformName");
            String targetName    = node.GetStringValue("targetName");
            bool   singleTarget  = node.GetBoolValue("singleTarget", false);

            Transform[]          movers  = part.FindModelTransforms(transformName);
            Transform[]          targets = part.FindModelTransforms(targetName);
            int                  len     = movers.Length;
            SSTULockedConstraint lookConst;

            for (int i = 0; i < len; i++)
            {
                lookConst = new SSTULockedConstraint(node, movers[i], singleTarget ? targets[0] : targets[i], part);
                constraints.Add(lookConst);
            }
        }
 private void loadLockedConstraint(ConfigNode node)
 {
     String transformName = node.GetStringValue("transformName");
     String targetName = node.GetStringValue("targetName");
     bool singleTarget = node.GetBoolValue("singleTarget", false);
     Transform[] movers = part.FindModelTransforms(transformName);
     Transform[] targets = part.FindModelTransforms(targetName);
     int len = movers.Length;
     SSTULockedConstraint lookConst;
     for (int i = 0; i < len; i++)
     {
         lookConst = new SSTULockedConstraint(node, movers[i], singleTarget ? targets[0] : targets[i], part);
         constraints.Add(lookConst);
     }
 }