示例#1
0
    public IEnumerator Restamelo()
    {
        yield return(new WaitForSeconds(puntoresta));

        PuntajeController4.AgregarPuntos(puntosLess);
        StartCoroutine("Restamelo");
    }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (JugadorEnZona)
     {
         SuenaMusica();
         record = GameObject.Find("textoPunto").GetComponent <PuntajeController4>();
         PlayerPrefs.SetInt("score4", record.puntaje2);
         Application.LoadLevel(Menu);
     }
 }
示例#3
0
    void OnTriggerEnter2D(Collider2D cogiste)
    {
        AudioClip clip;

        if (cogiste.gameObject.name == "Player")
        {
            PuntajeController4.AgregarPuntos(puntosAdd);
            gameObject.GetComponent <AudioSource>().playOnAwake = false;
            clip = gameObject.GetComponent <AudioSource>().clip;
            AudioSource.PlayClipAtPoint(clip, new Vector3(0, 0, 0));
            Destroy(gameObject);
        }
    }