Cleaning up

This commit is contained in:
2025-12-26 18:14:48 +01:00
parent 16b0a348e4
commit f53a41f70c
13 changed files with 66 additions and 52 deletions

View File

@@ -558,10 +558,10 @@ namespace Marro.PacManUdon
}
}
void UpdateSpeed()
public void UpdateSpeed()
{
speed = ghostManager.GetTargetSpeed(this, ghostState, isScared, inTunnel);
Debug.Log($"Ghost updated speed to {speed}, level: {ghostManager.elroyLevel}");
// Debug.Log($"Ghost with type {ghostType} updated speed to {speed}, ghostState: {ghostState}, isScared: {isScared}, inTunnel: {inTunnel}, elroyLevel: {ghostManager.elroyLevel}");
}
public void ResetHousePelletCounter()
@@ -695,14 +695,10 @@ namespace Marro.PacManUdon
}
animator.speed = frozen && !keepAnimating ? 0 : 1; // This would cause issues if the returning sprite was animated, luckily it isn't :)
if (frozen == false)
if (frozen == false && faceInStartingDirectionUntilUnfrozen)
{
if (faceInStartingDirectionUntilUnfrozen)
{
faceInStartingDirectionUntilUnfrozen = false;
UpdateAnimator();
}
faceInStartingDirectionUntilUnfrozen = false;
UpdateAnimator();
}
}