예제 #1
0
        public static void DecodeInto(this string data, out Countless<Quaternion> c)
        {
            c = new Countless<Quaternion>();
            var cody = new CfgDecoder(data);
            foreach (var tag in cody)
                c[tag.ToInt()] = cody.GetData().ToQuaternion();

        }
예제 #2
0
 public static CfgEncoder Encode(this Countless<Quaternion> c)
 {
     var cody = new CfgEncoder();
     List<int> inds;
     List<Quaternion> vals = c.GetAllObjs(out inds);
     for (int i = 0; i < inds.Count; i++)
         cody.Add(inds[i].ToString(), vals[i]);
     return cody;
 }
예제 #3
0
        public static void DecodeInto(this string data, out Countless <Vector3> c)
        {
            c = new Countless <Vector3>();
            var cody = new CfgDecoder(data);

            foreach (var tag in cody)
            {
                c[tag.ToInt()] = cody.GetData().ToVector3();
            }
        }
예제 #4
0
        public static void DecodeInto_Countless(this string data, out Countless <float> c)
        {
            c = new Countless <float>();
            var cody = new CfgDecoder(data);

            foreach (var tag in cody)
            {
                c[tag.ToInt()] = cody.GetData().ToFloat();
            }
        }
예제 #5
0
 public static CfgEncoder Encode(this Countless<Vector3> c)
 {
     var cody = new CfgEncoder();
     if (c != null)
     {
         List<int> inds;
         List<Vector3> vals = c.GetAllObjs(out inds);
         for (int i = 0; i < inds.Count; i++)
             cody.Add(inds[i].ToString(), vals[i]);
     }
     return cody;
 }
예제 #6
0
        public static CfgEncoder Encode(this Countless <float> c)
        {
            var          cody = new CfgEncoder();
            List <int>   inds;
            List <float> vals = c.GetAllObjs(out inds);

            for (int i = 0; i < inds.Count; i++)
            {
                cody.Add(inds[i].ToString(), vals[i]);
            }
            return(cody);
        }