menu
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user