This commit is contained in:
SoulliesOfficial
2025-07-26 04:20:25 -04:00
parent bae0bfbc20
commit abf81ece7b
196 changed files with 3909 additions and 964 deletions

View File

@@ -80,14 +80,11 @@ namespace Ichni.RhythmGame
scaleDirtyMark = true;
eulerAnglesOffsetLock = false;
attachedGameElement.transform.localScale = currentScale;
attachedGameElement.transform.localEulerAngles = currentEulerAngles;
attachedGameElement.transform.localPosition = currentPosition;
if (!HaveSameSubmodule)
{
(attachedGameElement as IHaveTransformSubmodule).transformSubmodule = this;
(attachedGameElement as IHaveTransformSubmodule).UpdateTransform(false);
(attachedGameElement as IHaveTransformSubmodule).SetTransformObserver();
}
}
@@ -127,17 +124,13 @@ namespace Ichni.RhythmGame
public void SetTransformObserver()
{
transformSubmodule.observer = Observable.EveryUpdate()
.Where(_ => GameManager.instance.audioManager.isUpdating)
.Subscribe(_ => UpdateTransform())
.AddTo(transformSubmodule.attachedGameElement);
}
public void UpdateTransform()
public void UpdateTransform(bool refreshAll = true)
{
if (!GameManager.instance.audioManager.isUpdating)
{
return;
}
GameElement attachedGameElement = transformSubmodule.attachedGameElement;
bool willRefresh = false;
@@ -168,7 +161,7 @@ namespace Ichni.RhythmGame
transformSubmodule.positionOffset = Vector3.zero;
}
if(willRefresh)
if(refreshAll && willRefresh)
{
attachedGameElement.Refresh();
}