PKHeX/PKHeX.Core/Saves/Substructures/Gen8/FieldMoveModelSave8.cs

15 lines
844 B
C#
Raw Normal View History

using System;
namespace PKHeX.Core
{
public sealed class FieldMoveModelSave8 : SaveBlock
{
2019-11-16 01:34:18 +00:00
public FieldMoveModelSave8(SAV8SWSH sav, SCBlock block) : base(sav, block.Data) { }
2019-11-16 01:34:18 +00:00
public int M { get => BitConverter.ToUInt16(Data, 0x00); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x00); }
public float X { get => BitConverter.ToSingle(Data, 0x08); set => BitConverter.GetBytes(value).CopyTo(Data, 0x08); }
public float Z { get => BitConverter.ToSingle(Data, 0x10); set => BitConverter.GetBytes(value).CopyTo(Data, 0x10); }
public float Y { get => (int)BitConverter.ToSingle(Data, 0x18); set => BitConverter.GetBytes(value).CopyTo(Data, 0x18); }
public float R { get => (int)BitConverter.ToSingle(Data, 0x20); set => BitConverter.GetBytes(value).CopyTo(Data, 0x20); }
}
}