Exemplo n.º 1
0
        // 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);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public static void WriteFloat(float input, ulong offset, ISwitchConnectionSync sb)
 {
     byte[] Bytes = BitConverter.GetBytes(input);
     sb.WriteBytesAbsolute(Bytes, offset);
 }
Exemplo n.º 4
0
        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);
        }