Пример #1
0
 public Color GetColor()
 {
     if (localizedName == "Air")
     {
         return(Color.Transparent);
     }
     else if (material.mapColor == "")
     {
         return(Color.Black);
     }
     else
     {
         return(Color.FromArgb(NumberTransfer.HexString2Int(material.mapColor.Substring(0, 2)), NumberTransfer.HexString2Int(material.mapColor.Substring(2, 2)), NumberTransfer.HexString2Int(material.mapColor.Substring(4, 2))));
     }
 }
Пример #2
0
 public Color GetColor()
 {
     if (transparent)
     {
         return(Color.Transparent);
     }
     else if (color == "")
     {
         return(Color.Black);
     }
     else
     {
         return(Color.FromArgb(NumberTransfer.HexString2Int(color.Substring(0, 2)), NumberTransfer.HexString2Int(color.Substring(2, 2)), NumberTransfer.HexString2Int(color.Substring(4, 2))));
     }
 }
Пример #3
0
 public static double ReadDouble(BinaryReader br)
 {
     return(NumberTransfer.HexByteArray2Double(br.ReadBytes(8)));
 }
Пример #4
0
 public static float ReadFloat(BinaryReader br)
 {
     return(NumberTransfer.HexByteArray2Float(br.ReadBytes(4)));
 }
Пример #5
0
 public static long ReadLong(BinaryReader br)
 {
     return(NumberTransfer.HexByteArray2Long(br.ReadBytes(8)));
 }
Пример #6
0
 public static int Read3byteInt(BinaryReader br)
 {
     byte[] t = br.ReadBytes(3);
     return(NumberTransfer.HexByteArray2Int(0, t[0], t[1], t[2]));
 }
Пример #7
0
 public static int ReadInt(BinaryReader br)
 {
     return(NumberTransfer.HexByteArray2Int(br.ReadBytes(4)));
 }
Пример #8
0
 public static short ReadShort(BinaryReader br)
 {
     return(NumberTransfer.HexByteArray2Short(br.ReadBytes(2)));
 }