/*public AudioClip MusicSound,ClickSound;
     *  public Texture background,blackbg;
     *  public Font rendering_font;*/

    void Awake()
    {
        DontDestroyOnLoad(gameObject);

        GM = GameManager.getInstance();

        /*
         *      GM.MusicSound = this.MusicSound;
         *      GM.ClickSound = this.ClickSound;
         *      GM.background = this.background;
         *      GM.blackbg = this.blackbg;
         *
         *
         *      GM.m_MusicSource = transform.FindChild ("Music").GetComponent<AudioSource> ();
         *      GM.m_SoundSource = transform.FindChild ("Sound").GetComponent<AudioSource> ();
         *
         *
         *      GM.m_Settings.Load (GM.m_MusicSource, GM.m_SoundSource);
         *
         *      GM.m_MusicSource.clip = GM.MusicSound;
         *      GM.m_MusicSource.Play ();
         */

        ThreadsafeDictionary <string, Texture> new_textures_dictionary = new ThreadsafeDictionary <string, Texture>();

        foreach (TextureField texture_data in texture_list)
        {
            new_textures_dictionary.Add(texture_data.key, texture_data.value);
        }
        GM.setActiveScene(SceneType.MENU);
        GM.setActiveMenu(MenuType.MENU_MAIN);
        GM.setTextures(new_textures_dictionary);
        GM.setRenderingFont(rendering_font);
        StartCoroutine(GM.showFPS());
    }
Esempio n. 2
0
 // GameManager constructor.
 public GameManager()
 {
     MenuFunctions = new GUI.WindowFunction[] {
         MainMenu,
         OptionsMenu,
         PauseMenu,
         GameOverMenu
     };
     scenes_strings = new ThreadsafeDictionary <SceneType, string>()
                      .chained_Add(SceneType.MENU, "scene_preload")
                      .chained_Add(SceneType.LEVEL1, "scene1");
     m_Settings = Settings.getInstance(); // Initialize settings object if not present and save reference to it.
     toggleGUI  = true;
     GUI_infobar_var_slide_factor = -100;
     GUIHelper.setGUIStyle("GUI_infobar_label", new GUIStyle());
 }
Esempio n. 3
0
 public void setTextures(ThreadsafeDictionary <string, Texture> new_textures_dictionary)
 {
     this.textures = new_textures_dictionary;
 }
 // Initialize the dictionary that this class encapsulates.
 public CacheManager()
 {
     cache_dictionary = new ThreadsafeDictionary <string, V>();
     lock_op          = new object();
 }