예제 #1
0
 void Awake()
 {
     gameOver   = ModalPanelControl.Instance();
     watchVideo = ModalPanelAskForWatchVideo.Instance();
     UnityAdsButton.AdsOnComplet = false;
     wasAskedToWatch             = false;
 }
예제 #2
0
    public static ModalPanelControl Instance()
    {
        if (!modalPanel)
        {
            modalPanel = FindObjectOfType(typeof(ModalPanelControl)) as ModalPanelControl;
            if (!modalPanel)             // Make sure that Modalpanel existes.
            {
                Debug.Log("There needs to be one active ModalPanelControl Script on a GameObject in your scene");
            }
        }

        return(modalPanel);
    }