Exemplo n.º 1
0
 public void showToast(string message, bool autoHide = true)
 {
     alertMessage.text = message;
     time = Time.time;
     this.autoHide = autoHide;
     showsToastStatus = ShowToastStatus.Show;
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (showsToastStatus == ShowToastStatus.Show) {
         if (time + DelayTimeToHide < Time.time && autoHide) {
             time = Time.time;
             showsToastStatus = ShowToastStatus.Hidding;
         }
     } else if (showsToastStatus == ShowToastStatus.Hidding) {
         if (alertMessage.text.Length == 0){
             showsToastStatus = ShowToastStatus.Hide;
         } else {
             if (time + SpeedHide < Time.time) {
                 alertMessage.text = alertMessage.text.Remove(alertMessage.text.Length-1);
                 time = Time.time;
             }
         }
     }
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     alertMessage.text = string.Empty;
     showsToastStatus = ShowToastStatus.Hide;
 }
Exemplo n.º 4
0
 public void hideToast()
 {
     time = Time.time;
     showsToastStatus = ShowToastStatus.Hidding;
 }