private void MenuTabToggle() { if (Input.GetKeyDown(KeyCode.I) || Input.GetKeyDown(KeyCode.Tab))//Inventory menu toggle via tab button { if (storycheck.DemoMode == true) { if (inventory.activeSelf == false) { this.gameObject.GetComponent <CharControl>().sfxControlScript.InventoryOpen(); //play sound effect of opening the inventory Controller.FreezeCam(); inventory.SetActive(true); Cursor.visible = true; info.enabled = true; } else { this.gameObject.GetComponent <CharControl>().sfxControlScript.InventoryClose(); //play sound effect of opening the inventory Controller.UnfreezeCam(); inventory.SetActive(false); Cursor.visible = false; info.enabled = false; } } else if (storycheck.DemoMode == false) { if (inventory2.activeSelf == false) { this.gameObject.GetComponent <CharControl>().sfxControlScript.InventoryOpen(); //play sound effect of opening the inventory Controller.FreezeCam(); inventory2.SetActive(true); Cursor.visible = true; tabs.SetActive(true); notice.GetComponent <NoticeScript>().Close(); //info.enabled = true; } else { this.gameObject.GetComponent <CharControl>().sfxControlScript.InventoryClose(); //play sound effect of opening the inventory Controller.UnfreezeCam(); inventory2.SetActive(false); Cursor.visible = false; tabs.SetActive(false); //info.enabled = false; } } } if (Input.GetKeyDown(KeyCode.C) && Input.GetKeyDown(KeyCode.T)) { if (Cheats.activeSelf == false) { Cheats.SetActive(true); Cursor.visible = true; Controller.FreezeCam(); Controller.sfxControlScript.ButtonIn(); } else if (Cheats.activeSelf == true) { Cheats.SetActive(false); Cursor.visible = false; Controller.UnfreezeCam(); Controller.sfxControlScript.ButtonOut(); } } }
void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Monika" || other.gameObject.tag == "Everett" || other.gameObject.tag == "Felicia" || other.gameObject.tag == "Bone" || other.gameObject.tag == "Fauna" || other.gameObject.tag == "Waylon" || other.gameObject.tag == "Adley" || other.gameObject.tag == "Ezra" || other.gameObject.tag == "Pippin" || other.gameObject.tag == "Lorelei") { currentcharacter = other.gameObject.tag; if (Input.GetButtonDown("talk") && charControlScript.isGrounded) //Kris' code - there were instances where the player would be floating mid air when talking { Cursor.visible = true; charControlScript.FreezeCam(); sfxControlScript.ButtonIn(); //play button SFX animController.SetInteger("Movement", 0); talking = true; avatar.enabled = false; //avatar.jumpVelocity = 0f;//so that skipping through dialogue wont make character jump //PressE.enabled = false; PressEIcon.enabled = false; if (DemoMode == true)//this may be temporary as we may have this dialogue at the start of the end product { if (other.gameObject.tag == "Monika") { switch (progression) { case 0: flowchart.ExecuteBlock("Monika Intro"); //just put down the name of the fungus block break; case 1: flowchart.ExecuteBlock("Flower quest"); achievements.flowerready = true; break; case 2: flowchart.ExecuteBlock("Find some items"); break; case 3: flowchart.ExecuteBlock("Monika Q&A"); break; } } if (other.gameObject.tag == "Bone") { if (DemoMode == true)//this may be temporary as we may have this dialogue at the start of the end product { if (Input.GetButton("talk")) { avatar.enabled = false; //PressE.enabled = false; PressEIcon.enabled = false; if (progressionBone == 10) { progressionBone = 1; } Boneflowchart.SetIntegerVariable("Prog", progressionBone); Boneflowchart.ExecuteBlock("Bone dialogue"); } } } } else { //Debug.LogError("dis aint supposed to work"); story.Dialogue(other.gameObject.tag); dayNightScript.isTalking = true; } } } /*else * { * PressE.enabled = false; * }*/ }