Пример #1
0
 public void Ads()
 {
     Advertisement.AddListener(this);
     if (Ready)
     {
         Advertisement.Show(myPlacementId);
     }
     else
     {
         pressed = true;
         PanelWait.SetActive(true);
         timeWait = Time.time;
     }
 }
Пример #2
0
 void CheckPanelWait()
 {
     if (pressed)
     {
         if (Ready)
         {
             pressed = false;
             Advertisement.Show(myPlacementId);
             PanelWait.SetActive(false);
             this.gameObject.SetActive(false);
             canvas.SetActive(true);
         }
         if (Time.time - timeWait > 10)
         {
             pressed = false;
             PanelWait.SetActive(false);
             PanelCanceled.SetActive(true);
         }
     }
 }