Ghosts synced with some issues
This commit is contained in:
@@ -32,22 +32,12 @@ namespace Marro.PacManUdon
|
||||
|
||||
public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
if (eventType != NetworkEventType.PacManTurn)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
data.Append(GetPosition(), ref index);
|
||||
data.Append(GetDirection(), ref index);
|
||||
}
|
||||
|
||||
public override bool WriteSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
if (eventType != NetworkEventType.PacManTurn)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
SetPosition(data.ReadVector2(ref index));
|
||||
SetDirection(data.ReadVector2(ref index));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user