Fixed bugs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using static Cinemachine.DocumentationSortingAttribute;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
@@ -34,6 +35,7 @@ namespace Marro.PacManUdon
|
||||
_ghost = ghost;
|
||||
_gameManager = gameManager;
|
||||
_animator = GetComponent<Animator>();
|
||||
SetActive(false); // Should only activate for intermission 2
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -41,11 +43,11 @@ namespace Marro.PacManUdon
|
||||
{
|
||||
_lastUpdate = PoleStrechLevels.None;
|
||||
SetStrechLevel(PoleStrechLevels.None);
|
||||
SetActive(false); // Should only activate for intermission 2
|
||||
}
|
||||
|
||||
public void SetActive(bool isActive)
|
||||
{
|
||||
Debug.Log($"({nameof(PacManUdon)} {nameof(Intermission2Pole)}) SetActive {isActive}.");
|
||||
gameObject.SetActive(isActive);
|
||||
}
|
||||
|
||||
@@ -113,6 +115,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
public void SetStrechLevel(PoleStrechLevels level)
|
||||
{
|
||||
Debug.Log($"({nameof(PacManUdon)} {nameof(Intermission2Pole)}) Set strech level to {level}.");
|
||||
_animator.SetFloat("Strech", GetAnimatorValueForStrechLevel(level));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace Marro.PacManUdon
|
||||
case 1:
|
||||
// Show pole
|
||||
SetIntermissionScreenVisible(true);
|
||||
intermission2Pole.Reset();
|
||||
intermission2Pole.SetActive(true);
|
||||
intermission2Pole.Reset();
|
||||
break;
|
||||
case 2:
|
||||
// Start music
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Marro.PacManUdon
|
||||
// Increment level, show ready, show pellets, show lives indicators
|
||||
IncrementLevel();
|
||||
statusDisplay.SetExtraLivesDisplayVisible(true);
|
||||
statusDisplay.SetLevelDisplayVisible(true);
|
||||
statusDisplay.SetReadyTextVisible(true);
|
||||
SetPelletsActive(true);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user