This commit is contained in:
SoulliesOfficial
2025-07-21 02:38:35 -04:00
parent c02ad2cc1f
commit 551d9c2b86
92 changed files with 42098 additions and 10351 deletions

View File

@@ -4,11 +4,12 @@ using System.Linq;
using Dreamteck.Splines;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using UniRx;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public partial class DTMNoteVisualHold : DTMNoteVisual, INoteVisualHold
public partial class DTMNoteVisualHold : DTMNoteVisual, INoteVisualHold, IHaveTransformSubmodule
{
public Hold hold { get; set; }
@@ -129,6 +130,38 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
//throw new NotImplementedException();
}
public void SetTransformObserver()
{
Observable.EveryUpdate().Subscribe(_ =>
{
if (transformSubmodule == null)
{
return;
}
bool willRefresh = false;
if (transformSubmodule.positionDirtyMark)
{
transformSubmodule.currentPosition = transformSubmodule.originalPosition + transformSubmodule.positionOffset;
Vector2 posOffset = new Vector2(transformSubmodule.currentPosition.x, transformSubmodule.currentPosition.y);
hold.trackPositioner.motion.offset = posOffset;
meshGenerator.offset = posOffset;
headPoint.motion.offset = posOffset;
tailPoint.motion.offset = posOffset;
transformSubmodule.positionDirtyMark = false;
willRefresh = true;
transformSubmodule.positionOffset = Vector3.zero;
}
if (willRefresh)
{
Refresh();
}
}).AddTo(gameObject);
}
}
namespace Beatmap