internal void Read(ParameterTree tree) { Name = tree.Get <string>("name"); Position = new Vector3( tree.Get <float>("posx"), tree.Get <float>("posy"), tree.Get <float>("posz") ); }
internal void Read(ParameterTree tree) { HingeYMin = tree.Get <float>("hinge_ymin", -180); HingeYMax = tree.Get <float>("hinge_ymax", 180); HingeZMin = tree.Get <float>("hinge_zmin", -180); HingeZMax = tree.Get <float>("hinge_zmax", 180); Radius = tree.Get <float>("coli_r"); Weight = tree.Get <float>("weight", 1); InertialCancel = tree.Get <float>("inertial_cancel"); }
internal void Read(ParameterTree tree) { Type = tree.Get <uint>("type"); Radius = tree.Get <float>("radius"); if (tree.OpenScope("bone")) { if (tree.OpenScope(0)) { Bone0.Read(tree); tree.CloseScope(); } if (tree.OpenScope(1)) { Bone1.Read(tree); tree.CloseScope(); } tree.CloseScope(); } }
internal void Read(ParameterTree tree) { if (tree.OpenScope("root")) { Force = tree.Get <float>("force"); ForceGain = tree.Get <float>("force_gain"); AirResistance = tree.Get <float>("air_res"); RotationY = tree.Get <float>("rot_y"); RotationZ = tree.Get <float>("rot_z"); Friction = tree.Get <float>("friction"); WindAffection = tree.Get <float>("wind_afc"); CollisionType = tree.Get <uint>("coli_type"); InitRotationY = tree.Get <float>("init_rot_y"); InitRotationZ = tree.Get <float>("init_rot_z"); HingeY = tree.Get <float>("hinge_y", 90); HingeZ = tree.Get <float>("hinge_z", 90); CollisionRadius = tree.Get <float>("coli_r"); Stiffness = tree.Get <float>("stiffness"); MoveCancel = tree.Get <float>("move_cancel"); CollisionTargetOsage = tree.Get <string>("colli_tgt_osg"); tree.Enumerate("coli", i => { var collision = new OsageCollisionParameter(); collision.Read(tree); Collisions.Add(collision); }); tree.Enumerate("boc", i => { var boc = new OsageBocParameter(); boc.Read(tree); Bocs.Add(boc); }); tree.CloseScope(); } tree.Enumerate("node", i => { var node = new OsageNodeParameter(); node.Read(tree); Nodes.Add(node); }); }
internal void Read(ParameterTree tree) { StNode = tree.Get <uint>("st_node"); EdNode = tree.Get <uint>("ed_node"); EdRoot = tree.Get <string>("ed_root"); }