void Start() { m_ScreenEffectMenu = GameObject.Find("MenuEffectGlobalScript").GetComponent<ScreenEffectScript>(); m_ScreenEffectMenu.Disable(); m_keybindings = new String[m_keybindings_labels.Length]; ratio_combobox = new GUIContent[3]; _4_3_combobox = new GUIContent[resolution_4_3.Length]; _16_10_combobox = new GUIContent[resolution_16_10.Length]; _16_9_combobox = new GUIContent[resolution_16_9.Length]; m_quality = new GUIContent[quality_string.Length]; menu = MainMenuSelected.NO_SELECTED; submenu = SubMenuSelected.NO_SELECTED; for (int i = 0; i < ratio_string.Length; i++) ratio_combobox[i] = new GUIContent(ratio_string[i]); for (int i = 0; i < resolution_4_3.Length; i++) _4_3_combobox[i] = new GUIContent(resolution_4_3[i]); for (int i = 0; i < resolution_16_10.Length; i++) _16_10_combobox[i] = new GUIContent(resolution_16_10[i]); for (int i = 0; i < resolution_16_9.Length; i++) _16_9_combobox[i] = new GUIContent(resolution_16_9[i]); for (int i = 0; i < quality_string.Length; i++) m_quality[i] = new GUIContent(quality_string[i]); skin.customStyles[0].hover.background = skin.customStyles[0].onHover.background = new Texture2D(2, 2); LoadKeysFromPrefs(); LoadFromPlayerPrefs("video"); m_db_handler = gameObject.AddComponent<DataBaseHandling>(); this.enabled = false; comboBoxControl.SetSelectedItemIndex(m_ratio); comboBoxQuality.SetSelectedItemIndex(quality); comboBoxResolution.SetSelectedItemIndex(m_resolution); m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }
void Start() { m_ScreenEffectMenu = GameObject.Find("MenuEffectGlobalScript").GetComponent<ScreenEffectScript>(); m_ScreenEffectMenu.Disable(); m_db_handler = gameObject.AddComponent<DataBaseHandling>(); this.enabled = false; m_Hud = GameObject.Find("HUD").GetComponent<HudScript>(); }
void Start() { m_World1 = GameObject.Find("World1"); m_World2 = GameObject.Find("World2"); m_PlayerCS = GameObject.FindGameObjectWithTag("Player").GetComponent<ControllerScript>(); m_ScreenEffet = GameObject.Find("ScreenEffectGlobalScript").GetComponent<ScreenEffectScript>(); m_PlayerJumper = GameObject.FindGameObjectWithTag("Jumper").GetComponent<JumperScript>(); Physics.IgnoreLayerCollision(8, 9); Physics.IgnoreLayerCollision(10, 8, m_CurrentWorld != 0); Physics.IgnoreLayerCollision(10, 9, m_CurrentWorld == 0); GameObject[] gos = (GameObject[])FindObjectsOfType(typeof(GameObject)); foreach (GameObject go in gos) { if (go.layer == 8 || go.layer == 9) { if (go.GetComponent<Renderer>() != null) { Color c = go.renderer.material.HasProperty("_Color") ? go.renderer.material.color : Color.black; c.a = m_CurrentWorld == 0 && go.layer == 8 || m_CurrentWorld != 0 && go.layer == 9 ? 1.0f : 0.3f; go.renderer.material.color = c; } } } m_ScreenEffet.Disable(); }