Exemplo n.º 1
0
        public static Guid GetGuid(StructProperty guidProp)
        {
            int a  = guidProp.GetProp <IntProperty>("A");
            int b  = guidProp.GetProp <IntProperty>("B");
            int c  = guidProp.GetProp <IntProperty>("C");
            int d  = guidProp.GetProp <IntProperty>("D");
            var ms = new MemoryStream(16);

            ms.WriteInt32(a);
            ms.WriteInt32(b);
            ms.WriteInt32(c);
            ms.WriteInt32(d);
            return(new Guid(ms.ToArray()));
        }
Exemplo n.º 2
0
 public static Vector3 GetVector(StructProperty vecProp) =>
 new Vector3(vecProp.GetProp <FloatProperty>("X"), vecProp.GetProp <FloatProperty>("Y"), vecProp.GetProp <FloatProperty>("Z"));