// Currently unused since writing all coords at once is funky and reading them back out afterwards creates an infinite loop private void WriteCoords() { float floatX = (float)SysBotHunterCoordXCount.Value; float floatY = (float)SysBotHunterCoordYCount.Value; float floatZ = (float)SysBotHunterCoordZCount.Value; byte[] Bytes = BytesHandler.CombineArrays(BitConverter.GetBytes(floatX), BitConverter.GetBytes(floatY), BitConverter.GetBytes(floatZ)); sb.WriteBytesAbsolute(Bytes, OffsetHunterCoordX); }
public static void WriteUInt(uint input, ulong offset, ISwitchConnectionSync sb) { byte value = Convert.ToByte(input); byte[] byteArray = new byte[1]; byteArray[0] = value; sb.WriteBytesAbsolute(byteArray, offset); return; }
public static void WriteFloat(float input, ulong offset, ISwitchConnectionSync sb) { byte[] Bytes = BitConverter.GetBytes(input); sb.WriteBytesAbsolute(Bytes, offset); }
private void SysBotHunterHPCount_ValueChanged(object sender, EventArgs e) { byte value = Convert.ToByte(SysBotHunterHPCount.Value); byte[] byteArray = new byte[1]; byteArray[0] = value; Connection.WriteBytesAbsolute(byteArray, OffsetHunterHP); Connection.WriteBytesAbsolute(byteArray, OffsetHunterHPRecoverable); }