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

@@ -102,31 +102,22 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
//throw new NotImplementedException();
}
public void SetTransformObserver()
public void UpdateTransform(bool refreshAll = true)
{
Observable.EveryUpdate().Subscribe(_ =>
bool willRefresh = false;
if (transformSubmodule.positionDirtyMark)
{
if (transformSubmodule == null)
{
return;
}
transformSubmodule.currentPosition = transformSubmodule.originalPosition + transformSubmodule.positionOffset;
transformSubmodule.positionDirtyMark = false;
willRefresh = true;
transformSubmodule.positionOffset = Vector3.zero;
}
bool willRefresh = false;
if (transformSubmodule.positionDirtyMark)
{
transformSubmodule.currentPosition = transformSubmodule.originalPosition + transformSubmodule.positionOffset;
transformSubmodule.positionDirtyMark = false;
willRefresh = true;
transformSubmodule.positionOffset = Vector3.zero;
}
if (willRefresh)
{
Refresh();
}
}).AddTo(gameObject);
if (refreshAll && willRefresh)
{
Refresh();
}
}
public override void Refresh()