Esempio n. 1
0
 private static string GetStringFromChild(NXNode node, string get)
 {
     if (!node.ContainsChild(get))
         return "";
     return node.GetChild(get).ValueOrDie<string>();
 }
Esempio n. 2
0
 private static int GetIntFromChild(NXNode node, string get)
 {
     if (!node.ContainsChild(get))
         return 0;
     try
     {
         return node.GetChild(get).ValueOrDie<int>();
     }
     catch (InvalidCastException) // see Character.wz/Weapon/01482146.img/info/incSTR for more details T_T
     {
         return int.Parse(node.GetChild(get).ValueOrDie<string>());
     }
 }
Esempio n. 3
0
 private static Point GetPointFromChild(NXNode node, string get)
 {
     if (!node.ContainsChild(get))
         return new Point();
     return node.GetChild(get).ValueOrDie<Point>();
 }
Esempio n. 4
0
 private static float GetFloatFromChild(NXNode node, string get)
 {
     if (!node.ContainsChild(get))
         return 0;
     return (float) node.GetChild(get).ValueOrDie<double>();
 }