ByteUtils to extension methods

This commit is contained in:
2026-01-18 16:45:47 +01:00
parent b68b3d1c25
commit 305a0ec3a1
4 changed files with 52 additions and 52 deletions

View File

@@ -37,8 +37,8 @@ namespace Marro.PacManUdon
return;
}
ByteUtils.Append(GetPosition(), data, ref index);
ByteUtils.Append(GetDirection(), data, ref index);
data.Append(GetPosition(), ref index);
data.Append(GetDirection(), ref index);
}
public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType)
@@ -48,8 +48,8 @@ namespace Marro.PacManUdon
return true;
}
SetPosition(ByteUtils.ReadVector2(data, ref index));
SetDirection(ByteUtils.ReadVector2(data, ref index));
SetPosition(data.ReadVector2(ref index));
SetDirection(data.ReadVector2(ref index));
return true;
}