forked from akanyan/mu3-mods
35 lines
941 B
C#
35 lines
941 B
C#
using MonoMod;
|
|
using MU3.Sequence;
|
|
using MU3.Util;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
namespace MU3;
|
|
|
|
class patch_BattleUI: BattleUI {
|
|
[MonoModIgnore]
|
|
private extern System.Collections.IEnumerator playReadyProc(Action onFinish);
|
|
private System.Collections.IEnumerator playReadyProcSkipped(Action onFinish) {
|
|
if(!SystemUI.Exists) {
|
|
onFinish();
|
|
yield break;
|
|
}
|
|
SystemUI systemUI = SingletonMonoBehaviour<SystemUI>.instance;
|
|
float time = 1.5f;
|
|
while(0f < time) {
|
|
yield return null;
|
|
time -= Time.deltaTime;
|
|
}
|
|
onFinish();
|
|
systemUI.removeCanvas(Graphics.Const.SortOrder.UI);
|
|
}
|
|
|
|
public new void playReady(Action onFinish) {
|
|
if(patch_PlayMusic.ForceSkipped) {
|
|
StartCoroutine(playReadyProcSkipped(onFinish));
|
|
} else {
|
|
StartCoroutine(playReadyProc(onFinish));
|
|
}
|
|
|
|
}
|
|
} |