public void OnPointerClick(PointerEventData eventData) { if (xxx && _what_stage_now_cleared == this_num) //두번 눌림 //실행 { switch (this_num) { case 0: SceneManager.LoadScene(4); _stage2_con_di [0].SetActive(true); _stage2_con_di [1].SetActive(true); DontDestroyOnLoad(_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); break; case 1: SceneManager.LoadScene(11); _stage2_con_di [0].SetActive(true); _stage2_con_di [1].SetActive(true); DontDestroyOnLoad(_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); break; case 2: SceneManager.LoadScene(15); _stage2_con_di [0].SetActive(true); //Stage controller _stage2_con_di [1].SetActive(true); //Dialogue controller DontDestroyOnLoad(_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); break; case 3: break; case 4: break; case 5: break; default: break; } } if (!xxx && _what_stage_now_cleared == this_num) //처음 눌림 { GetComponent <Image> ().color = new Color(1f, 1f, 1f); mssc.Click_Once(this_num); xxx = true; } }
public void OnPointerClick(PointerEventData eventData) { if (xxx && _what_stage_now_cleared == this_num) //두번 눌림 //실행 { switch (this_num) { case 0: SceneManager.LoadScene(4); //_stage2_con_di [0].SetActive (true); _stage2_con_di [1].SetActive(true); //DontDestroyOnLoad (_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); //aa.Import (4); break; case 1: SceneManager.LoadScene(11); //_stage2_con_di [0].SetActive (true); _stage2_con_di [1].SetActive(true); //DontDestroyOnLoad (_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); //aa.Import (11); break; case 2: SceneManager.LoadScene(15); //_stage2_con_di [0].SetActive (true); _stage2_con_di [1].SetActive(true); //DontDestroyOnLoad (_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); //aa.Import (15); break; case 3: SceneManager.LoadScene(25); //_stage2_con_di [0].SetActive (true); _stage2_con_di [1].SetActive(true); //DontDestroyOnLoad (_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); //aa = GameObject.FindWithTag ("Dialogue").GetComponent<Text_Importer> (); // why???? only this one???? //aa.Import (25); break; case 4: SceneManager.LoadScene(32); //_stage2_con_di [0].SetActive (true); _stage2_con_di [1].SetActive(true); //DontDestroyOnLoad (_stage2_con_di [0]); DontDestroyOnLoad(_stage2_con_di [1]); //aa.Import (32); break; case 5: SceneManager.LoadScene(43); _stage2_con_di [1].SetActive(true); DontDestroyOnLoad(_stage2_con_di [1]); break; default: break; } } if (!xxx && _what_stage_now_cleared == this_num) //처음 눌림 { GetComponent <Image> ().color = new Color(1f, 1f, 1f); mssc.Click_Once(this_num); xxx = true; } }