private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Throwable") && dsg.getCollectedStarts() == dsg.getNbStarsInGame()) { collision.gameObject.GetComponent <Rigidbody>().velocity = Vector3.zero; SteamVR_LoadLevel.Begin(sceneLoading); } }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Throwable") && dsg.getCollectedStarts() == dsg.getNbStarsInGame()) { collision.gameObject.GetComponent <Rigidbody>().velocity = Vector3.zero; canvas.transform.GetChild(0).GetComponent <Image>().sprite = victorySprite; canvas.SetActive(true); } }