mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:27:40 +02:00
Fixed some play and pause bugs in the editor
This commit is contained in:
@ -40,6 +40,15 @@ namespace RhythmHeavenMania.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
if (Conductor.instance.NotStopped())
|
||||
{
|
||||
startPosition = Vector2.zero;
|
||||
endPosition = Vector2.zero;
|
||||
DrawVisual();
|
||||
SelectEvents();
|
||||
return;
|
||||
}
|
||||
|
||||
// click
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
|
@ -92,13 +92,14 @@ namespace RhythmHeavenMania.Editor
|
||||
public void SelectGame(string gameName, int index)
|
||||
{
|
||||
mg = EventCaller.instance.minigames.Find(c => c.displayName == gameName);
|
||||
transform.GetChild(index).GetChild(0).gameObject.SetActive(true);
|
||||
SelectedMinigame = gameName;
|
||||
gameOpen = true;
|
||||
|
||||
DestroyEvents();
|
||||
AddEvents();
|
||||
|
||||
transform.GetChild(index).GetChild(0).gameObject.SetActive(true);
|
||||
|
||||
currentEventIndex = 0;
|
||||
UpdateIndex(0, false);
|
||||
|
||||
|
@ -66,8 +66,17 @@ namespace RhythmHeavenMania.Editor
|
||||
else
|
||||
PlayCheck(true);
|
||||
});
|
||||
PauseBTN.onClick.AddListener(delegate { PlayCheck(false); });
|
||||
StopBTN.onClick.AddListener(delegate { PlayCheck(true); });
|
||||
PauseBTN.onClick.AddListener(delegate
|
||||
{
|
||||
if (Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|
||||
PlayCheck(false);
|
||||
});
|
||||
StopBTN.onClick.AddListener(delegate
|
||||
{
|
||||
if (Conductor.instance.isPlaying || Conductor.instance.isPaused)
|
||||
PlayCheck(true);
|
||||
});
|
||||
|
||||
MetronomeBTN.onClick.AddListener(delegate
|
||||
{
|
||||
if (!Conductor.instance.metronome)
|
||||
@ -164,7 +173,7 @@ namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
if (fromStart)
|
||||
{
|
||||
if (!Conductor.instance.isPlaying)
|
||||
if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|
||||
{
|
||||
Play(false, TimelineSlider.transform.localPosition.x);
|
||||
}
|
||||
@ -178,9 +187,16 @@ namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
if (!Conductor.instance.isPlaying)
|
||||
{
|
||||
Play(false, TimelineSongPosLine.transform.localPosition.x);
|
||||
if (TimelineSongPosLine == null)
|
||||
{
|
||||
Play(false, TimelineSlider.transform.localPosition.x);
|
||||
}
|
||||
else
|
||||
{
|
||||
Play(false, TimelineSongPosLine.transform.localPosition.x);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!Conductor.instance.isPaused)
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
|
@ -13,11 +13,11 @@
|
||||
"Layer3Col": "06d6a0",
|
||||
"Layer4Col": "118ab2",
|
||||
|
||||
"EventSelectedCol": "ffbc36",
|
||||
"EventSelectedCol": "61e5ff",
|
||||
"EventNormalCol": "FFFFFF",
|
||||
|
||||
"BeatMarkerCol": "ffbc36",
|
||||
"CurrentTimeMarkerCol": "ffc95c",
|
||||
"BeatMarkerCol": "61e5ff",
|
||||
"CurrentTimeMarkerCol": "61e5ff",
|
||||
|
||||
"BoxSelectionCol": "61e5ff",
|
||||
"BoxSelectionOutlineCol": "61e5ff"
|
||||
|
Reference in New Issue
Block a user