update
This commit is contained in:
@@ -32,6 +32,7 @@ public partial class BasePrefabsCollection : SerializedScriptableObject
|
||||
public GameObject triggerHint;
|
||||
|
||||
[Title("Effect相关")] public Material defaultParticleMaterial;
|
||||
public GameObject particleEmitter;
|
||||
public GameObject bloomEffect;
|
||||
public GameObject cameraShakeEffect;
|
||||
public GameObject cameraZoomEffect;
|
||||
|
||||
@@ -70,8 +70,14 @@ public class GameInputManager : SerializedMonoBehaviour
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.instance.audioManager.isUpdating)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用预处理指令区分平台
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
ProcessMouseInput();
|
||||
HandleHolding();
|
||||
#else
|
||||
ProcessRealTouchInput();
|
||||
|
||||
@@ -11,7 +11,9 @@ namespace Ichni
|
||||
{
|
||||
public class ProjectLoader
|
||||
{
|
||||
public float loadPercent;
|
||||
public float fakeLoadPercent;
|
||||
public float realLoadPercent;
|
||||
public float displayLoadPercent => Mathf.Min(realLoadPercent, fakeLoadPercent);
|
||||
|
||||
public static readonly ES3Settings SaveSettings = new ES3Settings
|
||||
{
|
||||
@@ -39,34 +41,53 @@ namespace Ichni
|
||||
LoadProjectInfo(beatMapFolderPath);
|
||||
LoadSongInfo(beatMapFolderPath);
|
||||
LoadCommandScripts(beatMapFolderPath);
|
||||
|
||||
GameManager.instance.gameLoadingCanvas.MoveParts();
|
||||
|
||||
ThemeBundleManager.instance.LoadThemeBundles(GameManager.instance.projectInformation.selectedThemeBundleList);
|
||||
loadPercent = 0f;
|
||||
realLoadPercent = 0f;
|
||||
fakeLoadPercent = 0f;
|
||||
|
||||
Observable.EveryUpdate()
|
||||
.Where(_ => ThemeBundleManager.instance.waitingBundleAmount.Value == 0)
|
||||
.Where(_ => ThemeBundleManager.instance.waitingBundleAmount.Value == 0 &&
|
||||
GameManager.instance.gameLoadingCanvas.allPartsSet)
|
||||
.First()
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
LoadBeatMap(beatMapFolderPath);
|
||||
|
||||
IDisposable fakeLoadObserver = Observable.EveryUpdate().Subscribe(_ =>
|
||||
{
|
||||
fakeLoadPercent += Time.deltaTime * 0.2f;
|
||||
GameManager.instance.gameLoadingCanvas.SetProgress(displayLoadPercent * 100f);
|
||||
});
|
||||
|
||||
Observable.EveryUpdate()
|
||||
.Where(_ => ((BeatmapContainer_BM)GameManager.instance.beatmapContainer.matchedBM).remainingElementAmount.Value == 0)
|
||||
.Where(_ => ((BeatmapContainer_BM)GameManager.instance.beatmapContainer.matchedBM).remainingElementAmount.Value == 0 &&
|
||||
fakeLoadPercent >= 1f)
|
||||
.First()
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
GameManager.instance.beatmapContainer.gameElementList.ForEach(element => element.BeforeStart());
|
||||
|
||||
GameManager.instance.gameUICanvas.readyText.DOFade(1, 0.5f)
|
||||
.SetLoops(4, LoopType.Yoyo).SetEase(Ease.InOutFlash).Play();
|
||||
|
||||
Observable.Timer(TimeSpan.FromSeconds(2)).First().Subscribe(_ =>
|
||||
fakeLoadObserver.Dispose();
|
||||
|
||||
Observable.Timer(TimeSpan.FromSeconds(1f)).First().Subscribe(_ =>
|
||||
{
|
||||
GameManager.instance.audioManager.isDelaying = true;
|
||||
GameManager.instance.audioManager.isStarting = false;
|
||||
Observable.NextFrame().Subscribe(_=>
|
||||
GameManager.instance.gameLoadingCanvas.FadeOut();
|
||||
GameManager.instance.audioManager.isLoading = false;
|
||||
|
||||
GameManager.instance.beatmapContainer.gameElementList.ForEach(element => element.BeforeStart());
|
||||
|
||||
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.beatmapContainer.gameElementList.ForEach(element => element.WhenStart());
|
||||
GameManager.instance.audioManager.isDelaying = true;
|
||||
GameManager.instance.audioManager.isStarting = false;
|
||||
Observable.NextFrame().Subscribe(_ =>
|
||||
{
|
||||
GameManager.instance.beatmapContainer.gameElementList.ForEach(element => element.WhenStart());
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user