public void OnMouseEnter() { if (Input.GetMouseButton(0)) { player.stopMove(); } //Debug.LogWarning ("Stop? Go?: " + player.canWalk); if (player != null && !wall) { if (player.canWalk) { GameManager.Instance.updateMouseIcon(mouseOverIcon); } } }
public void revealItem() { player.talking = true; player.stopMove(); SoundManager.Instance.StopWalk(); Dialoguer.StartDialogue((int)convoID); clickedOnSomething = false; Instantiate(iHoldThis, new Vector3(transform.localPosition.x, transform.localPosition.y, -1), Quaternion.identity); //journal.SendMessage("addObject", iHoldThis); Destroy(this.gameObject); GameManager.Instance.updateMouseIcon(mouseOverIcon); }
void playDialogue() { if (dialogue.Length != 0) { Dialoguer.StartDialogue((int)dialogue[curDia]); if (player != null) { player.stopMove(); player.talking = true; } } }
//No longer toggles. void journalAccusationPanelToggle(GameObject button) { if (button == journalButton) { playerScript player = (playerScript)FindObjectOfType(typeof(playerScript)); if (inMenu) { player.stopMove(); player.canWalk = true; player.talking = false; Time.timeScale = 1f; inMenu = false; Debug.LogWarning("Ding"); } else { player.stopMove(); player.talking = true; inMenu = true; Debug.LogWarning("Dong"); Time.timeScale = 0f; } } }
IEnumerator wait() { if (!startEnd) { if (gotThem()) { GameManager.dialogueJustFinished = false; Dialoguer.StartDialogue((int)dialogue [curDia]); playerScript player = FindObjectOfType(typeof(playerScript)) as playerScript; player.stopMove(); startEnd = !startEnd; SoundManager.Instance.Play2DMusic(playMe); //Debug.Log (debugMe); } } else { if (GameManager.dialogueJustFinished && curDia < dialogue.Length - 1) { GameManager.dialogueJustFinished = false; curDia++; Dialoguer.StartDialogue((int)dialogue [curDia]); } else if ((int)dialogue [curDia] >= 0 && GameManager.dialogueJustFinished && curDia == dialogue.Length - 1) { if (player != null) { player.canWalk = false; } yield return(new WaitForSeconds(waitThisLong)); GameManager.Instance.playerInScene = isTherePlayer; done = true; if (isTherePlayer) { GameManager.Instance.SetMainCharacter(whatCharacter); GameManager.Instance.SetNextX(spawnHereAfter.x); GameManager.Instance.SetNextX(spawnHereAfter.y); } GameManager.dialogueJustFinished = false; Application.LoadLevel(nextLevel); } } }
IEnumerator wait(){ SoundManager.Instance.Play2DMusic (playMe); if (dialogue.Length != 0) { if (!GameManager.dialogueJustFinished) { player = (playerScript)FindObjectOfType (typeof(playerScript)); if (player != null) { player.stopMove (); player.talking = true; //Debug.LogWarning("TALKING"); } } if (GameManager.dialogueJustFinished && curDia < dialogue.Length - 1) { GameManager.dialogueJustFinished = false; curDia ++; Dialoguer.StartDialogue ((int)dialogue [curDia]); } else if ((int)dialogue [curDia] >= 0 && GameManager.dialogueJustFinished && curDia == dialogue.Length - 1) { if (waitThisLong != -1) { if (player != null) player.canWalk = false; yield return new WaitForSeconds (waitThisLong); done = true; GameManager.Instance.playerInScene = isTherePlayer; if (isTherePlayer) { //Debug.Log ("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter (whatCharacter); GameManager.Instance.SetNextX (spawnHereAfter.x); GameManager.Instance.SetNextY (spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk (); Application.LoadLevel (nextLevel); } } else if (dialogue [curDia].Equals (Convo.ch0none)) { if (waitThisLong != -1) { yield return new WaitForSeconds (waitThisLong); GameManager.Instance.playerInScene = isTherePlayer; done = true; if (isTherePlayer) { if (!GameManager.Instance.playerInScene) { GameManager.Instance.playerInScene = true; } Debug.Log ("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter (whatCharacter); GameManager.Instance.SetNextX (spawnHereAfter.x); GameManager.Instance.SetNextY (spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk (); Application.LoadLevel (nextLevel); } } } else if (waitThisLong != -1) { yield return new WaitForSeconds (waitThisLong); done = true; GameManager.Instance.playerInScene = isTherePlayer; if (isTherePlayer) { //Debug.Log ("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter (whatCharacter); GameManager.Instance.SetNextX (spawnHereAfter.x); GameManager.Instance.SetNextY (spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk (); Application.LoadLevel (nextLevel); } }
IEnumerator wait() { SoundManager.Instance.Play2DMusic(playMe); if (dialogue.Length != 0) { if (!GameManager.dialogueJustFinished) { player = (playerScript)FindObjectOfType(typeof(playerScript)); if (player != null) { player.stopMove(); player.talking = true; //Debug.LogWarning("TALKING"); } } if (GameManager.dialogueJustFinished && curDia < dialogue.Length - 1) { GameManager.dialogueJustFinished = false; curDia++; Dialoguer.StartDialogue((int)dialogue [curDia]); } else if ((int)dialogue [curDia] >= 0 && GameManager.dialogueJustFinished && curDia == dialogue.Length - 1) { if (waitThisLong != -1) { if (player != null) { player.canWalk = false; } yield return(new WaitForSeconds(waitThisLong)); done = true; GameManager.Instance.playerInScene = isTherePlayer; if (isTherePlayer) { //Debug.Log ("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter(whatCharacter); GameManager.Instance.SetNextX(spawnHereAfter.x); GameManager.Instance.SetNextY(spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk(); Application.LoadLevel(nextLevel); } } else if (dialogue [curDia].Equals(Convo.ch0none)) { if (waitThisLong != -1) { yield return(new WaitForSeconds(waitThisLong)); GameManager.Instance.playerInScene = isTherePlayer; done = true; if (isTherePlayer) { if (!GameManager.Instance.playerInScene) { GameManager.Instance.playerInScene = true; } Debug.Log("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter(whatCharacter); GameManager.Instance.SetNextX(spawnHereAfter.x); GameManager.Instance.SetNextY(spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk(); Application.LoadLevel(nextLevel); } } } else if (waitThisLong != -1) { yield return(new WaitForSeconds(waitThisLong)); done = true; GameManager.Instance.playerInScene = isTherePlayer; if (isTherePlayer) { //Debug.Log ("Setting nexts to " + spawnHereAfter.x + " and " + spawnHereAfter.y); GameManager.Instance.SetMainCharacter(whatCharacter); GameManager.Instance.SetNextX(spawnHereAfter.x); GameManager.Instance.SetNextY(spawnHereAfter.y); } GameManager.dialogueJustFinished = false; SoundManager.Instance.CantWalk(); Application.LoadLevel(nextLevel); } }