示例#1
0
 public void sendNotif()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromHours(2),
                                         "Kuis Otak Cerdas",
                                         "Yakin Anda bisa jawab soal ini", Color.white,
                                         NotificationIcon.Star);
 }
示例#2
0
 public void SendNotification(TimeSpan Time)
 {
     NotificationManager.SendWithAppIcon(Time,
                                         "Clickaway",
                                         RandomZinnen(),
                                         Color.white,
                                         NotificationIcon.Star);
 }
 public void SendNotif()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(2),
                                         "AR Caring Info Plant Reminder",
                                         "Hey there ! Don't forget to water your plants !",
                                         Color.white,
                                         NotificationIcon.Bell);
 }
 // Update is called once per frame
 public void SendNotif()
 {
     Debug.Log("enviar not");
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5),
                                         "Notification",
                                         "Esta es una notificacion",
                                         Color.white,
                                         NotificationIcon.Star
                                         );
 }
示例#5
0
        public void ScheduleNormal() //"Notification" matlab heading  "Notification with app icon" mtlb sub heading and ismein right  side mein ek icon aajayega;//\U0001F600 matlab griinning face
        {
            //ACHIEVEMENTS
            int x = PlayerPrefs.GetInt("Gifts");

            x++;
            PlayerPrefs.SetInt("Gifts", x);

            NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(1800), "Kids! your Gift is ready; 2000 Diamonds!!", "Lets eat fruits together! \U0001F609 \U0001F351 ", new Color(0, 1f, 1), NotificationIcon.Message);
        }
示例#6
0
 public void NotificationsActive()
 {
     NotificationManager.CancelAll();
     if (PlayerPrefs.GetString("Notifications") == "off")
     {
         return;
     }
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(1), "", "", mainColors.colorBackGround, NotificationIcon.Message);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(2), "", "", mainColors.colorTouches, NotificationIcon.Heart);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(3), "", "", mainColors.colorGraphs, NotificationIcon.Clock);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(7), "", "", mainColors.colorLines, NotificationIcon.Bell);
     NotificationManager.SendWithAppIcon(TimeSpan.FromDays(30), "", "", mainColors.colorError, NotificationIcon.Star);
     return;
 }
示例#7
0
        IEnumerator winState()
        {
            gameOver = true;
            waveBox_UI.GetComponent <Image>().color = new Color(0.0F, 0.0F, 1F, 0.5F);
            waveBox_UI.gameObject.SetActive(true);
            waveText_UI.text = "Tu bebe se ha dormido!";
            yield return(new WaitForSeconds(1));

            returnButton_UI.gameObject.SetActive(true);
            //Si gana, enviar 3 cada 3 horas y quitar la anteriores
            NotificationManager.CancelAll();
            for (int i = 1; i <= 3; i++)
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(i * 10800), "Baby Oops!", "Tu bebe necesita de atención", new Color(0, 0.6f, 1), NotificationIcon.Clock);
            }
            PlayerPrefs.SetInt("hasPlayed", 1);
        }
示例#8
0
        public IEnumerator gameOverState()
        {
            gameOver     = true;
            playerActive = false;
            waveBox_UI.GetComponent <Image>().color = new Color(1F, 0.0F, 0.0F, 0.5F);
            waveBox_UI.gameObject.SetActive(true);
            waveText_UI.text = "Bebe sucio!";
            yield return(new WaitForSeconds(1));

            returnButton_UI.gameObject.SetActive(true);
            //Si pierde enviar 6 notificaciones cada hora
            for (int i = 1; i <= 6; i++)
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(i * 3600), "Baby Oops!", "Tu bebe necesita de atención", new Color(0, 0.6f, 1), NotificationIcon.Clock);
            }
            PlayerPrefs.SetInt("hasPlayed", 0);
        }
        void Update()
        {
            timer += Time.deltaTime;

            if (timer >= 30f)
            {
                int infoLos = Random.Range(0, LoadZabytek.objects.Length);
                if (LeagueSelector.league == "Polish")
                {
                    NotificationManager.SendWithAppIcon(System.TimeSpan.FromSeconds(5), LoadZabytek.objects[infoLos].namePL, LoadZabytek.objects[infoLos].descriptionPL, new Color(0, 0.6f, 1), NotificationIcon.Event);
                }
                if (LeagueSelector.league == "England")
                {
                    NotificationManager.SendWithAppIcon(System.TimeSpan.FromSeconds(5), LoadZabytek.objects[infoLos].nameEN, LoadZabytek.objects[infoLos].descriptionEN, new Color(0, 0.6f, 1), NotificationIcon.Event);
                }
                timer = 0;
            }
        }
