Trying to get stuff to work
This commit is contained in:
@@ -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...
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user