//----------------------------------------------------- public void SetSelectorMode() { //guiTexture.texture = mSelectorBgTex; mLogoGUItex.enabled = false; mMode = BgridMode.selector; RescaleGuiTexture(); //Debug.Log (DEBUGTAG+"SELECTOR MODE"); }
//----------------------------------------------------- public void SetMenuMode() { GetComponent<GUITexture>().color = Color.gray; GetComponent<GUITexture>().pixelInset.Set(0, 0, Screen.width, Screen.height); //guiTexture.texture = mMenuBgTex; if(PlayerPrefs.HasKey("BG")) { allowBg(PlayerPrefs.GetString("BG")); } else { allowRandomBg(PlayerPrefs.HasKey("BGCross")); if(PlayerPrefs.HasKey("BGCross")) { PlayerPrefs.DeleteKey("BGCross"); } } mLogoGUItex.enabled = true; mMode = BgridMode.mainmenu; Camera.main.GetComponent<Mode2D>().DestroyObjectCopy (); mNeedRescale = true; Debug.Log (DEBUGTAG+"MENU MODE"); }
//----------------------------------------------------- public void SetMontageMode() { if(PlayerPrefs.HasKey("BG")) { PlayerPrefs.DeleteKey("BG"); } GetComponent<GUITexture>().texture = mMontageBgTex; GetComponent<GUITexture>().color = mMontageTexTint; mLogoGUItex.enabled = false; mMode = BgridMode.montage; RescaleGuiTexture(); // Debug.Log (DEBUGTAG+"MONTAGE MODE"); GameObject.Find("camPivot").GetComponent<SceneControl>().saveBkup(); }
//----------------------------------------------------- public void SetLoadingMode() { GetComponent<GUITexture>().color = Color.gray; if(PlayerPrefs.HasKey("BG")) { allowBg(PlayerPrefs.GetString("BG")); } else { allowRandomBg(); } if(mLogoGUItex != null) { mLogoGUItex.enabled = true; } else if(!PlayerPrefs.HasKey("BG")) { PlayerPrefs.SetString("BG", GetComponent<GUITexture>().texture.name); PlayerPrefs.SetInt("BGCross", 0); } mMode = BgridMode.loading; RescaleGuiTexture(); // Debug.Log (DEBUGTAG+"MENU MODE"); }