示例#10
0
        IEnumerator gameOverState()
        {
            baby.GetComponent <SpriteRenderer>().sprite = babyFaces[4];
            timeLeft_Text.text = "0:0";
            gameOver           = true;
            gameOverActive     = true;
            waveBox_UI.GetComponent <Image>().color = new Color(1F, 0.0F, 0.0F, 0.5F);
            waveBox_UI.gameObject.SetActive(true);
            waveText_UI.text = "Tu bebe no ha comido bien!";
            yield return(new WaitForSeconds(1));

            returnButton_UI.gameObject.SetActive(true);
            //Si pierde enviar 6 notificaciones cada hora
            for (int i = 1; i <= 6; i++)
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(i * 3600), "Baby Oops!", "Tu bebe necesita de atención", new Color(0, 0.6f, 1), NotificationIcon.Clock);
            }
            PlayerPrefs.SetInt("hasPlayed", 0);
        }
示例#11
0
        IEnumerator gameOverState()
        {
            gameOver = true;
            babyFace.GetComponent <SpriteRenderer>().sprite = faces[2];
            babyFace.GetComponent <AudioSource>().Stop();
            babyFace.GetComponent <AudioSource>().clip = babyCrying;
            babyFace.GetComponent <AudioSource>().Play();
            waveBox_UI.GetComponent <Image>().color = new Color(1F, 0.0F, 0.0F, 0.5F);
            waveBox_UI.gameObject.SetActive(true);
            waveText_UI.text = "Perdiste!";
            yield return(new WaitForSeconds(1));

            waveText_UI.text = "Tu bebe no se ha dormido!";
            returnButton_UI.gameObject.SetActive(true);
            //Si pierde enviar 6 notificaciones cada hora
            for (int i = 1; i <= 6; i++)
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(i * 3600), "Baby Oops!", "Tu bebe necesita de atención", new Color(0, 0.6f, 1), NotificationIcon.Clock);
            }
            PlayerPrefs.SetInt("hasPlayed", 0);
        }
示例#12
0
        public void OnGUI()
        {
            if (GUILayout.Button("Simple 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.Send(TimeSpan.FromSeconds(5), "Simple notification", "Customize icon and color", new Color(1, 0.3f, 0.15f));
            }

            if (GUILayout.Button("Normal 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5), "Notification", "Notification with app icon", new Color(0, 0.6f, 1), NotificationIcon.Message);
            }

            if (GUILayout.Button("Custom 5 sec", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                var notificationParams = new NotificationParams
                {
                    Id             = UnityEngine.Random.Range(0, int.MaxValue),
                    Delay          = TimeSpan.FromSeconds(5),
                    Title          = "Custom notification",
                    Message        = "Message",
                    Ticker         = "Ticker",
                    Sound          = true,
                    Vibrate        = true,
                    Light          = true,
                    SmallIcon      = NotificationIcon.Heart,
                    SmallIconColor = new Color(0, 0.5f, 0),
                    LargeIcon      = "app_icon"
                };

                NotificationManager.SendCustom(notificationParams);
            }

            if (GUILayout.Button("Cancel all", GUILayout.Height(Screen.height * 0.2f), GUILayout.Width(Screen.width)))
            {
                NotificationManager.CancelAll();
            }
        }
示例#13
0
 public void ScheduleNormal3()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(10), "Good Morning", "Drinking water is essential to a healthy lifestyle.", new Color(0, 0.6f, 1), NotificationIcon.Message);
 }
示例#14
0
 public void ScheduleNormal()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5), "Conta Gotas", "Novos minigames estão à sua espera! Vem jogar!", new Color(0, 0.6f, 1), NotificationIcon.Message);
 }
 public void ScheduleNormal()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromHours(4), "Spinning Money", "Time to collect your money :)", new Color(0, 0.6f, 1), NotificationIcon.Bell);
 }
示例#16
0
 public void ScheduleNormal()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5), "Alert Zone", "A lot can happen over coffee! Try Sugar Brown's Coffee.", new Color(0, 0.6f, 1), NotificationIcon.Message);
 }
示例#17
0
 private void OnApplicationQuit()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromHours(1), "The knight needs you!", "It's time to increase your high score, don't you think?", Color.yellow);
 }
示例#18
0
 public void ScheduleNormal2()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(15), "Bed Time", "Its almost time for bed. How was your day?", new Color(0, 0.6f, 1), NotificationIcon.Message);
 }
 /// <summary>
 /// Note: as of API 19, all repeating alarms are inexact. If your application needs precise delivery times then it must use one-time exact alarms, rescheduling each time as described above.
 /// </summary>
 public void ScheduleNormal()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(5), "Notification", "Notification with app icon", new Color(0, 0.6f, 1), NotificationIcon.Message);
 }
示例#20
0
 public void SendNotif()
 {
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(10), "PhonM", "An intruder is partying hard in your phone, you should check what is going on", Color.cyan, NotificationIcon.Star);
 }