ByteUtils to extension methods
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user