コード例 #1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("position", Position.ExportYAML(container));
            node.Add("widthScale", WidthScale);
            node.Add("heightScale", HeightScale);
            node.Add("rotation", Rotation);
            node.Add("color", Color.ExportYAML(container));
            node.Add("lightmapColor", LightmapColor.ExportYAML(container));
            node.Add("index", Index);
            return(node);
        }
コード例 #2
0
 public void Read(AssetReader reader)
 {
     Position.Read(reader);
     WidthScale  = reader.ReadSingle();
     HeightScale = reader.ReadSingle();
     if (IsReadRotation(reader.Version))
     {
         Rotation = reader.ReadSingle();
     }
     Color.Read(reader);
     LightmapColor.Read(reader);
     Index = reader.ReadInt32();
 }
コード例 #3
0
ファイル: TreeInstance.cs プロジェクト: zbx91/UtinyRipper
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(PositionName, Position.ExportYAML(container));
            node.Add(WidthScaleName, WidthScale);
            node.Add(HeightScaleName, HeightScale);
            node.Add(RotationName, Rotation);
            node.Add(ColorName, Color.ExportYAML(container));
            node.Add(LightmapColorName, LightmapColor.ExportYAML(container));
            node.Add(IndexName, Index);
            return(node);
        }
コード例 #4
0
 public void Read(AssetStream stream)
 {
     Position.Read(stream);
     WidthScale  = stream.ReadSingle();
     HeightScale = stream.ReadSingle();
     if (IsReadRotation(stream.Version))
     {
         Rotation = stream.ReadSingle();
     }
     Color.Read(stream);
     LightmapColor.Read(stream);
     Index = stream.ReadInt32();
 }
コード例 #5
0
 public void Write(AssetWriter writer)
 {
     Position.Write(writer);
     writer.Write(WidthScale);
     writer.Write(HeightScale);
     if (HasRotation(writer.Version))
     {
         writer.Write(Rotation);
     }
     Color.Write(writer);
     LightmapColor.Write(writer);
     writer.Write(Index);
 }