Intermission 2
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
private Maze maze;
|
||||
private VRCObjectPool pelletPool;
|
||||
private Intermission2Pole intermission2Pole;
|
||||
|
||||
private Animator mazeSpriteAnimator;
|
||||
private int pelletCountTotal;
|
||||
@@ -53,10 +54,6 @@ namespace Marro.PacManUdon
|
||||
|
||||
public void Start()
|
||||
{
|
||||
maze = mazes[0];
|
||||
pelletPool = maze.pelletContainer.GetComponent<VRCObjectPool>();
|
||||
mazeSpriteAnimator = maze.mazeSprite.GetComponent<Animator>();
|
||||
|
||||
attractScreenElements = new GameObject[attractScreen.transform.childCount];
|
||||
for (int i = 0; i < attractScreenElements.Length; i++)
|
||||
{
|
||||
@@ -69,6 +66,11 @@ namespace Marro.PacManUdon
|
||||
intermissionScreenElements[i] = intermissionScreen.transform.GetChild(i).gameObject;
|
||||
}
|
||||
|
||||
maze = mazes[0];
|
||||
pelletPool = maze.pelletContainer.GetComponent<VRCObjectPool>();
|
||||
mazeSpriteAnimator = maze.mazeSprite.GetComponent<Animator>();
|
||||
intermission2Pole = intermissionScreenElements[4].GetComponent<Intermission2Pole>();
|
||||
|
||||
ghostManager.Initialize(maze.ghostTargets, pacMan, this);
|
||||
pacMan.Initialize(playerInput, pelletPool, this);
|
||||
bonusFruit.Initialize();
|
||||
@@ -76,6 +78,9 @@ namespace Marro.PacManUdon
|
||||
statusDisplay.Initialize();
|
||||
playerInput.Initialize(this);
|
||||
soundManager.Initialize();
|
||||
intermission2Pole.Initialize(this, ghostManager.Ghosts[0]);
|
||||
|
||||
HideEverything();
|
||||
|
||||
SetScore(0);
|
||||
SetHighScore(0);
|
||||
@@ -258,6 +263,11 @@ namespace Marro.PacManUdon
|
||||
soundManager.SetGhostRetreat(false);
|
||||
}
|
||||
|
||||
public void Intermission2PoleUpdate()
|
||||
{
|
||||
TimeSequenceSkipToNextStep();
|
||||
}
|
||||
|
||||
void BoardClearAnimation()
|
||||
{
|
||||
ghostManager.gameObject.SetActive(false);
|
||||
@@ -273,6 +283,7 @@ namespace Marro.PacManUdon
|
||||
SetGhostsActive(false);
|
||||
SetPacManActive(false);
|
||||
SetPressStartButtonScreenVisible(false);
|
||||
SetIntermissionScreenVisible(false);
|
||||
statusDisplay.SetGameOverTextVisible(false);
|
||||
statusDisplay.SetExtraLivesDisplayVisible(false);
|
||||
statusDisplay.SetLevelDisplayVisible(false);
|
||||
@@ -311,6 +322,11 @@ namespace Marro.PacManUdon
|
||||
pressStartButtonScreen.SetActive(visible);
|
||||
}
|
||||
|
||||
void SetIntermissionScreenVisible(bool visible)
|
||||
{
|
||||
intermissionScreen.SetActive(visible);
|
||||
}
|
||||
|
||||
void SetGameState(PacManGameState newGameState)
|
||||
{
|
||||
// Debug.Log($"{gameObject} State transitioning from {gameState} to {newGameState}");
|
||||
@@ -622,6 +638,9 @@ namespace Marro.PacManUdon
|
||||
case PacManTimeSequence.Intermission1:
|
||||
TimeSequenceStepIntermission1(sequenceProgress);
|
||||
break;
|
||||
case PacManTimeSequence.Intermission2:
|
||||
TimeSequenceStepIntermission2(sequenceProgress);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,6 +676,8 @@ namespace Marro.PacManUdon
|
||||
return DeltaToAbsolute(new float[] { 0, 1.95f });
|
||||
case PacManTimeSequence.Intermission1:
|
||||
return DeltaToAbsolute(new float[] { 0, 0.316f, 4.26f, 2.15f, 4.03f });
|
||||
case PacManTimeSequence.Intermission2:
|
||||
return DeltaToAbsolute(new float[] { 0, 0.25f, 0.083f, 0.3f, 1.43f, 2.5f, 1.816f, 1.25f, 0.017f, 1f, 1.966f, 0.033f });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user