// Update is called once per frame void Update() { #if DEV_MODE if (Input.GetKeyDown(KeyCode.F2)) { AudioManager.instance.Play("button22"); devMode.SetActive(!devMode.activeSelf); } #endif if (theDB.bookActivated && !(thePlayer.notMove && !theBook.book.activeSelf && !(thePlayer.isPlayingGame || thePlayer.isPlayingPuzzle)) && !thePlayer.isChased && !redAlert.activeSelf) { //if(!((thePlayer.notMove&&!thePlayer.isPlayingGame&&!thePlayer.isPlayingPuzzle)||thePlayer.isChased||redAlert.activeSelf)){ //if(theDB.bookActivated&&!thePlayer.isWakingup&&!thePlayer.isInteracting&&!thePlayer.isChased){ if (Input.GetKeyDown(KeyCode.Q)) { if (!theBook.book.activeSelf) { theBook.BookOn(); } else if (theBook.paper.activeSelf) { theBook.BookOff(); } theBook.OnPaper(); } if (Input.GetKeyDown(KeyCode.I)) { if (!theBook.book.activeSelf) { theBook.BookOn(); } else if (theBook.item.activeSelf) { theBook.BookOff(); } theBook.OnItem(); } if (Input.GetKeyDown(KeyCode.M)) { if (!theBook.book.activeSelf) { theBook.BookOn(); } else if (theBook.map.activeSelf) { theBook.BookOff(); } theBook.OnMap(); } if (Input.GetKeyDown(KeyCode.Escape)) { if (manual.activeSelf) { PopUpHelp(); } else if (makerInfo.activeSelf) { makerInfo.SetActive(false); } else if (!theBook.book.activeSelf) { theBook.BookOn(); } else if (theBook.setting.activeSelf) { theBook.BookOff(); } theBook.OnSetting(); } if (Input.GetKeyDown(KeyCode.Tab)) { if (theBook.book.activeSelf) { if (theBook.paper.activeSelf) { theBook.OnItem(); } else if (theBook.item.activeSelf) { theBook.OnMap(); } else if (theBook.map.activeSelf) { theBook.OnSetting(); } else if (theBook.setting.activeSelf) { theBook.OnPaper(); } } } if (Input.GetKeyDown(KeyCode.F1)) { PopUpHelp(); } /* * if(theBook.book.activeSelf && Input.GetKeyDown(KeyCode.Tab)){ * if(theBook.paper.activeSelf){ * theBook.OnItem(); * } * else if(theBook.item.activeSelf){ * theBook.OnMap(); * } * else if(theBook.map.activeSelf){ * theBook.OnSetting(); * } * else if(theBook.setting.activeSelf){ * theBook.OnPaper(); * } * }*/ } // if(Input.GetKeyDown(KeyCode.F8)){ // loadFading(); // } }