private void Update() { //Apertura e chiusura inventario A if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && inventoryEnabledA) { Debug.Log("AInventario"); inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && !inventoryEnabledA) { Debug.Log("AInventario"); inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(true); } //Apertura e chiusura inventario B if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && inventoryEnabledB) { Debug.Log("BInventario"); inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && !inventoryEnabledB) { Debug.Log("BInventario"); inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(true); } }
// Update is called once per frame void Update() { //Gestione Intro if ((Time.time - timeToIntro > 50 && contaActive == 0) || skip) { skip = false; skipButton.gameObject.SetActive(false); videoIntroCamera.SetActive(false); intro.SetActive(true); Interface.SetActive(true); PlayerA.SetActive(false); PlayerB.SetActive(false); contaActive++; } if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInteract"])) { intro.SetActive(false); PlayerA.SetActive(true); PlayerB.SetActive(true); } //Gestione inventari A if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && inventoryEnabledA) { inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && !inventoryEnabledA) { inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(true); } //Gestione inventari A if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && inventoryEnabledB) { inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && !inventoryEnabledB) { inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(true); } }
// Update is called once per frame void Update() { //gestione video intro if ((Time.time - timeIntro > 64 && contaInizio == 0) || skip) { skip = false; skipButton.gameObject.SetActive(false); videoIntro.gameObject.SetActive(false); liam.gameObject.SetActive(true); remy.gameObject.SetActive(true); interfacciaUtente.gameObject.SetActive(true); descrizioneIntro.gameObject.SetActive(true); contaInizio++; } if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInteract"])) { intro.SetActive(false); } //Gestione inventario player A if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && inventoryEnabledA) { inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerAInventario"]) && !inventoryEnabledA) { inventoryEnabledA = !inventoryEnabledA; InterfaceCollectibleA.SetActive(true); } //Gestione inventario player b if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && inventoryEnabledB) { inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(false); } else if (Input.GetKeyDown(InputAssign.keyDictInteract["PlayerBInventario"]) && !inventoryEnabledB) { inventoryEnabledB = !inventoryEnabledB; InterfaceCollectibleB.SetActive(true); } }