More sound stuff
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Marro.PacManUdon
|
||||
private VRCObjectPool pelletPool;
|
||||
|
||||
private Animator mazeSpriteAnimator;
|
||||
private int pelletCount;
|
||||
private int pelletCountTotal;
|
||||
private int pelletCountRemaining;
|
||||
private GameObject[] attractScreenElements;
|
||||
|
||||
@@ -144,8 +144,8 @@ namespace Marro.PacManUdon
|
||||
|
||||
if (Networking.IsOwner(gameObject))
|
||||
{
|
||||
pelletCount = pelletPool.Pool.Length;
|
||||
pelletCountRemaining = pelletCount;
|
||||
pelletCountTotal = pelletPool.Pool.Length;
|
||||
pelletCountRemaining = pelletCountTotal;
|
||||
ghostManager.SetPelletsRemaining(pelletCountRemaining);
|
||||
ghostManager.NewLevel();
|
||||
|
||||
@@ -181,7 +181,9 @@ namespace Marro.PacManUdon
|
||||
|
||||
soundManager.PlayPelletSound();
|
||||
|
||||
int pelletsConsumed = pelletCount - pelletCountRemaining;
|
||||
soundManager.UpdatePelletCount(pelletCountRemaining);
|
||||
|
||||
int pelletsConsumed = pelletCountTotal - pelletCountRemaining;
|
||||
if (pelletCountRemaining <= 0)
|
||||
{
|
||||
StartTimeSequence(PacManTimeSequence.BoardClear);
|
||||
@@ -203,14 +205,14 @@ namespace Marro.PacManUdon
|
||||
AddScore(50);
|
||||
ghostManager.SetPowerPellet(true);
|
||||
pacMan.SetPowerPellet(true);
|
||||
soundManager.StartGhostSound(true);
|
||||
soundManager.SetGhostBlue(true);
|
||||
}
|
||||
|
||||
public void EndPowerPellet()
|
||||
{
|
||||
ghostManager.SetPowerPellet(false);
|
||||
pacMan.SetPowerPellet(false);
|
||||
soundManager.StartGhostSound(false);
|
||||
soundManager.SetGhostBlue(false);
|
||||
}
|
||||
|
||||
public void GotFruit()
|
||||
@@ -237,9 +239,14 @@ namespace Marro.PacManUdon
|
||||
StartTimeSequence(PacManTimeSequence.PacManCaught);
|
||||
}
|
||||
|
||||
public void NoGhostsScared()
|
||||
{
|
||||
soundManager.SetGhostBlue(false);
|
||||
}
|
||||
|
||||
public void NoGhostsRetreating()
|
||||
{
|
||||
soundManager.EndGhostRetreat();
|
||||
soundManager.SetGhostRetreat(false);
|
||||
}
|
||||
|
||||
void BoardClearAnimation()
|
||||
@@ -1260,7 +1267,7 @@ namespace Marro.PacManUdon
|
||||
break;
|
||||
case 6:
|
||||
// Start game, end sequence
|
||||
soundManager.StartGhostSound(false);
|
||||
soundManager.StartGhostSound();
|
||||
SetFrozen(false);
|
||||
break;
|
||||
}
|
||||
@@ -1337,7 +1344,7 @@ namespace Marro.PacManUdon
|
||||
case 4:
|
||||
// Unfreeze
|
||||
SetFrozen(false);
|
||||
soundManager.StartGhostSound(false);
|
||||
soundManager.StartGhostSound();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1357,7 +1364,7 @@ namespace Marro.PacManUdon
|
||||
SetPacManActive(true);
|
||||
SetFrozen(false);
|
||||
ghostManager.GhostCaughtContinue();
|
||||
soundManager.StartGhostRetreat();
|
||||
soundManager.SetGhostRetreat(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1440,7 +1447,8 @@ namespace Marro.PacManUdon
|
||||
// Unfreeze
|
||||
SetFrozen(false);
|
||||
soundManager.SuppressSound(false);
|
||||
soundManager.StartGhostSound(false);
|
||||
soundManager.StartGhostSound();
|
||||
soundManager.UpdatePelletCount(pelletCountRemaining);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user