Cleaning
This commit is contained in:
@@ -25,7 +25,6 @@ namespace Marro.PacManUdon
|
||||
private Direction[] predefinedPath;
|
||||
private int predefinedPathIndex;
|
||||
|
||||
private Direction targetDirection;
|
||||
private float freezeSeconds;
|
||||
private bool frozen;
|
||||
|
||||
@@ -187,8 +186,7 @@ namespace Marro.PacManUdon
|
||||
// If we're at a Vector2.zero, we skip applying the direction and only increment.
|
||||
if (nextValidDirectionIndex == predefinedPathIndex)
|
||||
{
|
||||
SetDirection(predefinedPath[nextValidDirectionIndex]);
|
||||
SetTargetDirection(predefinedPath[nextValidDirectionIndex]);
|
||||
SetDirectionAndTargetDirection(predefinedPath[nextValidDirectionIndex]);
|
||||
nextPosition = PositionToGrid(nextPosition) + directionVectors[(int)direction] * 0.01f;
|
||||
|
||||
// Check if we've reached the end of the path, which includes making sure the path doesn't end on Vector2.zero
|
||||
@@ -334,12 +332,6 @@ namespace Marro.PacManUdon
|
||||
renderer.enabled = visible;
|
||||
}
|
||||
|
||||
public void SetTargetDirection(Direction targetDirection)
|
||||
{
|
||||
this.targetDirection = targetDirection;
|
||||
UpdateAnimator();
|
||||
}
|
||||
|
||||
public override void CollectSyncedData(byte[] data, ref int index, NetworkEventType eventType)
|
||||
{
|
||||
if (eventType != NetworkEventType.PacManTurn)
|
||||
|
||||
Reference in New Issue
Block a user