Ejemplo n.º 1
0
    /// <summary>
    /// Checks if music in lobby is being played or not.
    /// <returns> true if music is being played.</returns>
    /// </summary>
    public static bool isLobbyMusicPlaying()
    {
        // Checks if an audiosource or a track by sunvox is being played(Since there are two diiferent ways to play tracks)
        if (currentLobbyAudioSource != null && currentLobbyAudioSource.isPlaying ||
            !(SunVox.sv_end_of_song((int)Slot.Music) == 1))
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 2
0
 private void FixedUpdate()
 {
     if (SunVox.sv_end_of_song(0) == 0)
     {
         Debug.LogFormat("Line counter: {0} Module 7 -> {1} = {2}",
                         (float)SunVox.sv_get_current_line2(0) / 32,
                         Marshal.PtrToStringAnsi(SunVox.sv_get_module_ctl_name(0, 7, 1)), //Get controller name
                         SunVox.sv_get_module_ctl_value(0, 7, 1, 0)                       //Get controller value
                         );
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Checks if music in lobby is being played or not.
 /// <returns> true if music is being played.</returns>
 /// </summary>
 public static bool isLobbyMusicPlaying()
 {
     if (Instance.currentLobbyAudioSource != null &&
         Instance.currentLobbyAudioSource.isPlaying ||
         !(SunVox.sv_end_of_song((int)Slot.Music) == 1))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Checks if music is being played or not.
 /// <returns> true if music is being played.</returns>
 /// </summary>
 public static bool isMusicPlaying()
 {
     if (Instance.musicAudioSource != null &&
         Instance.musicAudioSource.isPlaying ||
         (SunVox.sv_end_of_song((int)Slot.Music) != 0))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 5
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         if (SunVox.sv_end_of_song(0) == 1)
         {
             SunVox.sv_play(0);
         }
         else
         {
             SunVox.sv_stop(0);
         }
     }
 }