Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
@@ -31,9 +31,13 @@ namespace Ichni.Editor
|
||||
{
|
||||
|
||||
isPlaying = !isPlaying;
|
||||
Trail.SetAllTrails(true, false);
|
||||
|
||||
EditorManager.instance.songInformation.songTime = audioSource.time;
|
||||
if (isPlaying) audioSource.Play();
|
||||
if (isPlaying)
|
||||
{
|
||||
Trail.FreezeAllTrails(!isPlaying);
|
||||
audioSource.Play();
|
||||
}
|
||||
else PauseMusic();
|
||||
}
|
||||
public IEnumerator PlayBackMusic()
|
||||
@@ -48,15 +52,14 @@ namespace Ichni.Editor
|
||||
public void PauseMusic()
|
||||
{
|
||||
isPlaying = false;
|
||||
Trail.SetAllTrails(false, false);
|
||||
EditorManager.instance.songInformation.songTime = audioSource.time;
|
||||
audioSource.Pause();
|
||||
Trail.FreezeAllTrails(!isPlaying);
|
||||
}
|
||||
|
||||
public void StopMusic()
|
||||
{
|
||||
isPlaying = false;
|
||||
Trail.SetAllTrails(false, true);
|
||||
EditorManager.instance.songInformation.songTime = 0;
|
||||
audioSource.Stop();
|
||||
EditorManager.instance.uiManager.timeline.timePointerModule.SetRange(0);
|
||||
|
||||
Reference in New Issue
Block a user