public IEnumerator ending() { AudioSource a = GameObject.Find("Gamplay_FX").GetComponent <AudioSource>(); a.clip = bgm; a.Play(); GameObject x = GameObject.Find("Background01"); SpriteRenderer xx = x.GetComponent <SpriteRenderer>(); x.transform.localScale = new Vector3(4.2f, 4.2f, 0); xx.sprite = end; SoundManager s = GameObject.Find("_SoundsEmitter").GetComponent <SoundManager>(); s.fadeOut(); GameObject.Find("DialogUI").SetActive(false); VNK_FadeCamera fade = GameObject.Find("_GameManager").GetComponent <VNK_FadeCamera>(); fade.FadeOut(); yield return(new WaitForSeconds(3)); SceneManager.LoadScene(1); }
// Use this for initialization void Start() { calledNewGame = false; calledLoadGame = false; thisAudioSource = gameObject.GetComponent <AudioSource>(); camFadeComp = Camera.main.GetComponent <VNK_FadeCamera>(); }
public void detailCity(int num) {//세부 내용 isCityPopUp = true; VNK_FadeCamera fade = GameObject.Find("_GameManager").GetComponent <VNK_FadeCamera>(); fade.FadeIn(); //alice, amelia, ben, denver, haley, innes, liam, revy, sydney, thiery, double[,] pos = { { 78.41, 37.7, 0.22, 71.79, 0.0f, 28.3, 63.6, 73.53, 0.0f, 26.7 }, //1,2 { 75.29, 37.7, 0.22, 78.3, 0.0f, 28.3, 63.6, 0.0f, 0.0f, 71.79 }, //3,4 { 73.29, 37.7, 0.22, 74.79, 71.79, 28.3, 63.6, 0.0f, 0.0f, 0.0f }, //5 { 0.0f, 37.7, 4.22, 0.0f, 0.0f, 73.29, 63.6, 0.0f, 0.0f, 71.79 }, //6,7,8 인파는 빠짐 { 78.41, 37.7, 0.22, 0.0f, 0.0f, 28.3, 63.6, 0.0f, 73.00, 26.7 }, //9,10 { 77.00, 37.7, 10.22, 71.00, 69.50, 0.22, 63.6, 75.00, 1.72, -1.72 } }; //11~16 bgm.clip = street; //브금 바뀜. //bgm.volume=1; bgm.Play(); SoundManager s = GameObject.Find("_SoundsEmitter").GetComponent <SoundManager>(); StartCoroutine(s.fadeIn()); backGround.sprite = cityImage; //배경 이미지 바뀜 backGround.transform.localScale = new Vector3(4.5f, 4.5f, 1); //배경크기 조정 backGround.transform.localPosition = new Vector3(35.4f, 1, backGround.transform.localPosition.z); player.SetActive(true); ground.SetActive(true); cM.target = cameraTarget;//카메라 조정 cM.enabled = true; // dialogUI.SetActive(false); p.rangeLeft = 3;//플레이어가 움직일 수 있는 범위 조정 p.rangeRight = 62.7f; building.SetActive(true); //캐릭터들을 띠운다. //캐릭터들의 위치를 지정해준다. for (int i = 0; i < 10; i++) { if (pos[num, i] != 0) { charPrefab[i].SetActive(true); charPrefab[i].transform.localPosition = new Vector3((float)pos[num, i], charPrefab[i].transform.localPosition.y, 10.0f); } } building.SetActive(true);//건물을 보이게 한다. }
// Use this for initialization void Start() { calledNewGame = false; calledLoadGame = false; thisAudioSource = gameObject.GetComponent<AudioSource>(); camFadeComp = Camera.main.GetComponent<VNK_FadeCamera>(); }