public void Clear(bool RaiseChangedEvent) { if (RaiseChangedEvent) { ResourceID = 0; ID = 0; PlayFlags = new Flags(0); Row = 0; Column = 0; Radius = 0; MaxVolume = 0; ResourceName = String.Empty; Resource = null; } else { resourceID = 0; id = 0; playflags = new Flags(0); row = 0; column = 0; radius = 0; maxVolume = 0; resourceName = String.Empty; resource = null; } }
public int ReadFrom(byte[] Buffer, int StartIndex = 0) { int cursor = StartIndex; resourceID = BitConverter.ToUInt32(Buffer, cursor); cursor += TypeSizes.INT; id = BitConverter.ToUInt32(Buffer, cursor); cursor += TypeSizes.INT; playflags = new PlaySound.Flags(Buffer[cursor]); cursor++; row = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; column = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; radius = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; maxVolume = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; return(cursor - StartIndex); }
public PlaySound(uint ResourceID, uint ID, PlaySound.Flags Flags, int Row, int Column, int Radius, int MaxVolume) { resourceID = ResourceID; id = ID; playflags = Flags; row = Row; column = Column; radius = Radius; maxVolume = MaxVolume; }
public unsafe void ReadFrom(ref byte *Buffer) { resourceID = *((uint *)Buffer); Buffer += TypeSizes.INT; id = *((uint *)Buffer); Buffer += TypeSizes.INT; playflags = new PlaySound.Flags(Buffer[0]); Buffer++; row = *((int *)Buffer); Buffer += TypeSizes.INT; column = *((int *)Buffer); Buffer += TypeSizes.INT; radius = *((int *)Buffer); Buffer += TypeSizes.INT; maxVolume = *((int *)Buffer); Buffer += TypeSizes.INT; }
public unsafe void ReadFrom(ref byte* Buffer) { resourceID = *((uint*)Buffer); Buffer += TypeSizes.INT; id = *((uint*)Buffer); Buffer += TypeSizes.INT; playflags = new PlaySound.Flags(Buffer[0]); Buffer++; row = *((int*)Buffer); Buffer += TypeSizes.INT; column = *((int*)Buffer); Buffer += TypeSizes.INT; radius = *((int*)Buffer); Buffer += TypeSizes.INT; maxVolume = *((int*)Buffer); Buffer += TypeSizes.INT; }
public int ReadFrom(byte[] Buffer, int StartIndex = 0) { int cursor = StartIndex; resourceID = BitConverter.ToUInt32(Buffer, cursor); cursor += TypeSizes.INT; id = BitConverter.ToUInt32(Buffer, cursor); cursor += TypeSizes.INT; playflags = new PlaySound.Flags(Buffer[cursor]); cursor++; row = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; column = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; radius = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; maxVolume = BitConverter.ToInt32(Buffer, cursor); cursor += TypeSizes.INT; return cursor - StartIndex; }