void Clos() { if (Active == true) { Inv.SetActive(false); FireplacePart.SetActive(false); InfoPart.SetActive(true); CtrlPart.SetActive(true); RightFinger.SetActive(true); InventoryScript.InvOpn = false; Hit.collider.gameObject.GetComponent <FirePlaceScript>().Active = false; } }
public void Us() { Ray ray = Cam.ScreenPointToRay(Center); if (Physics.Raycast(ray, out Hit, 3F) && Hit.collider.tag == "Fireplace") { Hit.collider.gameObject.GetComponent <FirePlaceScript>().Active = true; if (Active == true) { Inv.SetActive(true); FireplacePart.SetActive(true); InfoPart.SetActive(false); CtrlPart.SetActive(false); RightFinger.SetActive(false); InventoryScript.InvOpn = true; } } }