Ghost - PacMan collision detection

This commit is contained in:
2026-06-17 14:12:36 +02:00
parent e3b626f3d6
commit a7d1adf175
6 changed files with 302 additions and 127 deletions

View File

@@ -213,13 +213,13 @@ namespace Marro.PacManUdon
private void CheckNewTile(Vector2 position, Vector2 nextPosition)
{
var pellet = pelletManager.EatAtTile(position, nextPosition);
var eatResult = pelletManager.PacManMoveToTile(position, nextPosition);
if (pellet == PelletType.Pellet)
if (eatResult == EatResult.Pellet)
{
freezeSeconds = 0.0166666666666667f;
}
else if (pellet == PelletType.PowerPellet)
else if (eatResult == EatResult.PowerPellet)
{
freezeSeconds = freezeSeconds = 0.05f;
}