private void OnGUI() { if (inTrigger) { if (open) { OpenLog.TryCloserDoor(); OpenLog.KeyOk(); OpenLog.DoorClose(); } else { if (doorKey) { OpenLog.DoorOpen(); OpenLog.KeyOk(); OpenLog.CloserDoorComplert(); } else { OpenLog.KeyPlase(); OpenLog.DoorClose(); OpenLog.CloserDoorComplert(); } } } }
public void OnTriggerStay(Collider player) { if (!isOpen) { OpenLog.DoorOpen(); if (player.gameObject.tag == "Player" && Input.GetKeyDown(KeyCode.E)) { isOpen = true; audioSource.Play(); OpenLog.DoorClose(); boorAni.SetTrigger("Open"); } } }
public void OnTriggerStay(Collider player) { if (!isOpen) { OpenLog.DoorOpen(); if (player.gameObject.tag == "Player" && Input.GetKeyDown(KeyCode.E)) { isOpen = true; SE.clip = playSe; SE.Play(); OpenLog.DoorClose(); ChestAni.SetTrigger("Open"); } } if (isOpen && objet != null) { objet.SetActive(true); } }