// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0) && !pauseState.GamePaused()) { Ray ray = cam.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { Plataforma ground = hit.collider.GetComponent <Plataforma>(); if (ground != null) { interaccioPlataforma(ground); } ArtefactController artefact = hit.collider.GetComponent <ArtefactController>(); if (artefact != null) { artefact.setLvlArt(numLevel); playSound(0); } GemController gem = hit.collider.GetComponent <GemController>(); if (gem != null) { Debug.Log("ieee"); gem.getGem(numLevel); playSound(0); } /*ButtonPlatform button = hit.collider.GetComponent<ButtonPlatform>(); * if(button != null) * if (button.platform.entity != null) * if (button.platform.entity.tag == "Player") * foreach (MovingPlatform movingPlatform in button.movingPlatforms) * movingPlatform.Interacciona();*/ } } }