Trying to get stuff to work

This commit is contained in:
2025-12-29 21:02:05 +01:00
parent 8d5362eff6
commit 97fe8cd69f
12 changed files with 1606 additions and 1190 deletions

View File

@@ -425,9 +425,9 @@ namespace Marro.PacManUdon
public override void AppendSyncedData(byte[][] data, ref int offset)
{
data[offset++] = new byte[] { (byte)gameState };
data[offset++] = new byte[] { Int32ToByte((int)gameState) };
data[offset++] = BitConverter.GetBytes(currentlyInTimeSequence);
data[offset++] = new byte[] { (byte) currentTimeSequence };
data[offset++] = new byte[] { Int32ToByte((int)currentTimeSequence) };
data[offset++] = BitConverter.GetBytes(timeSequenceProgress);
}
@@ -497,5 +497,8 @@ namespace Marro.PacManUdon
}
get => level;
}
public static byte Int32ToByte(int value) =>
byte.Parse(value.ToString()); // This is the only way I could find to cast an int to byte in Udon, a regular cast crashes in runtime...
}
}