Switched to Direction enum

This commit is contained in:
2026-06-15 10:29:36 +02:00
parent 2ccf77c0eb
commit 73b3194c51
25 changed files with 2874 additions and 1987 deletions

View File

@@ -90,7 +90,7 @@ namespace Marro.PacManUdon
pacMan.SetKinematic(true);
pacMan.SetActive(true);
pacMan.SetPosition(attractScreenElements[16].transform.localPosition);
pacMan.SetDirection(Vector2.left);
pacMan.SetDirection(Direction.Left);
ghostManager.RestartLevel();
ghostManager.SetLevel(2);
@@ -100,7 +100,7 @@ namespace Marro.PacManUdon
for (int i = 0; i < ghosts.Length; i++)
{
ghosts[i].SetPosition(attractScreenElements[17 + i].transform.localPosition);
ghosts[i].SetDirection(Vector2.left);
ghosts[i].SetDirection(Direction.Left);
ghosts[i].SetState(PacManGhostState.Normal);
}
break;
@@ -119,7 +119,7 @@ namespace Marro.PacManUdon
case 18:
// Turn PacMan around after eating power pellet
pacMan.SetDirection(Vector2.right);
pacMan.SetDirection(Direction.Right);
pacMan.SetTargetDirection(Vector2.right);
break;

View File

@@ -26,14 +26,14 @@ namespace Marro.PacManUdon
pacMan.SetKinematic(true);
pacMan.SetActive(true);
pacMan.SetPosition(intermissionScreenElements[0].transform.localPosition);
pacMan.SetDirection(Vector2.left);
pacMan.SetDirection(Direction.Left);
ghostManager.SetLevel(5);
ghostManager.SetKinematic(true);
ghostManager.gameObject.SetActive(true);
blinky.SetElroy(2);
blinky.SetPosition(intermissionScreenElements[1].transform.localPosition);
blinky.SetDirection(Vector2.left);
blinky.SetDirection(Direction.Left);
blinky.SetState(PacManGhostState.Normal);
SetFrozen(false);
@@ -46,14 +46,14 @@ namespace Marro.PacManUdon
// Reached end, make ghost scared and turn around
blinky.BecomeScared();
blinky.SetPosition(intermissionScreenElements[3].transform.localPosition);
pacMan.SetDirection(Vector2.zero);
pacMan.SetDirection(Direction.Zero);
pacMan.SetPosition(intermissionScreenElements[2].transform.localPosition);
pacMan.SetPowerPellet(true);
break;
case 4:
// Pacman starts chasing ghosts
pacMan.SetDirection(Vector2.right);
pacMan.SetDirection(Direction.Right);
pacMan.BecomeBig();
break;
case 5:

View File

@@ -34,14 +34,14 @@ namespace Marro.PacManUdon
pacMan.SetKinematic(true);
pacMan.SetActive(true);
pacMan.SetPosition(intermissionScreenElements[0].transform.localPosition);
pacMan.SetDirection(Vector2.left);
pacMan.SetDirection(Direction.Left);
ghostManager.SetLevel(5);
ghostManager.SetKinematic(true);
ghostManager.gameObject.SetActive(true);
blinky.SetElroy(2);
blinky.SetPosition(intermissionScreenElements[1].transform.localPosition);
blinky.SetDirection(Vector2.left);
blinky.SetDirection(Direction.Left);
blinky.SetState(PacManGhostState.Normal);
SetFrozen(false);
@@ -65,16 +65,16 @@ namespace Marro.PacManUdon
case 8:
// Blinky sprite updates with broken cover
blinky.SetSpecialLook(true);
blinky.SetDirection(Vector2.up);
blinky.SetDirection(Direction.Up);
blinky.SetPosition(blinky.GetPosition() + new Vector2(-0.250f, 0f));
break;
case 9:
// Blinky looks at broken cover
blinky.SetDirection(Vector2.down);
blinky.SetDirection(Direction.Down);
break;
case 10:
// Cutscene starts to unload
blinky.SetDirection(Vector2.zero);
blinky.SetDirection(Direction.Zero);
break;
case 11:
// End cutscene

View File

@@ -26,14 +26,14 @@ namespace Marro.PacManUdon
pacMan.SetKinematic(true);
pacMan.SetActive(true);
pacMan.SetPosition(intermissionScreenElements[0].transform.localPosition);
pacMan.SetDirection(Vector2.left);
pacMan.SetDirection(Direction.Left);
ghostManager.SetLevel(5);
ghostManager.SetKinematic(true);
ghostManager.gameObject.SetActive(true);
blinky.SetElroy(2);
blinky.SetPosition(intermissionScreenElements[1].transform.localPosition);
blinky.SetDirection(Vector2.left);
blinky.SetDirection(Direction.Left);
blinky.SetState(PacManGhostState.Normal);
blinky.SetSpecialLook(true);
@@ -45,13 +45,13 @@ namespace Marro.PacManUdon
break;
case 3:
// Reached end, freeze
pacMan.SetDirection(Vector2.zero);
blinky.SetDirection(Vector2.zero);
pacMan.SetDirection(Direction.Zero);
blinky.SetDirection(Direction.Zero);
break;
case 4:
// Ghost runs back on screen
blinky.SetPosition(intermissionScreenElements[3].transform.localPosition);
blinky.SetDirection(Vector2.right);
blinky.SetDirection(Direction.Right);
break;
case 5:
// End cutscene