IEnumerator restoretownstate() { questCompleted(); ScreenFader sf = GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>(); yield return(StartCoroutine(sf.FadeToBlack())); npCont.set1State(true); npCont.set2State(false); mc.switchTrack(1); yield return(StartCoroutine(sf.FadeToClear())); }
IEnumerator restoretownstate() { questCompleted(); ScreenFader sf = GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>(); yield return(StartCoroutine(sf.FadeToBlack())); theCompanion.gameObject.SetActive(true); theCompanion.transform.position = cposition.position; theCompanion.canMove = false; theCompanion.incutscene = true; theCompanion.moveDirection.y = 1; npcController npCont = GameObject.FindObjectOfType <npcController>().GetComponent <npcController>(); npCont.set1State(true); npCont.set2State(false); zCont.zone1State(false); zCont.battleOn(false); theTrader.transform.position = tposition.position; mc.switchTrack(1); yield return(StartCoroutine(sf.FadeToClear())); }
// Update is called once per frame void Update() { if (mc == null) { mc = FindObjectOfType <musicController>(); } if (xpm == null) { xpm = FindObjectOfType <experienceManager>(); } if (questIndex == 2) { if (bananaCount == 5) { questCompleted(); } } if (questIndex == 5) { if (wolfcount == 3) { npcController npCont = GameObject.FindObjectOfType <npcController>().GetComponent <npcController>(); npCont.set1State(false); npCont.set2State(true); zCont.zone1State(true); wolfcount = 0; questCompleted(); } } if (questIndex == 7) { if (wolfcount == piratemax) { Debug.Log("in"); for (int x = 0; x < piratesc.Length; x++) { piratesc[x].canMove = false; } dMan.textLines = lines; dMan.textimage = img; dMan.textName = charac; dMan.img = img; dMan.images = images; if (!dMan.dialogActive && !istriggered) { dMan.showDialogue(); dMan.currentLine = 0; istriggered = true; wolfcount = 0; } } if (!dMan.dialogActive && istriggered) { StartCoroutine("restoretownstate"); } } }