Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Joints_
- {
- public Dictionary<string, int> joints_;
- public Joints_()
- {
- joints_ = new Dictionary<string, int>();
- }
- public Joints_(bool inizializza)
- {
- joints_ = new Dictionary<string, int>();
- for (int i=0; i<3; i++)
- {
- if (i == 0)
- {
- joints_["x"] = 678;
- }
- if (i == 1)
- {
- joints_["y"] = 2646;
- }
- if (i == 2)
- {
- joints_["z"] = 1234;
- }
- }
- }
- public void SaveWithJson(string fileName, ref Joints_ c)
- {
- File.WriteAllText(fileName, JsonConvert.SerializeObject(c, Formatting.Indented));
- }
- }
- public class Persona_
- {
- public Dictionary<string, Joints_> persona_;
- public Persona_()
- {
- persona_ = new Dictionary<string, Joints_>();
- }
- public Persona_(bool inizializza)
- {
- persona_ = new Dictionary<string, Joints_>();
- for (int i = 1; i < 18; i++)
- {
- persona_["joint_" + i] = new Joints_(true);
- }
- }
- public void SaveWithJson(string fileName, ref Persona_ c)
- {
- File.WriteAllText(fileName, JsonConvert.SerializeObject(c, Formatting.Indented));
- }
- }
- {
- "persona_": {
- "joint_1": {
- "joints_": {
- "x": 678,
- "y": 2646,
- "z": 1234
- }
- },
- etc etc....
- {
- "persona_": {
- "joint_1": {
- "x": 678,
- "y": 2646,
- "z": 1234
- },
- etc etc....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement