perf
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Sirenix.OdinInspector;
|
||||
using UniRx;
|
||||
@@ -28,13 +29,12 @@ namespace Ichni
|
||||
format = ES3.Format.JSON,
|
||||
location = ES3.Location.Resources
|
||||
};
|
||||
|
||||
[Button("TestLoad")]
|
||||
|
||||
public void TestLoad()
|
||||
{
|
||||
string beatMapFolderPath = "Beatmaps/" + InformationTransistor.instance.chapterName +
|
||||
"/" + InformationTransistor.instance.songName +
|
||||
"/" + InformationTransistor.instance.difficultyName;
|
||||
string beatMapFolderPath = "Beatmaps/" + InformationTransistor.instance.chapter.chapterIndex +
|
||||
"/" + InformationTransistor.instance.song.songName +
|
||||
"/" + InformationTransistor.instance.difficulty.difficultyName;
|
||||
|
||||
LoadProjectInfo(beatMapFolderPath);
|
||||
LoadSongInfo(beatMapFolderPath);
|
||||
@@ -49,27 +49,30 @@ namespace Ichni
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
LoadBeatMap(beatMapFolderPath);
|
||||
|
||||
Observable.EveryUpdate()
|
||||
.Where(_ => ((BeatmapContainer_BM)GameManager.instance.beatmapContainer.matchedBM).remainingElementAmount.Value == 0)
|
||||
.First()
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
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.audioManager.isStarting = false;
|
||||
GameManager.instance.audioManager.songPlayer.PlaySong();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Observable.EveryUpdate()
|
||||
.Where(_ => ThemeBundleManager.instance.waitingBundleAmount.Value == 0 &&
|
||||
(GameManager.instance.beatmapContainer.matchedBM as BeatmapContainer_BM).remainingElementAmount.Value == 0)
|
||||
.First()
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
Observable.Timer(TimeSpan.FromSeconds(2)).First().Subscribe(_ =>
|
||||
{
|
||||
GameManager.instance.audioManager.isStarting = false;
|
||||
});
|
||||
});
|
||||
|
||||
Observable.EveryUpdate()
|
||||
/*Observable.EveryUpdate()
|
||||
.Where(_ => !GameManager.instance.audioManager.isStarting)
|
||||
.First()
|
||||
.Subscribe(_ =>
|
||||
{
|
||||
GameManager.instance.audioManager.songPlayer.PlaySong();
|
||||
});
|
||||
|
||||
});*/
|
||||
}
|
||||
|
||||
public void Load(string chapterName, string musicName, string difficultyName)
|
||||
|
||||
Reference in New Issue
Block a user