Fixed bugs

This commit is contained in:
2026-01-17 16:37:23 +01:00
parent 154c642cce
commit 3642006bb2
4 changed files with 15 additions and 11 deletions

View File

@@ -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));
}