Exemplo n.º 1
0
        private AudioClip GetNextClip()
        {
            switch (state)
            {
            case States.MainThemeLoop:
                if (currentRequest == ThemeRequests.SleepTheme)
                {
                    state = States.MainOuttro;
                    return(MainThemeOutro);
                }
                else
                {
                    return(MainTheme);
                }

            case States.MainOuttro:
                if (currentRequest == ThemeRequests.SleepTheme)
                {
                    state          = States.SleepTheme;
                    currentRequest = ThemeRequests.None;
                    return(SleepTheme);
                }
                else
                {
                    state          = States.MainThemeLoop;
                    currentRequest = ThemeRequests.None;
                    return(MainTheme);
                }

            case States.SleepTheme:
                if (currentRequest == ThemeRequests.MainTheme)
                {
                    state          = States.MainThemeLoop;
                    currentRequest = ThemeRequests.None;
                    return(MainTheme);
                }
                else
                {
                    return(SleepTheme);
                }

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
 public void CueSleepTheme()
 {
     currentRequest = ThemeRequests.SleepTheme;
 }
Exemplo n.º 3
0
 public void CueMainTheme()
 {
     currentRequest = ThemeRequests.MainTheme;
     //themeSource.volume = fadeCurve.Evaluate((currentTime / timeToFade));
 }