Exemplo n.º 1
0
    void sendRandomNotification()
    {
        int    index    = random.Next(0, messages.Length);
        String mensagem = messages[index];

        MyNotifications.CallNotification(mensagem, 3);
    }
Exemplo n.º 2
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.CompareTag(GameManager.PLAYER_TAG))
     {
         CNHManager.points = CNHManager.REMOVE_ALL_POINTS;
         MyNotifications.CallNotification(MyNotifications.RUN_OVER_PEDESTRIAN_MESSAGE, 10);
     }
 }
Exemplo n.º 3
0
    IEnumerator moja()
    {
        yield return(new WaitForSeconds(1));

        MyNotifications.CallNotification("Hello World!", 3);
        MyNotifications.CallNotification("MyNotifications", 4);
        MyNotifications.CallNotification("Goodbye World!", 3);
    }
Exemplo n.º 4
0
 public void FastenBelt()
 {
     if (!beltFastened)
     {
         beltFastened = true;
         MyNotifications.CallNotification(MyNotifications.SEAT_BELT_MESSAGE, 3);
         points += CNHManager.POINTS_WITH_SEAT_BELT;
         print("apertou cinto: " + CNHManager.points);
     }
 }
Exemplo n.º 5
0
    // Update is called once per frame
    void Update()
    {
        if (DateTime.Compare(changedHole.AddSeconds(SECONDS_CHANGE_HOLES), DateTime.Now) < 0)
        {
            changeHoles();
        }

        if (1 == random.Next(1, 2000))
        {
            sendRandomNotification();
        }

        if (alcoolQuantity > 0)
        {
            staticVisaoNormal = visaoDificultada;
            alcoolQuantity--;
            alcool = true;
        }
        else
        {
            staticVisaoNormal = visao;
            alcool            = false;
        }

        if (CNHManager.points <= 0)
        {
            MyNotifications.CallNotification(MyNotifications.LOST_ALL_POINTS_MESSAGE, 3);
            Invoke(MENU_METHOD, 3);
        }

        if (CNHManager.life <= 0)
        {
            MyNotifications.CallNotification(MyNotifications.LOST_ALL_LIFE_MESSAGE, 3);
            Invoke(MENU_METHOD, 3);
        }

        if (CarManager.fuel <= 0)
        {
            MyNotifications.CallNotification(MyNotifications.LOST_ALL_FUEL_MESSAGE, 3);
            Invoke(MENU_METHOD, 3);
        }

        if (CarManager.mechanic <= 0)
        {
            MyNotifications.CallNotification(MyNotifications.LOST_ALL_MECHANIC_MESSAGE, 3);
            Invoke(MENU_METHOD, 3);
        }

        CNHManager.life -= 1;
        imagem.sprite    = staticVisaoNormal;
    }
Exemplo n.º 6
0
    IEnumerator mainStep()
    {
        yield return(new WaitUntil(() => bStart == true));

        while (bStart)
        {
            yield return(new WaitForSeconds(1));

            MyNotifications.CallNotification("Listen Background Music", 5);
            yield return(new WaitForSeconds(1));

            BgMusic.Play();
            yield return(new WaitForSeconds(5));


            MyNotifications.CallNotification("Listen Music Note", 20);
            string[] requirtNote = { "", "", "" };
            requirtNote = muiscNote[0].Split(',');
            PlayRequire(requirtNote);
            yield return(new WaitForSeconds(20));

            MyNotifications.CallNotification("Goodbye World!", 3);
        }
    }