예제 #1
0
파일: SoundLib.cs 프로젝트: ArtReeX/memoria
    public static void PlayMovieMusic(String movieName, Int32 offsetTimeMSec = 0)
    {
        if (SoundLib.instance == (UnityEngine.Object)null)
        {
            LogWarning("The instance is null.");
            return;
        }
        if (SoundLib.MusicIsMute)
        {
            return;
        }
        Int32 movieSoundIndex = SoundLib.GetMovieSoundIndex(movieName);

        if (movieSoundIndex != -1)
        {
            SoundLib.movieAudioPlayer.PlayMusic(movieSoundIndex, offsetTimeMSec, SoundProfileType.MovieAudio);
        }
        else
        {
            SoundLib.LogError(movieName + " not found!");
        }
    }