/// <summary> /// Initializes a new instance of the <see cref="BodyInfo"/> class. /// </summary> /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param> public BodyInfo(IValueReader reader) { ID = reader.ReadBodyID(_idValueKey); Body = reader.ReadString(_bodyValueKey); Fall = reader.ReadString(_fallValueKey); Jump = reader.ReadString(_jumpValueKey); Punch = reader.ReadString(_punchValueKey); Stand = reader.ReadString(_standValueKey); Walk = reader.ReadString(_walkValueKey); Size = reader.ReadVector2(_sizeValueKey); }
/// <summary> /// Initializes a new instance of the <see cref="BodyInfo"/> class. /// </summary> /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param> public BodyInfo(IValueReader reader) { ID = reader.ReadBodyID(_idValueKey); Body = reader.ReadString(_bodyValueKey); Fall = reader.ReadString(_fallValueKey); Jump = reader.ReadString(_jumpValueKey); Attack = reader.ReadString(_attackValueKey); Stand = reader.ReadString(_standValueKey); Walk = reader.ReadString(_walkValueKey); Size = reader.ReadVector2(_sizeValueKey); Paperdoll = reader.ReadBool(_paperdollValueKey); }
/// <summary> /// When overridden in the derived class, reads a value with the specified name from an IValueReader. /// </summary> /// <param name="name">Name of the value.</param> /// <param name="reader">IValueReader to read from.</param> /// <returns>Value read from the IValueReader.</returns> protected override BodyID Read(string name, IValueReader reader) { var v = reader.ReadBodyID(name); return(v); }