/** @copydoc LayerParameterBase::Clone */ public override LayerParameterBase Clone() { TileParameter p = new TileParameter(); p.Copy(this); return(p); }
/** @copydoc LayerParameterBase::Copy */ public override void Copy(LayerParameterBase src) { TileParameter p = (TileParameter)src; m_nAxis = p.m_nAxis; m_nTiles = p.m_nTiles; }
/** @copydoc LayerParameterBase::Load */ public override object Load(System.IO.BinaryReader br, bool bNewInstance = true) { RawProto proto = RawProto.Parse(br.ReadString()); TileParameter p = FromProto(proto); if (!bNewInstance) Copy(p); return p; }
/// <summary> /// Parses the parameter from a RawProto. /// </summary> /// <param name="rp">Specifies the RawProto to parse.</param> /// <returns>A new instance of the parameter is returned.</returns> public static TileParameter FromProto(RawProto rp) { string strVal; TileParameter p = new TileParameter(); if ((strVal = rp.FindValue("axis")) != null) p.axis = int.Parse(strVal); if ((strVal = rp.FindValue("tiles")) != null) p.tiles = int.Parse(strVal); return p; }