//▲金庫の鍵が開くSEの音の出力と、SEの終了判定を併用した関数。 //▼金槌で丸棒を叩くSEの音の出力と、SEの終了判定を併用した関数。 public IEnumerator Wall_NO_3_SE_Coroutine() { Fastener_Break_SE_Only_Object = GameObject.Find("Fastener_Break"); fastener_Break_Script = Fastener_Break_SE_Only_Object.GetComponent <Fastener_Break_Script>(); fastener_Break_Script.Fastener_Break_Script_Audio_Source.PlayOneShot(fastener_Break_Script.Fastener_Break_AudioClip); while (true) { yield return(new WaitForFixedUpdate()); if (!fastener_Break_Script.Fastener_Break_Script_Audio_Source.isPlaying) { yield return(new WaitForSeconds(0.8f)); break; } } }
// Start is called before the first frame update void Start() { Door_Lock_SE_Only_Object = GameObject.Find("Door_Lock"); door_Lock_Script = Door_Lock_SE_Only_Object.GetComponent <Door_Lock_Script>(); dial_Lock_Open_Script = Dial_Lock_Open_SE_Only_Object.GetComponent <Dial_Lock_Open_Script>(); door_Lock_Script = Door_Lock_SE_Only_Object.GetComponent <Door_Lock_Script>(); fastener_Break_Script = Fastener_Break_SE_Only_Object.GetComponent <Fastener_Break_Script>(); footsteps_Script = Footsteps_SE_Only_Object.GetComponent <Footsteps_Script>(); item_Get_Script = Item_Get_SE_Only_Object.GetComponent <Item_Get_Script>(); memo_Close_Script = Memo_Close_SE_Only_Object.GetComponent <Memo_Close_Script>(); memo_Use_Script = Memo_Use_SE_Only_Object.GetComponent <Memo_Use_Script>(); safe_Box_Open_Script = Safe_Box_Open_SE_Only_Object.GetComponent <Safe_Box_Open_Script>(); chain_Script = Chain_SE_Only_Object.GetComponent <Chain_Script>(); mini_Slide_Script = Mini_Slide_SE_Only_Object.GetComponent <Mini_Slide_Script>(); stepladder_Set_Script = Stepladder_Set_SE_Only_Object.GetComponent <Stepladder_Set_Script>(); button_Push_Script = Button_Push_SE_Only_Object.GetComponent <Button_Push_Script>(); turn_The_Dial_Script = Turn_The_Dial_SE_Only_Object.GetComponent <Turn_The_Dial_Script>(); safe_Box_Key_OFF_Script = Safe_Box_Key_OFF_SE_Only_Object.GetComponent <Safe_Box_Key_OFF_Script>(); item_Box_Open_Script = Item_Box_Open_SE_Only_Object.GetComponent <Item_Box_Open_Script>(); key_turn_Script = Key_Turn_Script_SE_Only_Object.GetComponent <Key_Turn_Script>(); door_Open_Script = Door_Open_Script_SE_Only_Object.GetComponent <Door_Open_Script>(); }