private void OnTriggerEnter(Collider other) { if ("Player".Equals(other.tag)) { if (!inventoryPanel.activeSelf) { inventory.ActiveDisableInventory(); } craftPanel.SetActive(true); } }
private void OnTriggerStay(Collider other) { if ("Player".Equals(other.tag) && Input.GetKey(KeyCode.E) && !isLoad) { IcarusPlayerController.Instance.IsBlockInputs = true; LoadHousePanel(); if (!inventoryPanel.activeSelf) { inventory.ActiveDisableInventory(); } housePanel.SetActive(true); for (int i = 1; i <= levels.Count; i++) { if (houseLevel == i) { if ("House(Clone)".Equals(housePanel.transform.Find("HousePanel").Find("HouseList").transform.GetChild(i - 1).name)) { Image img = housePanel.transform.Find("HousePanel").Find("HouseList").transform.GetChild(i - 1).gameObject.transform.Find("Icon").gameObject.GetComponent <Image>(); img.color = Color.green; } } } } }
public void NextStep() { if (!VerifyCompletQuest() && !verifyTuto()) { if (step < npc.Intro.Count) { //gameObject.transform.Find("Text").GetComponent<Text>().text = npc.Intro[step].Step; SetTxt(npc.Intro[step].Step); step++; } else { CloseDialog(); SetMovimentAfterStep(); if (npc.IsCraft || npc.IsQuest) { if (npc.IsQuest) { npcPanel.transform.Find("Tabs").Find("QuestTab").gameObject.SetActive(true); npcPanel.GetComponent <NpcPanel>().LoadQuest(npc.Quest); npcPanel.GetComponent <NpcPanel>().OpenQuestPanel(); } else { npcPanel.transform.Find("Tabs").Find("QuestTab").gameObject.SetActive(false); } if (npc.IsCraft) { npcPanel.transform.Find("Tabs").Find("CraftTab").gameObject.SetActive(true); npcPanel.GetComponent <NpcPanel>().LoadCraft(npc.Crafts); npcPanel.GetComponent <NpcPanel>().OpenCraftPanel(); } else { npcPanel.transform.Find("Tabs").Find("CraftTab").gameObject.SetActive(false); } if (!inventoryPanel.activeSelf) { inventory.ActiveDisableInventory(); } npcPanel.SetActive(true); IcarusPlayerController.Instance.IsBlockInputs = true; } if (npc.Quest.Count > 0) { npcPanel.GetComponent <NpcPanel>().GetQuest(npc.Quest); } } } }