设置扩展

This commit is contained in:
SoulliesOfficial
2026-07-19 16:44:58 -04:00
parent dda354ebb9
commit 9fd5f098ab
110 changed files with 8386 additions and 2311 deletions

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using DG.Tweening;
using Ichni.RhythmGame;
using Ichni.RhythmGame.Beatmap;
@@ -51,8 +50,7 @@ namespace Ichni
fakeLoadPercent = 0f;
Observable.EveryUpdate()
.Where(_ => ThemeBundleManager.instance.waitingBundleAmount.Value == 0 &&
GameManager.Instance.gameLoadingCanvas.allPartsSet)
.Where(_ => ThemeBundleManager.instance.waitingBundleAmount.Value == 0 && GameManager.Instance.gameLoadingCanvas.allPartsSet)
.First()
.Subscribe(_ =>
{
@@ -72,6 +70,8 @@ namespace Ichni
{
fakeLoadObserver.Dispose();
GameManager.Instance.beatmapContainer.RebuildRuntimeTimeDurations();
Observable.Timer(TimeSpan.FromSeconds(1f)).First().Subscribe(_ =>
{
GameManager.Instance.gameLoadingCanvas.FadeOut();
@@ -79,33 +79,27 @@ namespace Ichni
GameManager.Instance.songPlayer.isStarting = true;
GameManager.Instance.beatmapContainer.gameElementList.ForEach(element => element.BeforeStart());
GameManager.Instance.gameUICanvas.readyText.DOFade(1, 0.5f)
.SetLoops(4, LoopType.Yoyo).SetEase(Ease.InOutFlash).Play();
// isStarting maps the Ready screen to song time zero. Apply the
// duration-controlled active states before that screen becomes visible.
GameManager.Instance.beatmapContainer.SyncRuntimeTimeDurationStates(GameManager.Instance.SongTime);
GameManager.Instance.gameUICanvas.readyText.DOFade(1, 0.5f).SetLoops(4, LoopType.Yoyo).SetEase(Ease.InOutFlash).Play();
Observable.Timer(TimeSpan.FromSeconds(2)).First().Subscribe(_ =>
{
GameManager.Instance.songPlayer.isDelaying = true;
GameManager.Instance.songPlayer.isStarting = false;
// SongInformation.delay can make this timeline position negative.
// Re-sync immediately after the state switch so negative-time
// elements are correct before the first scheduler tick.
GameManager.Instance.beatmapContainer.SyncRuntimeTimeDurationStates(GameManager.Instance.SongTime);
Observable.NextFrame().Subscribe(_ =>
{
GameManager.Instance.timeDurations = GameManager.Instance.beatmapContainer.gameElementList
.Select(x => (x as IHaveTimeDurationSubmodule)?.timeDurationSubmodule)
.Where(x => x != null && (x.startTime > 0 || x.endTime < GameManager.Instance.songInformation.songLength)).ToList();
GameManager.Instance.beatmapContainer.gameElementList.ForEach(element => element.WhenStart());
});
});
});
});
});
/*Observable.EveryUpdate()
.Where(_ => !GameManager.Instance.audioManager.isStarting)
.First()
.Subscribe(_ =>
{
});*/
});
}
public void Load(string chapterName, string musicName, string difficultyName)
@@ -143,4 +137,4 @@ namespace Ichni
}
}
}
}