public static ReadFrom ( |
||
reader | ||
리턴 |
public static ReducedLayerInfo ReadFrom(BinaryReader reader, int version) { ReducedLayerInfo toReturn = new ReducedLayerInfo(); toReturn.Z = reader.ReadSingle(); toReturn.Texture = reader.ReadString(); toReturn.Name = reader.ReadString(); toReturn.NumberOfQuads = reader.ReadUInt32(); for (int i = 0; i < toReturn.NumberOfQuads; i++) { toReturn.Quads.Add(ReducedQuadInfo.ReadFrom(reader)); } if (version >= 2) { toReturn.TextureId = reader.ReadInt32(); } if (version >= 3) { toReturn.ParallaxMultiplierX = reader.ReadSingle(); toReturn.ParallaxMultiplierY = reader.ReadSingle(); toReturn.CameraOffsetX = reader.ReadSingle(); toReturn.CameraOffsetY = reader.ReadSingle(); } return(toReturn); }
public static ReducedLayerInfo ReadFrom(BinaryReader reader) { ReducedLayerInfo toReturn = new ReducedLayerInfo(); toReturn.Texture = reader.ReadString(); toReturn.NumberOfQuads = reader.ReadUInt32(); for (int i = 0; i < toReturn.NumberOfQuads; i++) { toReturn.Quads.Add(ReducedQuadInfo.ReadFrom(reader)); } return(toReturn); }