2修
This commit is contained in:
@@ -31,23 +31,33 @@ public class HoldNoteController : MonoBehaviour
|
||||
if (rb != null) rb.simulated = false;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
private void OnEnable()
|
||||
{
|
||||
NoteRuntimeTickManager.Register(this);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
NoteRuntimeTickManager.Unregister(this);
|
||||
}
|
||||
|
||||
public void ManualTick(float songTime, float deltaTime)
|
||||
{
|
||||
if (useAbsolutePositioning)
|
||||
{
|
||||
if (isMoving) ApplyAbsolutePosition(GameplayClock.NowSongTime);
|
||||
if (isMoving) ApplyAbsolutePosition(songTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start moving after activation time in legacy mode
|
||||
if (!isMoving && GameplayClock.NowSongTime >= activationTime)
|
||||
if (!isMoving && songTime >= activationTime)
|
||||
{
|
||||
isMoving = true;
|
||||
}
|
||||
|
||||
if (isMoving)
|
||||
{
|
||||
transform.Translate(Vector3.down * speed * Time.deltaTime);
|
||||
transform.Translate(Vector3.down * speed * deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user