NetworkManagerTester working
This commit is contained in:
@@ -163,13 +163,13 @@ namespace Marro.PacManUdon
|
||||
SetPosition(nextPosition);
|
||||
}
|
||||
|
||||
private Vector2 ProcessNextPosition(Vector2 position, Vector2 nextPosition)
|
||||
private Vector2 ProcessNextPosition(Vector2 position, Vector2 nextPosition)
|
||||
{
|
||||
if (turnAroundSoon && ghostState == PacManGhostState.Normal
|
||||
&& GridMoverTools.CrossesTileBorder(position, nextPosition, direction.x != 0, direction.y != 0))
|
||||
{
|
||||
SetDirection(direction * -1);
|
||||
Debug.Log($"{gameObject} turned around to direction {GetDirection()}");
|
||||
//Debug.Log($"{gameObject} turned around to direction {GetDirection()}");
|
||||
turnAroundSoon = false;
|
||||
return nextPosition;
|
||||
}
|
||||
@@ -816,7 +816,6 @@ namespace Marro.PacManUdon
|
||||
inTunnel = data.ReadBool(ref index);
|
||||
rngState = data.ReadInt(ref index);
|
||||
turnAroundSoon = data.ReadBool(ref index);
|
||||
Debug.Log($"{gameObject} turnAroundSoon = {turnAroundSoon}");
|
||||
speed = data.ReadFloat(ref index);
|
||||
|
||||
ghostState = (PacManGhostState)data.ReadByte(ref index);
|
||||
|
||||
Reference in New Issue
Block a user