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); }
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(); }
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); }
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(); }
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); }