Esempio n. 1
0
 void Awake()
 {
     if (singleton == null)
     {
         singleton = this;
     }
     else if (singleton != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        // 1G

        SYSTEM_AUDIO_ANALYZER    = k514AudioAnalyzer.singleton;
        SYSTEM_MATH_MANAGER      = k514MathManager.singleton;
        SYSTEM_SPECTRUM_MANAGER  = k514SpectrumManager.singleton;
        SYSTEM_PATTERN_MANAGER   = k514PatternCatchManager.singleton;
        SYSTEM_YOUTUBE_DATA      = AudioAnalyzePreset.singleton;
        SYSTEM_SOUND_MANAGER     = k514SoundManager.singleton;
        SYSTEM_ENEMY_SPAWNER     = k514EnemySpawner.singleton;
        SYSTEM_PATTERN_GENERATOR = k514PatternGenerator.singleton;

        // 2G

        SYSTEM_YOUTUBE_CONNECTOR = YoutubeSearcher.singleton;
        SYSTEM_YOUTUBE_MANAGER   = k514YoutubeManager.singleton;


        Debug.Log("System Manager loaded");
    }