void sendRandomNotification() { int index = random.Next(0, messages.Length); String mensagem = messages[index]; MyNotifications.CallNotification(mensagem, 3); }
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); } }
IEnumerator moja() { yield return(new WaitForSeconds(1)); MyNotifications.CallNotification("Hello World!", 3); MyNotifications.CallNotification("MyNotifications", 4); MyNotifications.CallNotification("Goodbye World!", 3); }
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); } }
// 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; }
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); } }