// Start is called before the first frame update void Start() { ts = gameController.GetComponent <targetScript>(); audioSound = gameController.GetComponent <AudioSource>(); countScript = countDownScriptObj.GetComponent <countdownTimer>(); bs = gameController.GetComponent <balanceScript>(); }
//public GameObject rightHand; //SteamVR_LaserPointer laserScript; // Start is called before the first frame update void Start() { PlayerPrefs.SetInt("balance", balance); balanceText = balanceTextObj.GetComponent <Text>(); ts = GetComponent <targetScript>(); bs = GetComponent <basketballScore>(); //laserScript = rightHand.GetComponent<SteamVR_LaserPointer>(); }
// Update is called once per frame void FixedUpdate() { if (Time.time > currentSpawnRate) { StartCoroutine(SetSpawn()); currentSpawnRate = Time.time + spawnRate; } if (pontos == nObjetivo) { currentTimeLevel = timeLevel; nLevel++; nObjetivo = nLevel * 2 + 2; pontos = 0; //SceneManager.LoadScene ("Cena"); targetScript scriptTarget = targetGO.GetComponent <targetScript> (); scriptTarget.ResetLevel(); } if (currentTimeLevel == 0) { //currentTimeLevel = timeLevel; objeto.SetActive(true); if (!timeOut) { tempoScale(); } timeOut = true; } else if (Time.time > currentTempo + 1) { currentTimeLevel--; currentTempo = Time.time; } txtPotos.text = pontos.ToString() + "/" + nObjetivo.ToString(); txtTempo.text = currentTimeLevel.ToString(); }
// Start is called before the first frame update void Start() { timeText = GetComponent <Text>(); gameOverText.SetActive(false); ts = gameController.GetComponent <targetScript>(); }