Ejemplo n.º 1
0
    private void MoveCurrentSong(FolderHotkeyMappingInternal folderMapping)
    {
        if (m_isImporting || !m_songPlayer.IsPlaying)
        {
            m_statusText.text = "[ SYSTEM ] Cannot move song while it is still loading!";
            return;
        }

        m_songPlayer.StopPlayback();
        StartCoroutine(TryMoveFile(m_currentFilePath, folderMapping.AbsoluteFolderPath + "\\" + Path.GetFileName(m_currentFilePath)));
        m_statusText.text = $"[ SYSTEM ] Moved {Path.GetFileName(m_currentFilePath)} to {new DirectoryInfo(folderMapping.AbsoluteFolderPath).Name}";
        Debug.Log($"Moved {Path.GetFileName(m_currentFilePath)} to {new DirectoryInfo(folderMapping.AbsoluteFolderPath).Name}");

        if (folderMapping.UiSoundClip)
        {
            m_uiSound.clip = folderMapping.UiSoundClip;
        }
        else
        {
            m_uiSound.clip = m_defaultUiSound;
        }

        m_uiSound.Play();
        InitializeNextSong();
    }