예제 #1
0
파일: Triger.cs 프로젝트: Rabioli/Tarea_2
 void OnTriggerEnter(Collider other)
 {
     if (!other.gameObject.CompareTag("restart"))
     {
         Debug.Log("Se ha tomado la carta color " + other.gameObject.name);
         obtained.Add(other.gameObject.name);
     }
     other.gameObject.SetActive(false);
     if (other.gameObject.CompareTag("restart"))
     {
         buttons.SetActive(true);
         Yellow.SetActive(true);
         Red.SetActive(true);
         Green.SetActive(true);
         Black.SetActive(true);
         Blue.SetActive(true);
         obtained.Clear();
         text = "";
         //set random card again
     }
 }
예제 #2
0
    private IEnumerator Anim()
    {
        yield return(new WaitForEndOfFrame());

        yield return(new WaitForSeconds(2f));

        Santa.SetActive(true);

        //iTween.FadeFrom(Santa, iTween.Hash("alpha", 0f, "time", 1.5f));
        //iTween.FadeFrom(Santa, iTween.Hash("alpha", 0f, "amount", 1f, "time", 1.5f));

        //iTween.ShakePosition(Santa, iTween.Hash("x", 5.0f, "time", 0.5f, "delay", 0.0f));
        //iTween.ShakePosition(Santa, iTween.Hash("y", 5.0f, "time", 0.5f, "delay", 0.0f));

        yield return(new WaitForSeconds(1.5f));

        About.SetActive(true);
        yield return(new WaitForSeconds(2.0f));

        Santa.SetActive(false);

        yield return(new WaitForSeconds(1.0f));

        Black.SetActive(false);
        Photo2.gameObject.SetActive(true);


        yield return(new WaitForSeconds(1.0f));

        StartCoroutine(AnimMouth());

        Dialog.gameObject.SetActive(true);

        Dialog.text = "Messieurs, vous etes des larves.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "Votre simple vue me donne des nausees.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "Blabla, j'aime donner du bonheur, blabla.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "Mais il faut bien trouver un remplacant au pere noel.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "La survie de notre entreprise en depend.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "Ne me decevez pas.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "...";
        yield return(new WaitForSeconds(1f));

        Dialog.text = "Livrez-moi ces produits en vitesse si vous voulez le job.";
        yield return(new WaitForSeconds(3f));

        Dialog.text = "Que le moins mauvais gagne.";
        yield return(new WaitForSeconds(4f));


        SceneManager.LoadScene("Game");
    }