@@ -108,6 +108,7 @@ public class consoleOnMono : MonoBehaviour
|
||||
yield return GenerateLegacyNoteVisualOverrides(elements, stats);
|
||||
yield return GenerateLegacyAnimations(elements, stats);
|
||||
yield return RefreshLegacyImport(stats);
|
||||
yield return ApplyLegacyPositionSyncInitialPass();
|
||||
|
||||
LogWindow.Log(
|
||||
$"Legacy tbm import finished. Created {stats.created}, skipped {stats.skipped}, failed {stats.failed}.",
|
||||
@@ -743,6 +744,36 @@ public class consoleOnMono : MonoBehaviour
|
||||
Debug.Log($"[LegacyImport] Refresh complete: {refreshed} elements refreshed, {stats.failed} failures");
|
||||
}
|
||||
|
||||
private IEnumerator ApplyLegacyPositionSyncInitialPass()
|
||||
{
|
||||
float songTime = CoreServices.TimeProvider?.SongTime ?? 0f;
|
||||
int syncCount = 0;
|
||||
|
||||
foreach (GameElement element in legacyIdToElement.Values)
|
||||
{
|
||||
if (element is IHaveTransformSubmodule transformHost)
|
||||
{
|
||||
transformHost.UpdateTransform(false);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GameElement element in legacyIdToElement.Values)
|
||||
{
|
||||
if (element is not PositionSync sync)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
sync.ScheduledUpdate(UpdatePhase.Animation, songTime);
|
||||
sync.ScheduledUpdate(UpdatePhase.Effect, songTime);
|
||||
syncCount++;
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Debug.Log($"[LegacyImport] PositionSync initial pass complete: {syncCount} syncs applied at songTime={songTime}");
|
||||
}
|
||||
|
||||
private void TryCreateLegacyElement(JSONNode node, Func<GameElement> create, LegacyImportStats stats)
|
||||
{
|
||||
string legacyId = GetString(node, "id", string.Empty);
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace Ichni.RhythmGame.Beatmap
|
||||
public PixelateEffect_BM(float duration, float bottomX, float bottomY, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
#pragma warning disable CS0612
|
||||
this.duration = duration;
|
||||
#pragma warning restore CS0612
|
||||
this.bottomX = Mathf.Clamp01(bottomX);
|
||||
this.bottomY = Mathf.Clamp01(bottomY);
|
||||
this.intensityCurve = intensityCurve;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Ichni.RhythmGame
|
||||
public float holdEndTime;
|
||||
public float holdingTime;
|
||||
public bool isHolding;
|
||||
public new bool isFinalJudged;
|
||||
public bool isFinalJudged;
|
||||
|
||||
protected List<EffectBase> startHoldEffects;
|
||||
protected List<EffectBase> holdingEffects;
|
||||
|
||||
@@ -62,7 +62,6 @@ public class SimpleGridController : MonoBehaviour
|
||||
}
|
||||
GameObject coordTextObj = null;
|
||||
|
||||
[System.Obsolete]
|
||||
IEnumerator Pressing()
|
||||
{
|
||||
if (coordTextObj != null)
|
||||
@@ -107,7 +106,7 @@ public class SimpleGridController : MonoBehaviour
|
||||
if (coordText == null) coordText = coordTextObj.GetComponent<TextMeshPro>();
|
||||
coordText.text = $"({xz.x:F2}, {xz.y:F2})\n({Mathf.Round(xz.x):F2}, {Mathf.Round(xz.y):F2})";
|
||||
coordText.fontSize = 8;
|
||||
coordText.enableWordWrapping = false;
|
||||
coordText.textWrappingMode = TextWrappingModes.NoWrap;
|
||||
coordText.color = Color.yellow;
|
||||
}
|
||||
yield return null;
|
||||
@@ -196,4 +195,4 @@ public class SimpleGridController : MonoBehaviour
|
||||
mesh.RecalculateBounds();
|
||||
mf.mesh = mesh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user