Exemple #1
0
    /// <summary>
    /// Refreshes the theme and mode popup values.
    /// </summary>
    protected void RefreshPopups()
    {
        InteractiveMusicTheme[] themes = themesProp.GetArray <InteractiveMusicTheme>();
        themeNames = InteractiveMusic.GetThemeNames(themes);
        InteractiveMusicTheme theme = themes.Length == 0 ? null : themes[currentThemeProp.intValue];

        modeNames = InteractiveMusic.GetModeNames(theme);
    }
Exemple #2
0
 /// <summary>
 /// Use this for initialization.
 /// </summary>
 void Start()
 {
     if (music == null)
     {
         music = (InteractiveMusic)FindObjectOfType(typeof(InteractiveMusic));
         if (music == null)
         {
             Debug.LogWarning("An instance of InteractiveMusic cannot be found.");
         }
     }
 }
Exemple #3
0
    /// <summary>
    /// Refreshes the theme and mode popup values.
    /// </summary>
    protected void RefreshPopups()
    {
        if (musicProp.objectReferenceValue == null)
        {
            themeNames     = new string[0];
            enterModeNames = new string[0];
            exitModeNames  = new string[0];
            return;
        }

        InteractiveMusicTheme[] themes = ((InteractiveMusic)musicProp.objectReferenceValue).themes;
        themeNames = InteractiveMusic.GetThemeNames(themes);
        InteractiveMusicTheme enterTheme = themes.Length == 0 ? null : themes[enterThemeProp.intValue];

        enterModeNames = InteractiveMusic.GetModeNames(enterTheme);
        InteractiveMusicTheme exitTheme = themes.Length == 0 ? null : themes[exitThemeProp.intValue];

        exitModeNames = InteractiveMusic.GetModeNames(exitTheme);
    }
Exemple #4
0
 void Start()
 {
     music = GetComponent <InteractiveMusic>();
 }
 /// <summary>
 /// Use this for initialization.
 /// </summary>
 void Start()
 {
     if (music == null)
     {
         music = (InteractiveMusic)FindObjectOfType(typeof(InteractiveMusic));
         if (music == null)
             Debug.LogWarning("An instance of InteractiveMusic cannot be found.");
     }
 }
Exemple #6
0
 void Start()
 {
     music = GetComponent<InteractiveMusic>();
 }