This commit is contained in:
SoulliesOfficial
2026-06-05 04:45:57 -04:00
parent 3a63641a2c
commit 7c60c40d6b
377 changed files with 10970 additions and 843 deletions

View File

@@ -1,18 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectTracker : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -8,7 +8,7 @@ using UnityEngine.Serialization;
namespace Ichni.RhythmGame
{
public partial class ParticleTracker : GameElement, IHaveParticles, IHaveColorSubmodule
public partial class ParticleTracker : GameElement, IHaveParticles, IHaveColorSubmodule, IScheduledElement
{
#region [] Essential Configs
public Track track;
@@ -66,6 +66,18 @@ namespace Ichni.RhythmGame
{
colorSubmodule = new ColorSubmodule(this, Color.white, true, Color.white, 0);
}
public override void AfterInitialize()
{
base.AfterInitialize();
CoreServices.UpdateScheduler.Register(UpdatePhase.Effect, this);
}
public override void OnDelete()
{
base.OnDelete();
CoreServices.UpdateScheduler.Unregister(UpdatePhase.Effect, this);
}
#endregion
#region [] Runtime Settings
@@ -91,9 +103,8 @@ namespace Ichni.RhythmGame
#region [] Main Update
public partial class ParticleTracker
{
private void Update()
private void UpdateParticlePlayState(float songTime)
{
float songTime = CoreServices.TimeProvider.SongTime;
if (playTime > songTime || stopTime < songTime)
{
particle.Stop();
@@ -106,6 +117,15 @@ namespace Ichni.RhythmGame
}
}
}
#region [IScheduledElement] Scheduler Interface
public void ScheduledUpdate(UpdatePhase phase, float songTime)
{
UpdateParticlePlayState(songTime);
}
public bool IsScheduledActive => isActiveAndEnabled;
#endregion
}
#endregion