Ejemplo n.º 1
0
 // 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>();
 }
Ejemplo n.º 2
0
 //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>();
 }
Ejemplo n.º 3
0
    // 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();
    }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     timeText = GetComponent <Text>();
     gameOverText.SetActive(false);
     ts = gameController.GetComponent <targetScript>();
 }